Module 01 - Introduction (1)
Module 01 - Introduction (1)
• Two categories:
• Classification: A classification problem is when the output variable is a
category, such as “Red” or “blue” or “disease” and “no disease”.
• Regression: A regression problem is when the output variable is a real value,
such as “dollars” or “weight”.
Classification
Example:
Ref: Western Digital
Typical Supervised Learning Techniques
• K Nearest Neighbors
• Linear Regression
• Logistic Regression
• Support Vector Machines (SVMs)
• Decision Trees
• Random Forests
• Certain Types of Neural Networks
Supervised Learning Techniques
Unsupervised learning
• Create an internal representation of the input, capturing
regularities/structure in data
• Example:
Clustering: Discover groups of similar inputs (documents, images, etc)
What is ML (Unsupervised)?
Unsupervised
• Training of ML using information that is neither classified nor labeled.
• ML algorithms act on that information without guidance (group
unsorted information according to similarities, patterns and
differences without any prior training of data).
• No training will be given to the machine.
• ML is restricted to find the hidden structure in unlabeled data.
What is ML?
Two categories of algorithms:
• Clustering: discovering the inherent groupings in the data, such as
grouping customers by purchasing behavior.
• Association: discovering rules that describe large portions of data,
such as people that buy X also tend to buy Y.
Unsupervised Learning Techniques
What is ML?
Example:
• Document Clustering
• Finding fraudulent transactions
Clustring
Example:
Clustring
Example:
Ref: Western Digital
Example: Association Rules
• Stores can base on customers’
purchase history to determine their
shopping patterns
• If someone buys certain combinations of
products, it’s more likely they will also
buy some other products
• Useful for placing items in stores and
targeting ads
Typical Unsupervised Learning Techniques
• Clustering
• k-Means
• Hierarchical Cluster Analysis (HCA)
• Expectation Maximization
• Visualization and dimensionality reduction
• Principal Component Analysis (PCA)
• Kernel PCA Locally-Linear Embedding (LLE)
• t-distributed Stochastic Neighbor Embedding (t-SNE)
• Association rule learning
• Apriori
• Eclat
Supervised vs. Unsupervised Learning
#Account Balance 3-month 6-month Outcome
past due past due History Literature Math Chemistry Physics Group
3 120 0 0 Good 70 75 90 95 93 Good at Science
1 100 120 0 Good 77 79 85 83 81 Average at both
5 1000 600 300 Bad 90 95 75 80 73 Good at Social
3 300 100 0 Bad 90 90 95 90 95 Good at both
Classification Clustering
Regression Dimension
Reduction
Association Rules
The machine learning framework
y = f(x)
output prediction Image
function feature
• Training: given a training set of labeled examples {(x1,y1), …, (xN,yN)}, estimate the
prediction function f by minimizing the prediction error on the training set
• Testing: apply f to a never before seen test example x and output the predicted
value y = f(x)
Testing
Image Learned
Prediction
Features model
Test Image
Slide credit: D. Hoiem and L.
Lazebnik
Types of testing
• Evaluate performance by testing on data NOT used for testing
(both should be randomly sampled)
• Cross validation methods for small data sets
• The more (relevant) data the better.
Testing
• How well the learned system work?
• Generalization
• Performance on unseen or unknown scenarios or data
• Brittle vs robust performance
Evaluation
• Given some data, how can we tell if a function is “good”?
• Accuracy
• Precision and recall
• Squared error
• Likelihood
• Posterior probability
• Cost / Utility
• Margin
• Entropy
• K-L divergence
• Etc.