Introduction to Machine Learning

by Albert Major


Example: Dogs (Labrador vs Greyhound)

Screenshot 2025-08-29 at 11.55.10.png

Screenshot 2025-08-29 at 11.56.49.png

Screenshot 2025-08-29 at 12.05.25.png

This plot shows how a machine learning model separates two classes using two features (e.g., height and color). The red curve is the decision boundary: points on one side are predicted as one class (white), and points on the other side as the other class (black). The dashed lines show uncertainty around the boundary. It illustrates that models can learn complex, non-straight boundaries to better classify data.

Three Main Types of Machine Learning

  1. Supervised Learning

Screenshot 2025-08-29 at 12.09.08.png

This slide shows how supervised learning is used in medicine with images. In classification, the model decides if there is a fracture or not. In detection, it highlights where a structure (like the scaphoid bone) is. In segmentation, it marks the exact pixels of a lesion. In semantic segmentation, it labels different parts of the scan by type (e.g., spine sections). It shows how machine learning can move from simple yes/no answers to detailed image analysis.

This slide shows how supervised learning is used in medicine with images. In classification, the model decides if there is a fracture or not. In detection, it highlights where a structure (like the scaphoid bone) is. In segmentation, it marks the exact pixels of a lesion. In semantic segmentation, it labels different parts of the scan by type (e.g., spine sections). It shows how machine learning can move from simple yes/no answers to detailed image analysis.

  1. Unsupervised Learning
  2. Reinforcement Learning

Why Machine Learning is Growing

Workflow of Supervised Learning

  1. Collect and explore data.

  2. Pre-process data (cleaning, scaling, handling missing values).

  3. Split data into training set and test set.

  4. If model only works on training data but fails on test data → overfitting.

    This diagram shows the workflow of building and using a machine learning model. Data from users is collected (data ingestion) and cleaned or transformed to be usable. The cleaned data is split into training data for building the model and test data for evaluation. The model is trained, then tested on unseen test data to check performance. If the results are good, the model is deployed for real use. If not, feedback loops send results back to improve the process, either by retraining or refining data and transformations.

    This diagram shows the workflow of building and using a machine learning model. Data from users is collected (data ingestion) and cleaned or transformed to be usable. The cleaned data is split into training data for building the model and test data for evaluation. The model is trained, then tested on unseen test data to check performance. If the results are good, the model is deployed for real use. If not, feedback loops send results back to improve the process, either by retraining or refining data and transformations.

Terminology

Classification vs Regression

Dummy Models (Baselines)

Data Representations

  1. Images

  2. Text

  3. Famous Datasets in scikit-learn

Feature Importance

Scaling Data

Types of Scaling:

  1. Robust Scaler
  2. Min-Max Scaler
  3. Normalizer