🔹 What Machine Learning Can Do
Machine learning is most successful when used to automate decision-making by
learning from known examples.
The algorithm learns patterns from existing data and can make predictions on new,
unseen data without human help.
🔹 Supervised Learning (with Inputs and Desired Outputs)
The user provides input–output pairs (examples + correct answers).
A “teacher” supervises the algorithm by giving the correct output during learning.
Once trained, the algorithm can predict outputs for new inputs.
Creating the dataset can be time-consuming because correct answers must be labeled
manually.
Performance is easy to measure because we know what the correct output should be.
🔹 Examples of Supervised Learning
Reading zip codes from handwritten digits:
o Input: handwriting image
o Output: actual digits
o Data created by collecting envelopes and recording the zip code manually.
Determining if a tumor is benign:
o Input: medical image
o Output: benign or not
o Requires images and expert diagnosis (often costly and requires doctor
knowledge and medical testing).
Detecting credit card fraud:
o Input: transaction record
o Output: fraudulent or not
o Users help label the data by reporting fraud cases.
🔹 Differences in Data Collection
Reading envelopes: easy, cheap, but time-consuming.
Medical diagnosis: expensive, requires experts and raises ethical/privacy issues.
Fraud detection: input/output pairs become available automatically over time as fraud
is reported.
🔹 Unsupervised Learning (Only Inputs Known)
Only input data is provided.
No label or correct output is given.
Harder to evaluate and understand.
The algorithm must find structure or patterns on its own.
🔹 Examples of Unsupervised Learning
Finding topics in blog posts:
o No known list of topics beforehand
o The algorithm figures out themes across text data.
Segmenting customers by preference:
o Groups might emerge such as “parents,” “gamers,” etc.
o The groups are not known in advance.
Detecting unusual website access patterns:
o No examples of what abnormal looks like
o The model identifies unusual behavior compared to normal traffic.
🔹 How Input Data Is Represented
Think of data as a table:
o Each row = a sample or data point (customer, transaction, email, etc.)
o Each column = a feature (age, location, transaction amount, etc.)
🔹 Importance of Features in Data
Features describe the properties of data.
Algorithms cannot predict something if the information is not present.
Example:
o If the only feature of a patient is their last name, the model cannot predict
gender.
o Adding first name makes prediction more possible.
🔹 Feature Engineering
The process of choosing and creating useful features from raw data.
A good representation of data = better predictions.