The 7 Steps of Machine Learning
Waziri Shebogholo
July 19, 2019
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 1 / 10
The 7 Steps of Machine Learning
1 Gathering data
2 Data preparation
3 Choosing a model
4 Training
5 Evaluation
6 Hyperparameter tuning
7 Prediction
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 2 / 10
1. Gathering data
How good our predictive model will be, will depend on:-
1 Quantity of data
2 Quality of data
3 Learning algorithm
Machine Learning model is only as good as the data it is built from.
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 3 / 10
2. Data preparation
1 Exploration data analysis (EDA)
2 Dealing with missing values
3 Dealing with outliers
4 Dealing with imbalanced data
5 Data transformation
6 Feature engineering
7 Split data into training and validation sets and set aside some
data for testing your model.
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 4 / 10
3. Choosing a model
Guidelines for choosing a Learning Algorithm
1 Type of the problem (eg. Classication, Regression, Clustering)
2 Nature, type and size of data
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 5 / 10
4. Training
The goal of training/learning is to nd a model and its corresponding
parameters such that the resulting model perform well on unseen
data.
What might happen?
Undertting
Overtting
Generalization
What might help?
1 Feature selection
2 Regularization
3 Model architecture
4 More data
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 6 / 10
5. Evaluation
Classication
1 Classication accuracy
2 Confusion matrix
3 Logarithmic loss (log-loss)
4 Precision and recall
5 F-Score
6 Area under curve (AUC)
Regression
1 Mean absolute error
2 Mean squared error
3 Root mean squared error
4 Mean squared log error
5 Median absolute error
6 Regression score (r2
score)
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 7 / 10
6. Hyperparameter tuning
Experimental process
Art rather than science
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 8 / 10
7. Prediction
What do we have to this point?
1 Trained model
2 The right model parameters
Use trained model to predict unseen data point(s).
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 9 / 10
THANK YOU.
Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 10 / 10

The 7 steps of Machine Learning

  • 1.
    The 7 Stepsof Machine Learning Waziri Shebogholo July 19, 2019 Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 1 / 10
  • 2.
    The 7 Stepsof Machine Learning 1 Gathering data 2 Data preparation 3 Choosing a model 4 Training 5 Evaluation 6 Hyperparameter tuning 7 Prediction Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 2 / 10
  • 3.
    1. Gathering data Howgood our predictive model will be, will depend on:- 1 Quantity of data 2 Quality of data 3 Learning algorithm Machine Learning model is only as good as the data it is built from. Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 3 / 10
  • 4.
    2. Data preparation 1Exploration data analysis (EDA) 2 Dealing with missing values 3 Dealing with outliers 4 Dealing with imbalanced data 5 Data transformation 6 Feature engineering 7 Split data into training and validation sets and set aside some data for testing your model. Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 4 / 10
  • 5.
    3. Choosing amodel Guidelines for choosing a Learning Algorithm 1 Type of the problem (eg. Classication, Regression, Clustering) 2 Nature, type and size of data Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 5 / 10
  • 6.
    4. Training The goalof training/learning is to nd a model and its corresponding parameters such that the resulting model perform well on unseen data. What might happen? Undertting Overtting Generalization What might help? 1 Feature selection 2 Regularization 3 Model architecture 4 More data Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 6 / 10
  • 7.
    5. Evaluation Classication 1 Classicationaccuracy 2 Confusion matrix 3 Logarithmic loss (log-loss) 4 Precision and recall 5 F-Score 6 Area under curve (AUC) Regression 1 Mean absolute error 2 Mean squared error 3 Root mean squared error 4 Mean squared log error 5 Median absolute error 6 Regression score (r2 score) Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 7 / 10
  • 8.
    6. Hyperparameter tuning Experimentalprocess Art rather than science Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 8 / 10
  • 9.
    7. Prediction What dowe have to this point? 1 Trained model 2 The right model parameters Use trained model to predict unseen data point(s). Waziri Shebogholo The 7 Steps of Machine Learning July 19, 2019 9 / 10
  • 10.
    THANK YOU. Waziri ShebogholoThe 7 Steps of Machine Learning July 19, 2019 10 / 10