So Jupyter is a great tool for experimental science. Running a jupyter notebook though can be tricky; especially if you want to maintain all of the data that is stored in it. I have seen many strategies; but I have come up with one that I like best of all. It is based on my “Micro Services for Data Science” strategy. By using decoupled data and compute we can literally thrash our Jupyter notebook and all of our data and notebooks still live. So why not put it in a self healing orchestrater and deploy via Kubernetes :D.
Today we are going to do a little exercise around optimizing an algorithm. I was working with a customer who was using open data (and we know how that can be) to perform an initial set of predictions to show some value while adding in some collection capabilities so they can roll one with more reliable data later.
So you likely will run into this at some point. You are reading data from somewhere and it is relative path based; but that doesn’t necessarily always help load data in especially if you are storing data and your code in separate paths (which is common) or if you are sharing data with a team; or even if your data is just somewhere totally different.
Anyways; this article will help convert a .csv label file with actual named labels to a label file with full path with a numerical label that can be more easily one hot encoded during the reading process. Note for deep learning often this is a two step process. Step 1: Convert from relative pathing to specific pathing & numerical labels. Step 2: Convert to framework specific storage format for input reading pipeline (which varies framework to framework). Here we cover Step 1. We will be using the CIFAR 10 data set which can be downloaded from here: https://www.kaggle.com/c/cifar-10/data
So here is the big ticket item; How in the world do I write files to persisted storage from PySpark? There are tons of docs on RDD.toTextFile() or things of that nature; but that only matters if you are dealing with RDD’s or .csv files. What if you have a different set of needs. In this case; I wanted to visualize a decision decision forest I had built; but there are no good bindings that I could find between PySpark’s MLLIB and Matplot lib (or similiar) to visualize the decision forest.
This one is more for me than for you. I often find a piece of software that needs just some magic environment variable set with some magic path that never seems to get properly configured during installation. Below is an example of how to get that path set, and then ensure it is always set when you log on to the server from then on out.
# These instructions are for bash
$ echo $SHELL
# Check the current value of your envvar
$ echo $CAFFE_ROOT
# Add the envvar to ~/.profile so it will load automatically when you login
$ echo "export CAFFE_ROOT=/home/username/caffe/" >> ~/.profile
# Load the new configuration
$ source ~/.profile
# Check the new envvar value
$ echo $CAFFE_ROOT
If you are not familiar with Microsoft CoCos, you should be. Its a treasure trove of data for your learning pleasure! There just happens to be one pesky problem with it, and that is the fact that when attempting to find the files for training/testing; the Annotation file that ships with MS CoCo does not include the actual file name, but rather the image id. This sounds fine, except the data when you download it has a bunch of trailing stuff! In this article we will go through how to get it ready.
In this article I’m going to go through how to set up CNTK with Visual Studio Code and take advantage of those PASCAL GPUs I know everybody has these days. I will also do a breif overview of what CNTK and Visual Studio Code are and why they are so incredible for machine learning scientists.
So I just completed an incredible project with Brain Thermal Tunnel Genix, where I learned so much about pattern recognition, machine learning and taking research and algorithms and pushing those into a production environment where it can be integrated into a real product. Today’s article takes those lessons and provides a sample on how to perform complex modelling and operationalize it in the cloud. The accompanying Gallery Example can be found here.
So there are a ton of articles out there on the theory of Reinforcement Learning, but very few with an actual application. I watched a few lectures from Berkley, and read a few articles by NVidia and thought, “Well, lets just give this a shot”. 8 hours later, this is what I had.
Herby V1 simply learns to go forward as much as possible while avoiding obstacles.