Machine Learning Flashcards

1
Q

Most common cost functions for linear regression

A

MSE - Mean Squared Error (or OLS - Ordinary Least Squares), MAE - Mean Absolute Error, Huber Loss Function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

MSE

A

Mean squared error:

  • A measure of the quality of a model/estimator
  • The average squared difference between the estimated values and the actual value.
  • It is the “second moment” (about the origin) (L2) of the error, and thus incorporates both the variance of the estimator (how widely spread the estimates are from one data sample to another) and its bias (how far off the average estimated value is from the truth).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Cost function for Logistic Regression

A

Log loss or cross-entropy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Sigmoid function

A

1 / (1 + e^-z)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Logistic Regression

A

A classification algorithm used to assign probabilities to a discrete set of classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Monotonic function

A

Always increasing or always decreasing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Softmax function

A
Used to normalize results in multi-class logistic regression. Transforms a vector of predictions (real numbers) so that each is in the interval of [0, 1] and all add up to 1 so they can be interpreted as probabilities.
(aka "normalized exponential function" or softargmax)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Popular regression algorithms

A
  • Ordinary Least Squares Regression (OLSR)
  • Linear Regression
  • Logistic Regression
  • Stepwise Regression
  • Multivariate Adaptive Regression Splines (MARS)
  • Locally Estimated Scatterplot Smoothing (LOESS)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Popular instance-based algorithms

A
  • k-Nearest Neighbors (kNN)
  • Learning Vector Quantization (LVQ) (is also neural-network-inspired)
  • Self-Organizing Map (MAP)
  • Locally Weighted Learning (LWL)
  • Support Vector Machine (SVM)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Popular regularization algorithms

A
  • Ridge Regression
  • Least Absolute Shrinkage and Selection Operator (LASSO)
  • Elastic Net
  • Least-Angle Regression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Popular decision tree algorithms

A
  • Classification and Regression Tree (CART)
  • Iterative Dichotomiser 3 (ID3)
  • C4.5 and C5.0 (diff versions of a powerful approach)
  • Chi-squared Automatic Interaction Detection (CHAID)
  • Decision Stump
  • M5
  • Conditional Decision Trees
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Popular Bayesian algorithms

A
  • Naive Bayes
  • Gaussian Naive Bayes
  • Multinomial Naive Bayes
  • Averaged One-Dependence Estimators (AODE)
  • Bayesian Belief Network (BBN)
  • Bayesian Network (BN)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Popular clustering algorithms

A
  • k-Means
  • k-Medians
  • Expectation Maximization (EM)
  • Hierarchical Clustering
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Popular association rule learning algorithms

A
  • Apriori algorithm

- Eclat algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Popular ensemble algorithms

A
  • Boosting
  • Bootstrapped Aggregation (Bagging)
  • AdaBoost
  • Weighted Average (Blending)
  • Stacked Generalization (Stacking)
  • Gradient Boosting Machines (GBM)
  • Gradient Boosted Regression Trees (GBRT)
  • Random Forest
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Popular ensemble algorithms

A
  • Boosting
  • Bootstrapped Aggregation (Bagging)
  • AdaBoost
  • Weighted Average (Blending)
  • Stacked Generalization (Stacking)
  • Gradient Boosting Machines (GBM)
  • Gradient Boosted Regression Trees (GBRT)
  • Random Forest
17
Q

Describe regression algorithms

18
Q

Data cleaning/prep checklist

A
  1. Dups rows or values?
  2. Missing values? What strategy to use to handle it?
  3. Does any data need recoded?
  4. Does any data need transformed from categorical to dummy variables?
19
Q

Data exploration checklist

A
  1. Summary statistics
  2. Correlations
  3. Subsets
20
Q

Machine learning DevOps challenges

A
  • High heterogeneity
  • ## High composability
21
Q

Machine learning DevOps challenges

A
  1. High heterogeneity
  2. High composability
  3. More options for performance and success metrics
  4. Iteration - models may require frequent retraining and redeployment
  5. Infrastructure - varied and dynamic loads, evolving ecosystem
  6. Scalability from unpredictable loads & high performance demands
  7. Auditability - Need to explain the “black box”
22
Q

Properties of standardized data set

A
  • mean of zero
  • unit variance (std dev = 1)
  • normal (Gaussian) distribution [usually]
23
Q

Gini Impurity formula for a node

A

IG = 1 - (probability of condition one)^2 - (probability of condition two)^2

24
Q

Gini Impurity formula for a condition

A

= weighted avg of Gini Impurity for leaf nodes

= SUM for all nodes[ (% of items classified by node) * (IG of node) ]

25
Bootstrapping
Bootstrapping is any test or metric that relies on random sampling with replacement.
26
Bagging (or Bootstrap Aggregating)
The procedure of training each individual learner on different bootstrapped subsets of the data and then averaging the predictions.
27
normalization vs. standardization
Normalization usually means to scale a variable to have a values between 0 and 1, while standardization transforms data to have a mean of zero and a standard deviation of 1.
28
UEDOPE problem-solving process
* Understand* the problem: analyze, ask Qs, restate it * Examples*: write > 3 quality examples incl. edge cases * Design* solution: break out steps, outline brute force solution, analyze complexity * Optimize*: brainstorm on paper & walk thru examples, try diff data structures, algos, & strategies (BUD, space/time trade-offs, reverse-engineer intuition) * Pseudocode*: then walk thru w/ examples * Execute*: code, test, refactor