Getting Started with Python for Machine learning and Deep learning

Welcome to my first article where I’ll be sharing how I got started with learning Python particularly for Machine and Deep Learning. I hope you learn a thing or two from my learning journey.

ABHISHEK SHAH
8 min readSep 13, 2020
Source — Unsplash

This is Part 1, from my three part series on Getting Started for Python, Machine Learning and Deep Learning.

About me

I was introduced to Computers as a subject in primary school. My curiosity for that machine led me to join the Computer Club and learn programming languages like Logo and Scratch. As I grew, my passion for Computer Science also grew exponentially, because of which I decided to study it for my under-graduation and so I am currently pursuing my undergrad from a tier 3 college which you might have not even heard of.

Presently, I’ve got acceptance from 7 US universities for pursuing my Masters in Computer Science. As of now, I’ve deferred mine admits to Fall 21 due to the ongoing pandemic. Currently, I am a full-time Machine learning intern for a California based startup called “Quant Binary”.

Table of Contents

  • Why Python?
  • Resources I used for learning Python
  • Most Important Python Data Structures for Machine Learning
  • Stack Overflow
  • Editors I use
  • Suggested Learning Path

All the resources that I’ll be mentioning are absolutely free of cost.

Why Python?

Python is a widely used high-level programming language for general-purpose programming. Apart from being an open-source programming language, python is a great object-oriented, interpreted, and interactive programming language. Python combines remarkable power with very clear syntax.

But why Python for Machine learning?

  • Python is simple to learn. As compared to C, C++, and Java the syntax is simpler and Python also consists of a lot of code libraries for ease of use.
  • Its data handling capacity is great.
  • Python’s capability of interacting with almost all the third-party languages and platforms is exceptional.

Now tell me as a beginner or even as someone familiar with programming, which one would you personally go for?

Printing in Java

Printing in Python

Both of them will just be printing “Hello World”, that’s it.

With that said, I think you might have got the answer to the question, Why Python!

Resources I used for learning Python

There are literally hundreds of paid Certification courses available for learning python on sites like Coursera, Udemy, Udacity, and whatnot. But I personally think that they are not worth your money.

Yeah, so coming back, Here are the resources that helped me a lot. I still do visit these resources randomly just to brush up on my skills or to revise some basic concepts.

(Just click every underlined title and you’ll be redirected to that respective page)

Corey Schafer’s — Python tutorials playlist

Corey’s Python Playlist

Corey is an amazing, amazing teacher. The way he explains every concept is just way too good. Hands down the best. You’ll be learning everything here right from the Basics of Python language to Object-Oriented Programming in Python as well.

(This playlist also contains Flask and Django tutorials which are Python-based web frameworks which you can skip for now)

Telusko’s Python tutorials playlist

Navin’s Python playlist

If you’re someone who’s not that comfortable with an American accent, I’ll suggest this channel. Navin is an experienced tutor who explains each concept pretty concisely. He even has videos of various data structures in python in the same playlist which can be a good practice point for you to test your skills.

HackerRank Competitive programming website

Competitive programming is a concept which I’ll be covering in upcoming blogs. But what’s necessary for you as of now is that, with all the skills that you’ll be gaining in Python, HackerRank will be the platform that will help you cement your skills. It is a wonderful, wonderful platform for practicing loads and loads of python related problem.

This is how HackerRank’s dashboard looks like. Go for the Easy ones first and increase the difficulty as you get comfortable with your current difficulty level

Simply create an account on the website and get started. If you’re stuck on a problem, take help from the discussion forums but try to solve it before looking at the discussion forum. HackerRank is something that I still practice every day for about an hour. The more you practice, the more you learn, and the more you realize how fun Python is an easy Programming is.

This is how a typical problem dashboard looks like. When you scroll down there’s an editor where you have to write your code and submit it. Read the problem description carefully. Make sure to use the Discussions tab a lot if you ever stuck on a particular problem

It’s absolutely fine if you are not able to apply your skills immediately. Just trust the process and keep moving forward. It will take time. But once you get the hang of it. Trust me, there’s no stopping then. Perseverance is the key.

Most Important Python Data Structures for Machine Learning

Data structures are basically those structures that can hold some data together. In other words, they are used to store a collection of related data. There are four built-in data structures in Python,

  • List
  • Tuple
  • Dictionary
  • Set

