DEV Community

Cover image for Machine Learning: Day 2
Christian Darvin
Christian Darvin

Posted on

Machine Learning: Day 2

Types of Machine Learning Algorithms

  1. Supervised Learning
  2. Unsupervised Learning
  3. Recommender Systems
  4. Reinforcement Learning

Supervised Learning

  • Refers to algorithms that learn input-to-output mappings.
  • Give learning algorithm examples to learn from that include the "output" label for a given input X.
  • Eventually learns to take just the input alone without the output label and gives a reasonably accurate prediction or guess of the output.
  • Learns from being given "right answers."

Examples of Supervised Learning

Input (X) Output (Y) Application
Email Spam (0/1) Spam Filtering
Audio Text Transcripts Speech Recognition
English Spanish, Chinese, etc Machine Translation
Ad, User Info User Click (0/1) Online-Advertisments
Image, Radar Info Position of other cars Self-Driving Cars

How does it learn? (Simplified)

  1. Split the data by 80% for training data and 20% for test data.
  2. Train the model with examples of Input (X) and Labels (Y) using the 80% training data.
  3. Use the 20% test data or unseen data, to predict or guess the output.

"Eventually learns to take just the input alone without the output label and gives a reasonably accurate prediction or guess of the output"

  • Andrew Ng

Types of Supervised Learning Algorithm

Linear Regression Plot

1. Regression

  • It is used to analyze the relationship between the independent variables and dependent variables.
  • Predict a number from infinitely many possible numbers.
  • Example: house prices (Y), size of the house (X)
  • When you see a plot that uses linear regression, the Y always refers to the value we want to predict.

Classification Plot

2. Classification

  • We are trying to predict only a small number of possible outputs or categories.
  • There are more than two possible outputs.
  • Class/Category is the term that we use for the output.
  • Predict categories, usually non-numeric.
  • Find the boundary line that separates 0 and 1.
  • Breast Cancer Detection [0: benign, 1: malignant]
  • Examples: Cat or Dog, Benign or Malignant

Image References

Linear Regression Plot

Classification Plot

Top comments (0)