Types of machine learning

Typical learning problems:

  • Supervised learning (this course) (Gmail spam filtering)
    • Training a model from input data and its corresponding labels to predict new examples.
  • Unsupervised learning (Google News)
    • Training a model to find patterns in a dataset, typically an unlabeled dataset.
  • Reinforcement learning (AlphaGo)
    • A family of algorithms for finding suitable actions to take in a given situation in order to maximize a reward.
  • Recommendation systems (Amazon item recommendation system)
    • Predict the “rating” or “preference” a user would give to an item.

Supervised learning

Supervised Learning
from PIL import Image
from src.toy_classifier import classify_image

img = Image.open("static/module1/alpaca.jpg")
img
This image is in /static
This image is in /static
classify_image(img, 3)
Downloading: "https://download.pytorch.org/models/alexnet-owt-7be5be79.pth" to /home/runner/.cache/torch/hub/checkpoints/alexnet-owt-7be5be79.pth
Class, Probability
llama, 0.72
Eskimo dog, husky, 0.06
Norwich terrier, 0.05

Unsupervised learning

Unsupervised Learning

Machine Learning Libraries


scikit-learn

scikit-learn

What we know so far…

  • In supervised learning, we are given a set of observations (𝑋) and their corresponding targets 𝑦 and we wish to find a model function that relates 𝑋 to 𝑦.
  • In unsupervised learning, we are given a set of observations (𝑋) and we wish to group similar things together in 𝑋.

Let’s apply what we learned!