5 IntroML
5 IntroML
5 IntroML
Machine Learning
Welcome to Machine Learning!
Alpha Go Trailer
AlphaGo Zero
https://medium.com/@evepardi
/reinforcement-learning-in-gaming-583a42bc2a9b
Inverse Reinforcement Learning- learning
from Actions
Examples: Supervised or Unsupervised?
• Determining whether or not the user will click on the advertising
banner based on website content and click history.
• Dividing online market customers into groups based on their purchase
history.
• Identifying a user's age based on purchase history. You have access to
the purchase history of the clients whose ages are known.
Back to Supervised Learning
More on Data
Features vs Target Variables
• Features are variables
that help predict the
target variable.
• ML Algorithm takes in
features and labels
(input) to predict target
variable (output).
Feature vs Target Variables: Example
(Housing Price)
Regression vs Classification
• Regression algorithms are used to predict the continuous values such
as price, salary, age, etc.
• Classification algorithms are used to predict/Classify the discrete
values such as Male or Female, True or False, Spam or Not Spam, etc.
Evaluation of Algorithms
• Classification: How many labels did we predict correctly?
• Accuracy – e.g. my model is 99% accurate
• Precision, Recall, Specificity…. We will learn more about these later!
• Regression: How far off are we from the continuous target variable?
• Mean Squared Error (MSE)
• Mean Absolute Error (MAE)
Final Team Project Exercise
1. For Both Data Analysis and Machine Learning Projects:
Based on your ideas for a project, identify data that you might use .
Kaggle.com has a collection of datasets that might help you.
2. What are your features? What is your target variable? (If working on Data
Analysis, please identify a possible ML problem with this data)
3. Is this a Supervised Learning, Unsupervised Learning, or Reinforcement
Learning problem?
4. If Supervised, is this classification or regression?
5. How will you evaluate this algorithm? Accuracy / Mean Squared Error?
6. Start visualizing your data in Pandas (what are the columns, any quick graphs
you can make to explore your data?)
Algorithm Example: The Decision Tree
(Classification)
Algorithm Example- The Deicision Tree
(Regressor)
An Example: Classifying species of Iris
flowers
• Features:
• Sepal length (cm)
• Sepal width (cm)
• Petal length (cm)
• Petal width (cm)
• Target
• Class: 0,1,2 (species)
Introduction to scikit-learn library
https://machinelearningmastery.com
/a-gentle-introduction-to-scikit-learn-a-python-machine-learnin
g-library/