Font size
WorksheetsData Robot
Total questions: 126
Worksheet time: 1hrs 6mins
Machines that can preform tasks that are characteristic of human intelligence.
Artificial Intelligence
Machine Learning
Target
Features
The practice of using algorithms to parse data, learn from it, and then make a determination or prediction about something in the word
Artificial Intelligence
Machine Learning
Target
Features
The variable we are trying to predict and gain insights about
Artificial Intelligence
Machine Learning
Target
Features
Can be thought of as the independent variables we will use to predict the target
Unsupervised ML
Machine Learning
Target
Features
Supervised ML
Data scientist tells the machine what it wants it learn (identifies target)
Unsupervised ML
Machine Learning
Target
Features
Supervised ML
Up to the machine to decide what it wants to learn
Unsupervised ML
Machine Learning
Target
Features
Supervised ML
“A field of study that gives computers the ability to learn without being explicitly programmed”-McClendon & Meghanathan
Unsupervised ML
Machine Learning
Target
Features
Supervised ML
The practice of using algorithms to parse data, learn from it, and then make a determination or prediction about something in the word
Unsupervised ML
Machine Learning
Target
Features
Supervised ML
about predicting the future based on the past.
Unsupervised ML
Machine Learning
Target
Features
Supervised ML
Makes ML possible with out extensive math/stat/programming
Unsupervised ML
automl
Target
Features
Supervised ML
Model diagnosis- Evaluation/ranking of the models• Models can be run simultaneously• Combinations of models can be run (Blenders)
Unsupervised ML
automl
Target
Features
Supervised ML
what are the parts of automated machine learning?
Exploratory data analysis
Feature engineering
Algorithm selection and hyper-parameter tuning
Model diagnostics
The process of examining the descriptive statistics for all features as well as their relationship with the target variable
Exploratory data analysis
Feature engineering
Algorithm selection and hyper-parameter tuning
Model diagnostics
Cleaning data, combining features, splitting features into multiple features, handling missing values, and dealing with text, etc.
Exploratory data analysis
Feature engineering
Algorithm selection and hyper-parameter tuning
Model diagnostics
Keeping up with the “dizzying number” of available algorithms and their quadrillions of parameter combinations
Exploratory data analysis
Feature engineering
Algorithm selection and hyper-parameter tuning
Model diagnostics
Keeping up with the “dizzying number” of available algorithms and their quadrillions of parameter combinations
Exploratory data analysis
Feature engineering
Algorithm selection and hyper-parameter tuning
Model diagnostics
Evaluation of top models
Exploratory data analysis
Feature engineering
Algorithm selection and hyper-parameter tuning
Model diagnostics
what is step one of the machine learning life cycle?
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
what is step two of the machine learning life cycle?
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
what is step three of the machine learning life cycle?
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
what is step four of the machine learning life cycle?
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
what is step five of the machine learning life cycle?
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
Set up batch or API prediction system Document modeling process for reproducibility Create model monitoring and maintenance plan
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
Interpret model Communicate model insights
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
Variable selection Build candidate models Model validation and selection
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
Variable selection Build candidate models Model validation and selection
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
Find appropriate data Merge data into single table Conduct exploratory data analysis Find and remove any target leakage Feature engineering
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
Specify business problem Acquire subject matter expertise Define unit of analysis and prediction target Prioritize modeling criteria Consider risks and success criteria Decide whether to continue
define project objectives
acquire and explore data
model data
interpret and communicate
implement, document, and maintain
what are considered part of the 8 criteria of AutoML excellence
accuracy
productivity
ease of use
understanding and learning
what are considered part of the 8 criteria of AutoML excellence
resource availability
process transparency- effects understanding and learning
generalizability across contexts
recommended actions
• Anything a company would want to know in order to increase sales or reduce costs
business problem
subject matter expertise
unit of analysis
modeling criteria
State problem in language of business (not language of modeling) • What actions might result from this modeling project• Specify actions that might result • Include specifics (number of customers affected, costs etc.)• Explain impact to the bottom line
business problem
subject matter expertise
unit of analysis
modeling criteria
qualitative
categorical data
numerical
quantitative
categorical data
numerical
Described by words rather than numbers
categorical data
numerical
i.e. Freshmen, Sophomore, Junior, Seniori.e. Train, Plane, Bus, etc.
categorical data
numerical
Arise from counting, measuring, or some kind of mathematical operation
categorical data
numerical
i.e. 20 of you visited the course website since last class
categorical data
numerical
discrete and continuous
categorical data
numerical
nominal and binary
categorical data
numerical
• Infinite number of possible responses• Like any point on a number line
continuous
discrete
• Finite number of options• Examples: course letter grade, country of origin, or Likert scale
continuous
discrete
You can identify groups are different, but no meaningful rankingExamples–Occupation {teacher, dentist, data scientist, student...}–Marital status {single, married, divorced, widowed}–CustomerId {1, 2, 3,..., n}
categorical
binary
You can identify groups are different, but no meaningful rankingExamples–Occupation {teacher, dentist, data scientist, student...}–Marital status {single, married, divorced, widowed}–CustomerId {1, 2, 3,..., n}
categorical
binary
Nominal attribute with only two categories/states0 -> no 1 -> yesBoolean (when states are represented as true or false]
categorical
binary
Usually stored internally as an unsigned integer (number of seconds since 1970) ______ lead to conversion nightmares because of how many formats there are
date and time
text strings
You specify a number of characters• This is either exact or a maximum depending on the data type• Varchar, variable length string, text varying, VSTR, and other names for variable lengthYou will almost always have to convert text or extract text to make something useful out of it
date and time
text strings
subsection of a dataset from which the machine learning algorithm uncovers or “learns” relationships between the features and the target variable.
training set
validation (test) set
holdout set
subsection of a dataset to which we apply the machine learning algorithm to see how accurately it identifies relationships between the known outcomes for the target variable and the dataset’s other features
training set
validation (test) set
holdout set
a subsection of a dataset to provide a final estimate of the machine learning model’s performance after if has been trained and validated. Holdout sets should never be used to make decisions about which algorithms to use for improving tuning algorithms.
training set
validation (test) set
holdout set
The goal of machine learning is to build computational models with high prediction and generalization capabilities
split data
over training (over fitting)
cross validation
At the end of the training process the final model should predict correct outputs for the input samples, but it should also be able to generalize to unforeseen data
split data
over training (over fitting)
cross validation
High prediction and generalization capabilities are conflicting• Improper splitting can lead to excessively high variance in model performance
split data
over training (over fitting)
cross validation
Poor generalization can be classified a
split data
over training (over fitting)
cross validation
Poor generalization can be classified a
split data
over training (over fitting)
cross validation
If the original validation partition is not representative of the overall population, then the resulting model may appear to have a high accuracy when in reality it just happens to fit the unusual validation set well
split data
over training (over fitting)
cross validation
Randomize the order of the data and select a holdout sample. • For us this will be 20% of the data (5-fold cross validation)• Set aside, keep locked
step 1
step 2
step 3
step 4
step 5
Randomize the order of the data and select a holdout sample. • For us this will be 20% of the data (5-fold cross validation)• Set aside, keep locked
step 1
step 2
step 3
step 4
step 5
Randomize the order of the data and select a holdout sample. • For us this will be 20% of the data (5-fold cross validation)• Set aside, keep locked
step 1
step 2
step 3
step 4
step 5
Split the remaining data into a set of folds• For us this will be 5-folds (16% each)
step 1
step 2
step 3
step 4
step 5
Set aside Fold 1 as the validation set, combine the rows in the remaining four folds (2-5) and use these rows to create a model of which the features explain the target
step 1
step 2
step 3
step 4
step 5
Use the model to try to predict the target from Fold 1
step 1
step 2
step 3
step 4
step 5
Reveal true target and compare to predicted target• Evaluated on a variety of metrics- Validation Score
step 1
step 2
step 3
step 4
step 5
Set aside Fold 2 as the new validation set, the remaining folds (1,3,4,5) are now used for training.
step 6
step 7
step 8
step 9
step 10
Set aside Fold 2 as the new validation set, the remaining folds (1,3,4,5) are now used for training.
step 6
step 7
step 8
step 9
step 10
Use the model to try to predict the target from Fold 2
step 6
step 7
step 8
step 9
step 10
Reveal the true target from Fold 2 and compare to predicted target. Success metrics are again calculated.
step 6
step 7
step 8
step 9
step 10
Reveal the true target from Fold 2 and compare to predicted target. Success metrics are again calculated.
step 6
step 7
step 8
step 9
step 10
The process is repeated with Folds 3,4, and 5 in turn being set aside as the validation set.
step 6
step 7
step 8
step 9
step 10
Overall accuracy for cross validation is calculated
step 6
step 7
step 8
step 9
step 10
Estimate the accuracy of your machine learning model by averaging the accuracies derived in all k cases across cross validation
business problem
subject matter expertise
unit of analysis
k-fold cross validation
Train your machine learning model using the training set and calculate the accuracy of your model by validating the predicted results against the validation set
business problem
subject matter expertise
unit of analysis
k-fold cross validation
Train your machine learning model using the training set and calculate the accuracy of your model by validating the predicted results against the validation set
business problem
subject matter expertise
unit of analysis
k-fold cross validation
Keep the fold fi as the validation set and keep all the remaining k-1 folds in the training set.
business problem
subject matter expertise
unit of analysis
k-fold cross validation
business problem
subject matter expertise
unit of analysis
k-fold cross validation
Answers the question “How rapidly will the model evaluate new cases after being put into production?”
speed
accuracy
Use cases/sec
speed
accuracy
additional features (more data)
learning curves will not tell you this
learning curves will tell you this
additional cases (more data)
learning curves will not tell you this
learning curves will tell you this
• Shows how the models predicative ability changes with ‘sample size’• Answers the question “Will more data help our model?” or “Would more data improve the model’s predicative ability?”
learning curves will not tell you this
learning curves will tell you this
• Shows how the models predicative ability changes with ‘sample size’• Answers the question “Will more data help our model?” or “Would more data improve the model’s predicative ability?”
learning curves will not tell you this
learning curves will tell you this
how do we determine if we should add more data
cost
time
The overall impact of a feature without consideration of the impact of other features• The overall impact of a feature adjusted for the impact of the other features• Feature impact for specific feature values
important features
learning curves
Moving from creating and selecting a model to understanding what features drive the target •What (statistical) relationships exist between the target and the other features•Clarifies why it works in some cases in fails in others
important features
learning curves
The overall impact of a feature without consideration of the impact of other features
importance
feature impact
feature effects
The overall impact of a feature adjusted for the impact of the other features
importance
feature impact
feature effects
Feature Impact for specific feature values
importance
feature impact
feature effects
green bar
importance
feature impact
feature effects
importance
feature impact
feature effects
importance
feature impact
feature effects
importance
feature impact
feature effects
may not be the best model but many top models will come from tree based algorithms• Random Forest• ExtremeGradient Boosted Trees
learning curves
importance levels
decisions tree
what algorithms come from tree based algorithms
random forest
extremegradient boosted trees
biggest problems with decision trees
overfitting
target
how to determine if model was good
Best case scenario order of models did not change
Failing that, still a good scenario if the top two models stay at the top of the list
Half of the data from the remaining four folds is randomly selected – 3,200 rows, 32%• 14 algorithms in this case• Validated against the 16% validation set, 1,600 rows• The 7 “best”/top performing algorithms from the 32% make it to round 2
round 1
round 2
round 3
round 4
7 Algorithms from the previous stage• Algorithms are run on 64% of the data, 6,400 rows• Validated against the 16% validation set, 1,600 rows• The results appear on your “Leader board” as validation scores
round 1
round 2
round 3
round 4
64% sample
round 1
round 2
round 3
round 4
Run cross-validation on the top four models• Only if validation set is <=10,000 rows• Be sure to sort leaderboard by cross validation column
round 1
round 2
round 3
round 4
cross validation
round 1
round 2
round 3
round 4
After cross validation has run models are internally sorted by cross validation score and then the best models are blended
round 1
round 2
round 3
round 4
blending
round 1
round 2
round 3
round 4
what are the modeling modes
autopilot
quick autopilot (fewer blueprints)
Manual mode (user chooses blueprints)
how should be run a model
informative features
all features
A measure of accuracy
logloss
holdout
Lower scores are ‘better’
logloss
holdout
Rather than evaluating the model directly on whether it assigns cases (rows) to the correct “label”, the model is evaluated based on probabilities generated by the model and their distance from the correct answer
logloss
holdout
Rather than evaluating the model directly on whether it assigns cases (rows) to the correct “label”, the model is evaluated based on probabilities generated by the model and their distance from the correct answer
logloss
holdout
Open data and examine• Also open the Data Dictionary to be sure you have a good grasp on the terms
logloss
holdout
before we load the data
subsection of a dataset from which the machine learning algorithm uncovers or “learns” relationships between the features and the target variable.
training set
validation test set
holdout set
over training (over fitting)
boolean variables
subsection of a dataset to which we apply the machine learning algorithm to see how accurately it identifies relationships between the known outcomes for the target variable and the dataset’s other features
training set
validation test set
holdout set
over training (over fitting)
boolean variables
subsection of a dataset to which we apply the machine learning algorithm to see how accurately it identifies relationships between the known outcomes for the target variable and the dataset’s other features
training set
validation test set
holdout set
over training (over fitting)
boolean variables
a subsection of a dataset to provide a final estimate of the machine learning model’s performance after if has been trained and validated. Holdout sets should never be used to make decisions about which algorithms to use for improving tuning algorithms.
training set
validation test set
holdout set
over training (over fitting)
boolean variables
Poor generalization can be classified as over training. The model simply memorizes the training examples and is not able to give correct outputs also for patterns that were not in the training dataset
training set
validation test set
holdout set
over training (over fitting)
boolean variables
Poor generalization can be classified as over training. The model simply memorizes the training examples and is not able to give correct outputs also for patterns that were not in the training dataset
training set
validation test set
holdout set
over training (over fitting)
boolean variables
Yes/No, True/False, 1/0 (binary)
training set
validation test set
holdout set
over training (over fitting)
boolean variables
Average of these 5 validation scores is the
importance
feature impact
feature effects
cross validation score
why bother with missing data
Not as important for Decision Trees, they do fine with missing values.
However, any row with even one missing value will get that whole row kicked out from the analysis when......using Regression
However, any row with even one missing value will get that whole row kicked out from the analysis when......using neural networks
when choosing a module what should you consider
adding more data
predictive accuracy and prediction speed
speed and to build a model
familiarity with model
insights
what should the prediction distribution be under
density
frequency
what are strengths of the confusion matrix
straight forwards
interpretation
imprecise
quick view of model and frequently maps well to business use case (once threshold is adjusted)
what are limitations of the confusion matrix
straight forwards
interpretations
imprecise
quick view of model and frequently maps well to business use case (once threshold is adjusted)
what are use cases of the confusion matrix
straight forwards
interpretations
imprecise
quick view of model and frequently maps well to business use case (once threshold is adjusted)
TP+TN/ All cases
accuracy
true positive rate
true negative rate
TP/(TP+FN)
accuracy
true positive rate
true negative rate
TN/(TN+FP)
accuracy
true positive rate
true negative rate