All of them are extremely important when it comes to machine learning. Make sure you have good hands on practice with all of them particularly with list and dictionary.

Stack Overflow

There’ll be multiple times where you will be scratching your head over a particular problem or an error. This is where Stack Overflow comes to your rescue. No matter what you doubt, just copy-paste the error message on google and see how Stack Overflow helps you because whenever you search for a coding related query, 99% chances are Stack Overflow will be the first page that you’ll encounter.

Stack Overflow is a programmer’s true best friend.

Never disappoints :)

This is how Stack Overflow’s Homepage looks like

But there will be few cases where your searched query will not be present on Stack Overflow. In such a case, just write your query in the question box and wait for someone to respond. One usually gets a reply in almost 4 to 5 hours.

And still, if your problem still exists, We all know how to use Googleour all-time favorite savior.

Editors I use

Personally, I’ve tried almost all the editors right from Sublime Text, Atom, Notepad++ to PyCharm but what I’ve learned throughout my experience is that editors are not extensively used when it comes to Machine or Deep Learning. They are better when used for Software Development.

Some great alternatives to editors are Jupyter Notebook and Google Colab. I’ll be talking about Colab in part two of our ongoing series. But when it comes to basic python programming, Jupyter notebook has absolutely no competition.

Jupyter Notebooks

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.

Anaconda is something that you’ll require extensively for Machine learning and Deep learning and also for installing Jupyter notebook as well. All these tutorials regarding Installing Anaconda and setting up Jupyter are present in Corey’s playlist. But I will still attach the links for the same. You can find Anaconda installation here and Jupyter notebook’s setup here.

This is how a Jupyter Notebook looks like

Suggested Learning Path

I’ll sum up everything for you so that there’s absolutely no place for doubts. The learning path that I’ll suggest is that,

  • Start with Corey’s playlist. Learn all the basic and intermediate to almost advanced concepts there. But, if some of your concepts are still ambiguous and unclear to you, search for them in Telusko’s playlist and you’re good to go.
  • Now, with all the newly gained skills, you will need loads of practice for those skills to cement in your brain. This is where HackerRank comes in.
  • Also, randomly search for Python projects on google and try to implement them. This will help you build your Resume’s, Projects column as well.
  • If you ever get stuck at an error or any particular problem, remember, Google and Stack Overflow are your Best Buddies.
  • Make sure that you’re writing everything down. Go get multiple registers and write down everything — right from definition, syntax, use cases to code as well. After that, write it down on the code editor as well and see how your program runs, see how your code behaves, and what common mistakes you make while writing code.
  • Last but not the least, make sure you revise everything at least once a week.

Take your time. Everyone learns at a different speed. But switch to machine learning only when you get comfortable with Python.

All these tips and techniques that I mentioned here in this article is what I’ve learned from my learning journey over the years. I want you all to at least try them for like once and see if these techniques work for you as well or not.

Okay. So here’s a final note — In my second and third blog respectively I will be writing about getting started in Machine learning and Deep Learning. And the knowledge that you will gaining from Corey’s and Navin’s playlists are more than enough for implementing machine learning and deep learning. But by practicing on HackerRank, you’re making sure that python stays in your head for a long long time and that you get completely familiar with all the basic Python syntax.

Even now, what I personally do is that, along with all my work schedule, I still everyday no matter what, compulsorily spend about “one to one a half hour” on HackerRank, Because when we apply for a machine learning role, the interviewer definitely asks about core python, object oriented concepts and data structure and algorithms in Python, and practicing on HackerRank will help you cover almost all of them.

In the second article, I’ll be discussing how to get started with Machine Learning along with all the important libraries, resources, certifications, and my experiences with machine learning from the past 2 years. Stay Tuned!

Also, If you find this article to be helpful, do follow me for more such amazing articles and share it with your friends as well. I’ll be writing articles, tutorials, projects, and a lot more posting one, almost every week. Till then, Keep learning! Cheers!

To connect with me or for any difficulties, I’ll be very much obliged to help. You can find me here on LinkedIn.

--

--

ABHISHEK SHAH

MS CS @Rochester Institute of Technology, New York | Software Development | Web Development | Machine Learning | Deep Learning