Running Machine Learning And Data Science Project Without A Computer: Onabajo Monsurat
Some days ago, I shared a tweet on twitter %twitterhttps://twitter.com/Onabajo3/status/.. where I talked about how I was able to open a Jupyter notebook on my android device and I got a lot of comments and direct messages asking me to share and post how I did it, I wanted to make a thread but I decided to just write this article instead.
I have always thought Jupyter Notebook which is a great tool for Data Scientists and Machine Learning Expert can only be launched on a computer until I was faced with a dilemma.
THE CHALLENGE
I was working on a Data science project and I went out of town without my computer, I thought I was going to come back early but I couldn’t and I needed to submit my prediction, I was done with the project but I haven’t made my predictions and I have the .ipynb
notebook on my android device.
‘how do I go about this?’ I thought to myself and it came to me, if I can launch Jupyter Notebook on my computer, there should be a way I can launch it on my android.
THE PROCESS
As a good developer, one of the best skill you can get is how to ask the right questions which I did. Google is my go-to Search Engine anytime I am lost or I need other developer opinion on critical issues and as usual I head over to google. But to my surprise, there is not one single article that I found useful on how to launch Jupyter notebook on my android device. I saw some applications that I downloaded but I did not find them useful so I decided to use the traditional way of launching Jupyter notebook on computer using CONDA
.
To use Conda, you have to install a Python terminal and after a lot of trials and errors, I found a very good android python Integrated Development Environment (IDE) which is PYDROID 3. Pydroid 3 has lots and lots of amazing features but the most beautiful features is that it has everything an IDE should have, it is the most beautiful android application I have ever come across. It has Terminal
, Code editor
, Interpreter
and lots of great python packages. It is an all in one developer Environment for Pythonistas. Pydroid 3 is so simple and easy to use. The best part of this application is that it can be run offline.
Discovering this application is like discovering the next best thing after Sardine Bread. I highly recommend for programmers around the world. Now we have gotten our great Pydroid 3 IDE, lets get our hand dirty with code
GETTING OUR HANDS DIRTY
Crack your fingers, get a cup of water, get yourself in that wicked developer mode because we are about to make a discovery of a lifetime (just kidding). Well, even tho it is not a discovery of a lifetime, it is still a discovery because we don’t know this before 😂
Let's get into it We are going to start by installing Pydroid 3 on our device from Playstore.
After Successful Installation of pydroid 3, open the app and go to Terminal
Open the terminal, using cd (current working directory) to check for file paths on your device, if you are ok with the file path, you can leave it, if not you can use the command line cd directory_you_want
to change the file path, example is below.
After tweaking your file path to your satisfaction, you make a new file using mkdir name_of_new_file
and you cd into it
NOTE: Notice how the file path are changing as you are using the cd
command line
After the environment pathfile has been made, use pip freeze
to check all the installed packages on the application, check for the following packages (They are important for this project)
• Conda
• Jupyter notebook
• Pandas
• Numpy
• Matplotlib
• Scikit learn
If all these packages are preinstalled, you don’t need to install them but if not, install with pip install name_of_package
Now that we have our packages installed, we are going to activate our jupyter notebook using Jupyter notebook
THE RESULTS
For full and better view of the Notebook, change the site to a desktop site
Yay...you can see how simple and easy to navigate jupyter notebooks file on our android, you can now code anywhere and anytime without worrying about not meeting deadlines because a laptop is not available.
The disadvantage is that the kennel must remain active throughout the course of the project being done and the screen is not as wide as a computer screen.
Please like, share, comment and stay tuned for the next crazy thing i will be doing on my android thanks for reading...byeeeee