The world’s leading publication for data science, AI, and ML professionals.

Starting Your Journey to Master Machine Learning with Python

Learn the basic requirements to become proficient at machine learning

All About ML

Photo by Luis Rocha on Unsplash
Photo by Luis Rocha on Unsplash

Machine Learning, Deep Learning, Data Science, and Artificial Intelligence (AI) are some of the most used buzz-words today. The popularity of these subjects is on the rise with each passing day. Everyone is trying to jump on the hype train to explore these fields. According to fortune, the statistics say that the hirings for AI specialists have grown by 74% over the last 4 years. Artificial Intelligence is regarded as the "Hottest" job of the present generation. This may lead to many questions in the minds of the viewers.

What makes it so popular? What are these fields anyways? What is machine learning? How do I get started? Why python?

I will try to answer all these questions in today’s article while explaining in detail about how you can get started with python and Machine Learning (ML). Then we will understand how you can tune up and master your machine learning skills.

Note: This will be part-1 of my "All About Machine Learning" course. However, each subsequent parts will be standalone parts. You can read the series in any order as per your convenience. I will try to cover the basics and most of the machine learning algorithms in the upcoming articles. To view other parts of the series you can click here.


Why is AI so popular?

Photo by Benjamin Davies on Unsplash
Photo by Benjamin Davies on Unsplash

Artificial Intelligence is one of the fastest-growing fields today. The advancements in AI are expanding at a fast pace. There is no lack of open positions as well as career opportunities. Everyone is hyped about how AI is going to be the next big thing. As stated by professor Andrew NG, one of the most prominent figures for modern AI—

"Artificial Intelligence is the new electricity."

There are so many expectations for the field of AI in the modern day due to the advancements in technology and the abundance of data. We have higher qualities of graphics processing units and better technologies to compute complex processes.


What are these fields anyways?

Artificial Intelligence is a vast field. The topics like Machine Learning, Data Science, statistics, natural language processing, all come under Artificial Intelligence. Deep Learning is a subset of Machine Learning.

Artificial Intelligence is –

"The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages."

To learn more about artificial intelligence and its analogy to the Universe you can refer here. In this article, we will focus more on Machine Learning. I will try to give a more intuitive approach to understanding Machine Learning.

What is Machine Learning?

Machine Learning is the ability of a program to learn and improve its efficiency automatically without being explicitly programmed to do so. This means that given a training set you can train the machine learning model and it will understand how a model exactly works. Upon being tested on a test set, validation set, or any other unseen data, the model will still be able to evaluate the particular task.

Let us understand this with a simple example. Assume we have a dataset of 30,000 emails out of which some are classified as spam and some are classified as not spam. The machine learning model will be trained on the dataset. Once the training process is complete, we can test it with a mail that was not included in our training dataset. The machine learning model can make predictions on the following input and classify it correctly if the input e-mail is spam or not.

There are three main types of machine learning methods. We will discuss each of these methods. I will then state a few examples and applications for each of these methods.

1. Supervised Learning –

This is the method of training the model with specifically labeled datasets. The datasets can either be a binary classification or multi-class classification. These datasets will have labeled data specifying the correct and incorrect options or a range of options. The model is pre-trained with supervision i.e. with the help of these labeled data. This learning can be categorized into two types of algorithms –

  1. Classification: These algorithms are preferred when the output has a choice or a particular category. The example of email spam filtering can be considered as a classification problem.
  2. Regression: The algorithms are preferred when the output variable has a real value. An example of this can be predicting the house prices for a particular location.

Algorithms: Regression algorithms (linear regression), decision trees, random forests, and classification algorithms like K-Nearest Neighbors (KNN), Support Vector Machines (SVM), logistic regression, Naive Bayes.

Applications: Email spam filtering, classification of tumors (if benign or malignant), classification of user reviews into positive or negative reviews.

2. Unsupervised Learning –

