Explore models of training ML, including:
supervised learning
Supervised learning is the most common type of machine learning, where we teach machines by showing them examples with correct answers. Think of it like teaching a child to identify animals by showing them pictures and telling them "this is a cat" or "this is a dog." After seeing enough examples, they can identify new animals they've never seen before.
In supervised learning:
We provide the algorithm with labelled data (input-output pairs)
The algorithm learns to map inputs to correct outputs
Once trained, it can predict outputs for new, unseen inputs
This approach is called "supervised" because we supervise the learning process by providing the correct answers during training. It's like having a teacher who marks your work and tells you exactly what's right or wrong.
Supervised learning problems typically fall into two categories:
Goal: Predict which category or class an input belongs to
Examples:
Email spam detection (Spam or Not Spam)
Disease diagnosis (Positive or Negative)
Handwritten digit recognition (0-9)
Sentiment analysis (Positive, Neutral, Negative)
Goal: Predict a continuous numerical value
Examples:
House price prediction
Temperature forecasting
Stock price prediction
Age estimation from photographs
The process of supervised learning involves these key steps:
Data Collection: Gather relevant data with both features and corresponding labels
Data Preparation: Clean the data, handle missing values, and split into training and testing sets
Model Selection: Choose an appropriate algorithm based on the problem type
Training: Feed the training data to the algorithm so it can learn patterns
Evaluation: Test the model on unseen data to assess its performance
Deployment: Use the trained model to make predictions on new data
Let's get hands-on with supervised learning using Google's Teachable Machine, a tool that allows you to create your own image classification models without writing any code.
Visit Teachable Machine
Create a new image project
Set up at least 3 classes (e.g., "Thumbs Up", "Thumbs Down", "Peace Sign")
For each class, collect at least 20 samples by using your webcam
Train your model (click the "Train Model" button)
Test your model by performing gestures and seeing if it correctly classifies them
Experiment with:
Adding more samples to improve accuracy
Testing in different lighting conditions
Adding a new class and re-training
Provides clear and accurate predictions
Easy to understand and interpret results
Well-established techniques with strong theoretical foundations
Good performance for many practical applications
Requires large amounts of labelled data
Labelling data can be expensive and time-consuming
May not generalise to new situations not represented in training data
Can't handle complex problems that require reasoning or creativity
Linear Regression: Predicts continuous values using a linear approach
Logistic Regression: Used for binary classification problems
Decision Trees: Uses a tree-like model of decisions
Random Forest: Combines multiple decision trees for better accuracy
Support Vector Machines (SVM): Finds the optimal boundary between classes
K-Nearest Neighbors (KNN): Classifies based on similarity to known examples
Neural Networks: Mimics the human brain to recognize patterns
For each scenario, identify whether it's a classification or regression problem, and explain what features and labels would be used:
Predicting whether a student will pass or fail a course based on attendance, homework completion, and previous grades
Estimating how many customers will visit a store on a given day
Determining if a credit card transaction is fraudulent
Predicting the growth height of a plant based on sunlight, water, and fertilizer
Categorizing news articles as sports, politics, entertainment, or technology