Google Colab for Machine Learning
In this tutorial, we will learn how to use Google Colab for writing Machine Learning codes, So now what is Google Colab? It is an open platform that enables us to load our datasets and write codes to compile it, where the complete compilation would be done in google’s virtual machine. That is code would be running on an online machine and not on your local machine. By this platform, we can run a certain big algorithm that required very good computation power.
Let’s Get Started!
- Step 1: Open “Google Colab” in your browser, use this link Google Colab to open it. Do use your Google Chrome browser for this purpose.
- Step 2: Once it is opened, Sign-in to the page with your Google account. If you have already signed-in with your chrome browser you can skip this step. This is a sample image of a proper Sign-in into Google Colab
- Step 3: Now click on the File button at the top left corner of the page and click the New Python 3 notebook (File>New Python 3 notebook) your browser will open a new tab which looks like this image below,
- Now you are ready to code! Type your code in the code cell as seen in the image,
- Now click on the play button on the left-hand side of the code cell which makes the code run.
- The output after running the code will look similar to this image,
How to load the datasets in Google Colab?
- Click on the > slider mark in the left side of the code cell as seen in the image,
- Now click (Files>Upload), a pop-up window will open letting you upload the dataset or any other supporting file from your computer as shown below,
The file which is being uploaded remains only at the time of coding once you are logged-out you have to re-upload the file to use it and your working would be saved automatically in your goole drive account.
I hope this tutorial on Google Colab helps you with your Machine Learning practice.