Unsupervised learning is the training of the model on an unlabeled dataset. This means the model is given no prior information. It trains itself by the grouping of similar characteristics and patterns together. An example of unsupervised learning can be categorizing of dogs and cats. The data given to us will be an unlabeled dataset with images of dogs and cats. The unsupervised algorithm will find similarities in patterns and group dogs and cats separately without the specification of the type of data. There are two main types of clustering algorithms –

  1. Clustering: Arrangement of similar entities into groups of clusters. An example of this grouping categories like cats and dogs into clusters as mentioned previously. Another example of this is identifying the cancer stages based on specific data.
  2. Association: Associating similar patterns between 2 or more classes/users. An example of this is recommendation systems where if a particular person watches a movie of a particular genre, the user is given recommendations based on what other users who watched the same movie preferred to watch. Another example of this is when amazon recommends that buyers who bought a particular item also prefer to buy other similar items.

Algorithms: K-means clustering, principal component analysis (PCA), singular value decomposition (SVD), hierarchical clustering.

Applications: Recommendation systems in amazon, Netflix, YouTube, and other digital platforms, friend suggestions on Facebook, anomaly detection.

3. Reinforcement Learning –

According to Wiki

Reinforcement learning (RL) is an area of machine learning concerned with how software agents ought to take actions in an environment in order to maximize the notion of cumulative reward. Reinforcement learning is one of three basic machine learning paradigms, alongside supervised learning and unsupervised learning.

Reinforcement learning is a kind of hit and try method model. This is the method where the model learns with repeated failures. When a model does not achieve the desired result then the model will re-train. This can be applied to concepts like playing chess where after playing millions of games the model will be able to learn appropriate patterns and moves. A more simpler example would be a game of tic tac toe. The model can learn every single path to victory after a few hundred games and once perfectly trained, it will never lose a game.

Algorithms: Policy based, value based, and model based reinforcement learning algorithms.

Applications: Model learning to play games like flappy bird, robotics in industrial automation, traffic control, deep learning based reinforcement learning.


How do I get started?

Photo by Austin Kirk on Unsplash
Photo by Austin Kirk on Unsplash

If you were curious about how to start your machine learning journey then the answer is quite simple. The best way to get started with machine learning is to explore and dig deeper into the various topics surrounding machine learning. It is important to understand if you are interested in and passionate about the field. Machine Learning requires programming skills, mathematical knowledge, and most importantly, the willingness and persistence to learn. There are tons of resources both free and paid from which you can gain a lot of knowledge.

I would highly recommend viewers check out the various machine learning videos online on YouTube. Checking out free code and boot camps is also a great idea. I think it is a great idea to check out the free stuff before diving into the paid courses online. Once you find out that you really like machine learning and have a passionate interest, I would heavily recommend learning Python first and then taking up the Machine Learning Course from Stanford University offered by Coursera by Andrew NG. There are tons of online courses to check out. Just review the courses accordingly and engage in whichever machine learning course suits you best.

Why Python?

Source: Photo by Cookie The Pom on unsplash
Source: Photo by Cookie The Pom on unsplash

Python is an object oriented, high level programming language that was released way back in 1991. Python is highly interpretable and efficient. Simply put – Python is amazing. I initially started out with languages like C, C++, and Java. When I finally encountered python, I found it to be quite elegant, simple to learn, and easy to use. Python is the best way for anyone, even people with no prior experience with programming or coding languages to get started with machine learning. In spite of having some flaws like being considered a "slow" language, python is still one of the best languages for AI and machine learning.

The main reasons why Python is so popular for machine learning despite other languages like R is as follows –

  1. As mentioned previously python is very simple and consistent.
  2. The rapid increase in popularity in comparison to other programming languages.
  3. Extensive resources with respect to a wide range of libraries and frameworks. We will discuss this in further detail in the next part of this series.
  4. Versatility and platform independence. This means python can import essential modules built in other programming languages as well.
  5. Great community and continuous updates. The python community in general is filled with amazing people and constant updates are made to improve python.

To get started with python, you can download it from here.

Conclusion:

I hope all of you enjoyed the read. This will be part-1 of my "all about machine learning" tutorial series. I plan on covering all the topics with respect to machine learning. In the next part of this series, we will look over all the basics of python and its libraries. All of these will be standalone parts and you can view them at any time. Check out the future parts for this series here. Thank you all for sticking on till the end and wish you all a wonderful day.


Related Articles