ML Introduction
ML Introduction
Introduction
Grading
• Attendance 5%
• Programming assignments – 20%
• Midterm exam- 25%
• Project – 20%
• Final exam – 30%
Prerequisites: Students entering the class are expected to have a knowledge of
probability and statistics, calculus, linear algebra, algorithm theory and
programming
Topics
• Introduction
• Linear Regression with One Variable
• Linear Regression with Multiple Variables
• Logistic Regression
• Regularization
• Neural Networks: Representation
• Neural Networks: Learning
• Advice for Applying Machine Learning
• Machine Learning System Design
• Support Vector Machines
• Unsupervised Learning
• Dimensionality Reduction
• Anomaly Detection
• Recommender Systems
• Large Scale Machine Learning
• Deep learning
• Recurrent Neural Networks
• Hidden Markov Models
Textbooks
• Andreas C. Müller and Sarah Guido. Introduction to Machine Learning
with Python: A Guide for Data Scientists.2016.
• Bishop C, Pattern Recognition and Machine Learning, 2007
• Mitchell T, Machine Learning, McGraw-Hill, 1997
• Sebastian Raschka. Python Machine Learning. 2015
• Rogers S and Girolami M. A first course in Machine Learning. CRC
Press, 2011
• Barber D, Bayesian Reasoning and Machine Learning, 2012
• Duda, Hart and Stork, Pattern Classification, Wiley-interscience
Machine Learning Libraries
Scikit learn: Python Machine Learning
Library
•Scikit-learn Homepage http://scikit-learn.org
•Scikit-learn User Guide http://scikit-learn.org/stable/user_guide.html
•Scikit-learn API reference http://scikit-learn.org/stable/modules/classes.html
•In Python, we typically import classes and functions we need like this:
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
SciPy Library: Scientific
Computing Tools
http://www.scipy.org/
Data
Computer Output
Program
Machine Learning
Data
Computer Program
Output
Machine Learning definition
• Arthur Samuel (1959). Machine Learning: Field of study that
gives computers the ability to learn without being explicitly
programmed.
Supervised machine learning: Learn to predict target values from labelled data/
Individuals
[Source: Su-In Lee, Dana Pe’er, Aimee Dudley, George Church, Daphne Koller]
Applications of clustering
300
Price ($)
200
in 1000’s
100
0
0 500 1000 1500 2000 2500
Size in feet2
• Classification is appropriate when we are trying to predict one of a small number of discrete-
valued outputs. Even though the number of shares traded is technically discrete-valued (i.e., an
integer), it would be more natural to treat it as a continuous value
• Regression is appropriate when we are trying to predict a continuous-valued output, since as the
price of a stock (similar to the housing prices example in the lectures).
Classification or Regression?
• Suppose you are working on weather prediction, and your weather
station makes one of three predictions for each day's weather: Sunny,
Cloudy or Rainy. You'd like to use a learning algorithm to predict
tomorrow's weather. Would you treat this as a classification or a
regression problem?
• Classification is appropriate when we are trying to predict one of a
small number of discrete-valued outputs, such as whether it is Sunny
(which we might designate as class 0), Cloudy (say class 1) or Rainy
(class 2).
Representation
• Decision trees
• Sets of rules / Logic programs
• Instances
• Graphical models (Bayes/Markov nets)
• Neural networks
• Support vector machines
• Model ensembles
• Etc.
Evaluation
• Accuracy
• Precision and recall
• Squared error
• Likelihood
• Posterior probability
• Cost / Utility
• Margin
• Entropy
• K-L divergence
• Etc.
Optimization
• Combinatorial optimization
– E.g.: Greedy search
• Convex optimization
– E.g.: Gradient descent
• Constrained optimization
– E.g.: Linear programming
The machine learning framework
y = f(x)
output prediction feature
function
• Training: given a training set of examples, 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)