Predict an animal’s body weight given only the weight of its brain.

Traditionally programming has been about defining every single step for a program to reach an outcome. But machine learning flips that approach; with machine learning, we define the outcome and the programs learns the steps to get there.

Example:
If we wanted to make a bot that can beat Super-Mario, instead of writing code for every possible scenario and determine when to jump and collect coins, we’d say: “The goal is to get to the end without dying. Learn the steps to get there.” We may not even have an idea what some steps could possibly be.

There are many machine learning models. A Neural Network is one of them. When we use a neural network that’s not just one or two but many layers deep to make a prediction, we call that Deep Learning.

 

Machine Learning Classes

Machine learning is classified mainly into three types:

Supervised Learning

We give the model a labeled data set (e.g. car pictures) and gets feed back one what’s correct and what’s not.

Unsupervised Learning

Here, a model is given a data set without labels, and gets no feed back on what’s correct and what’s not. It has to learn by itself what the structure of the data is to solve a given task. This is convenient when the only available data is messy and unlabeled.

Reinforcement Learning

This is when a model is given feedback only when it achieves its goal. Unlike the previous two models, this model is based on the idea of interacting with the environment through trial and error.

 

Regression Prerequisites

For this lesson our data is labeled, so we will use the Supervised approach, and the type of Machine Learning task we’ll perform is called Regression.

Set up a Python 2 conda environment:

conda create -n siraj-regression python=2

Enter environment

activate siraj-regression

Install pandas, matplotlib, scikit-learn

conda install pandas matplotlib scikit-learn

 

Grab the code for this week’s challenge:
https://github.com/llSourcell/linear_regression_demo