Machine Learning — Week 2

Raghavendra Hiremath
2 min readMay 17, 2020

--

Quote for the day
— “Never stop doing your best just because someone doesn’t give you credit.”

I would like to thank you each one of you encouraging me throughout this journey. Welcome to the Machine learning — Day 2.

Today, we will focus on Supervised Machine Learning. Your mind now………What is it? I really did not understand your Day -1 program.

I understand, and I want you guys to have an hands-on experience, if not I will guide you.

Supervised Machine learning is a model/Classifier that you are going to train to identify whether an email is spam or not, or an apple is fruit/not, many more, you can infuse real word complex problem if you already know what you expect.

Two basic components in ML.

Label = It is a variable we’re predicting.
Features = They are our input variable describing our data.

What is a Model?
A model is an algorithm from example and experience.

A sample program from Google AI research paper, which can tell the difference between sports car based on the input, the below example is trained model (Labeled model)

Now, we are going to train a data and then input the trained data into classifier, then solve or make prediction based on trained data.

Google’s Colab

Here, from the above example, we are training a model by selecting HorsePower and seats as a feature and later when we call Label variable to predict whether it is a sports car or minivan. I have assigned 1 for Sports car and 0 for minivan.

When I predict the label using feature as a reference print(clf.predict([[200,8])), then the output is [0] which means minivan. [200 -> Horsepower, 8->Seats].

The result is always based on an input feature, this is trained data. In Day 3, we will focus on inferring label data into unlabeled data (This is an interesting part). Stay tuned :-)

Thank you everyone.

--

--

Raghavendra Hiremath
Raghavendra Hiremath

Written by Raghavendra Hiremath

WE BELIEVE IN FREE AND OPEN SOURCE. My mission is to constantly learn and share the knowledge I gain so that you can use it to empower you.

No responses yet