Machine learning enthusiasts, rejoice! Google has not only open sourced it’s deep learning framework, Tensorflow. Now, they bring us a new tool to aid in the research and education of machine learning with a Jupyter based research tool called Colaboratory.

Colaboratory is a free tool which allows you to run and share jupyter notebooks all from the cloud. No need to install anything, all you need is a desktop based browser such as chrome and an account with Google and you will have access to a jupyter notebook environment with all the popular data science packages ready to begin coding.

Accessing Colaboratory

You might need to register and wait for an invitation prior to begin using this tool.

Once you are in, you are greeted with a Hello, Colaboratory notebook with a few code snippets and instructions on how to use the tool. At the end of the notebook are some important links.

At this point, you can create your own new jupyter notebook with a Python 2 or Python 3 kernel. Only Python is supported at this time.

The Jupyter notebooks you create are stored in your google drive where you can then search, download and upload new notebooks. If you chose to collaborate with others, they can access your notebook and you can work on the same notebook at the same time. When this happens you can see who is in your notebook and realtime the code changes of each of you. Awesome!

Code Execution

Google automatically provisions a personal linux virtual machine on which your notebooks will run. When you go idle for a while, your virtual machine is recycled. Each virtual machine has a maximum runtime.

Shell Commands

Google allows you to run certain shell commands on your virtual machine. For example, to install additional python libraries using pip or apt-get you can run the following:

To view the files in your Colaboratory virtual machine run the shell command: !ls

You will now see the test_dataframe.txt file we just saved under the datalab folder of your virtual machine.

Let’s now download this file to your local pc by running the below python script:

from google.colab import files
files.download('test_dataframe.txt')

To upload files manually from your local pc run the following:

from google.colab import files
uploaded = files.upload()

When you execute the above, you get a file upload button where you can then select and load a file from your local PC.

Code Snippets

There are various other ways to load data onto your Colaboratory virtual machine not to mention much additional functionality. You can find these snippets under Tools > Snippets of your Colaboratory Jupyter Notebook.

Conclusion

Colaboratory allows you to easily start building, sharing and collaborating in your machine learning projects. Free and easy to use with great functionality, this is a great new machine learning tool. Thanks Google!

For the latest news onMachine Learning

Follow Us!

MJ

Advanced analytics professional currently practicing in the healthcare sector.
Passionate about Machine Learning, Operations Research and Programming. Enjoys
the outdoors and extreme sports.