Machine Learning 1 Exam

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/75

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 8:30 PM on 10/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

76 Terms

1
New cards

Statistical learning

the set of tools for estimating an unknown relationship between inputs and an output

2
New cards

Regression

Output is number on a continuous scale

3
New cards

Classification

Output is a category

4
New cards

Y=f(X)+ϵ

Y: output

X: inputs

f: true relationship (^f: estimated relationship)

ϵ: error term, everything that affects Y and is not in X, plus pure chance; deviation from true population line

5
New cards

Prediction

Accurate ^Y for new cases at the cost of knowing ^f

6
New cards

Inference

Understand how Y changes with X

7
New cards

Bias (Interpretable)

Underfitting (ex. linear regression); systematic error

8
New cards

Variance (Flexible)

Overfitting (ex. neural networks); sensitivity to the training data

9
New cards

MSE

1/n ∑yi−f^​(xi​))2

Gap between predicted an actual value, squared, summed, and averaged

  • Squared: punishes big misses far more than small ones


10
New cards

RMSE

sqrt(MSE)

Predictions are off by the RMSE on average

11
New cards

Training error

MSE on training data

12
New cards

Test error

MSE on new data

13
New cards

Err(x)

Bias2 + Variance + sigma2

14
New cards

Irreducible Error

randomness in the outcome itself

15
New cards

Supervised learning

A known set of predictors and response variables

16
New cards

Unsupervised learning

A set of predictors with no output, exploration of patterns

17
New cards

Clustering

Grouping by similarities

18
New cards

Dimensionality reduction

using PCA to compress and visualize high-dimensional data

19
New cards

K-Means Clustering

Measures distance between data; scaled so that every variable is on equal footing

20
New cards

Simple linear regression

quantifies the relationship between two numerical variables, one predictor and one response, to predict the response

21
New cards
<p></p>


  • β0​ is the intercept

  • β1​ is the slope


22
New cards

Residual


Gap between observed and actual value; deviation from the fitted line; unexplained variability

<p><br>Gap between observed and actual value; deviation from the fitted line; unexplained variability</p>
23
New cards

Intercept: Interpretability

  • X = 0 is realistic

  • at or near the range of your data


24
New cards

Slope: Interpretabilty

Each additional X unit is associated with a B1 increase/decrease units of Y, on average (holding other Xs constant)

25
New cards

Standard Error

how much the estimate would bounce around across repeated samples

26
New cards

Confidence Interval

If we repeated this sampling process many times, about 95% of the intervals we built would contain the true β1

<p>If we repeated this sampling process many times, about 95% of the intervals we built would contain the true β1</p>
27
New cards

t-statistic

counts how many standard errors the estimate sits away from zero

<p>counts how many standard errors the estimate sits away from zero</p>
28
New cards

Hypothesis testing

H0: β1 =0

H1: β1 =0

Null: no true relationship between X and Y

29
New cards

p-value

the chance of seeing a t-statistic this extreme if the null hypothesis were true

30
New cards

Coefficient confidence interval

Where is the true slope?

31
New cards

Confidence interval for the mean response

Where is the average outcome for all cases with these predictor values?

32
New cards

Prediction interval

Where will one new individual outcome land? Carries true error on top of estimation uncertainity

33
New cards

Residual standard error (RSE)

the rough size of a typical vertical gap between an observed sales figure and the regression line

<p>the rough size of a typical vertical gap between an observed sales figure and the regression line</p>
34
New cards

Degrees of freedom

Accounts for each parameter, variance estimate become unbiased

  • n-p-1


35
New cards

Total Sum of Squares

Total variability in the response

<p>Total variability in the response</p>
36
New cards

R2

Proportion of variability accounted for in the model

<p>Proportion of variability accounted for in the model</p>
37
New cards

F-statistic

tests whether the model as a whole is useful: is there any real relationship between the predictors and the response, or could the whole thing be noise?

  • Above 1


38
New cards

Correlation coefficient

Measures linear association between two variables

  • Simple: R2=r2


<p>Measures linear association between two variables</p><ul><li><p>Simple: R<sup>2</sup>=r<sup>2</sup></p></li></ul><p></p>
39
New cards

Assumption: Linearity

the relationship between the predictor and the response is linear

  • a residual plot, should show no curvature


40
New cards

Assumption: Errors Do Not Track the Predictors

After accounting for the predictors in the model, the leftover errors should not systematically rise or fall with those predictors

<p>After accounting for the predictors in the model, the leftover errors should not systematically rise or fall with those predictors</p>
41
New cards

Omitted variable bias

Variables correlated with the X or Y that is not outlined in the model can sit in the error, making the X look better or worse

42
New cards

Independence of Errors/Autocorrelation

Each observation’s error is independent of the others (fails in time series and clustered/duplicated data); lowers standard errors

43
New cards

Constant Variance / Homoskedasticity

Each observation’s error is independent of the others X

  • the residual plot should look like random scatter with equal spread everywhere, no funnel shapes


44
New cards

Normality of errors

The errors ε follows a normal distribution

  • a histogram of the residuals should look roughly bell shaped and centered at zero, and a Q-Q plot of the residuals should follow a straight line

exact t and F distributions for inference in small samples

45
New cards

Assumptions: Linearity & Independence of Errors

the least squares coefficients are unbiased: on average across repeated samples, they land on the truth

46
New cards

Assumptions: Linearity & Independence of Errors & Independence & Constant Variance

The Gauss-Markov result: among all linear unbiased estimators, least squares has the smallest variance

47
New cards

Breusch-Pagan Test

The null hypothesis: the errors have constant variance (homoskedasticity)

The alternative: the error variance changes with the predictor(s) (heteroskedasticity).

48
New cards

Leverage

Point with potential to pull line towards itself

49
New cards

Cook’s distance

measures how much the fitted model would change if we deleted each observation

  • Flagged above 1


50
New cards
51
New cards

Parsimony

the simplest model that does the job

  • Some predictors are costly or unreliable to collect. If newspaper data requires a paid subscription and contributes nothing, drop it.

  • Smaller models are easier to interpret and explain to stakeholders.

  • Unnecessary predictors add noise and can hurt predictions on new data.

  • Fewer predictors mean fewer missing value headaches and less multicollinearity.


52
New cards

forward selection

start with nothing, add the most useful predictor one at a time

53
New cards

backward elimination

start with everything, remove the least useful one at a time

54
New cards

stepwise selection

a hybrid that can add and remove

55
New cards

Data amount: Signal strength

Large effects are easier to detect regardless of sample size

56
New cards

Data amount: Noise

A high residual variance demands more data for the same precision

57
New cards

Data amount: Collinearity

Correlated predictors inflate standard errors, and heavily overlapping predictors can burn through a sample fast

58
New cards

Data amount: Prediction vs. Inference

Stable prediction and precise inference about a specific coefficient have different appetites

59
New cards

Adjusted R-squared

Adjusted R2 will not necessarily go up when adding new predictors

<p>Adjusted R<sup>2</sup> will not necessarily go up when adding new predictors</p>
60
New cards

Test Mean Absolute Error (MAE)

It is in the same units but weights every miss equally instead of punishing large ones, so a big gap between RMSE and MAE tells you the errors are dominated by a few bad misses

61
New cards

Collinearity

Correlation among predictors that destabilizes coefficient estimates

62
New cards

Variance Inflation Factor

Quantifies how much collinearity inflates the variance of each coefficient

  • Problem: above 5 or 10


63
New cards

Qualitative predictors

represent discrete groups or categories

  • Ordinal: ordered

  • Nominal: unordered


64
New cards

dichotomous

two level

65
New cards

polytomous

3 or more levels

66
New cards

dummy variables

converts a categorical predictor with k levels into k−1 dummy variables, each taking the value 1 or 0.

67
New cards

baseline

category absorbed into the intercept

68
New cards

No significant intercept

  • If the baseline value is something you need to interpret or report, look into why it is imprecise.

  • If you are focused on prediction, the intercept is just part of the machinery; overall accuracy is what matters.

  • If predictors can never realistically be zero (a GNP of $0 means civilization has ended), the intercept is a mathematical anchor, not a meaningful quantity, and its p-value is a non-issue


69
New cards

Dummy Intercept interpretation

the average units of the baseline

70
New cards

Dummy Slope Interpretation

X units in compared to the baseline

71
New cards

Interaction

when the effect of one predictor on the response depends on the value of another predictor

72
New cards

Interpretation: Interaction Coefficient

measures how much the effect of X1 changes per unit increase in X2

how much the X1 slope grows/slows with each additional unit of X2

β 1 is the effect of X1 when X2=0: the baseline slope

73
New cards

The Hierarchical Principle

Keep main effects, even if not significant, when including and interaction term

74
New cards

Centering coefficients

Subtract means from values

Intercept: predicted Y at average Xs

Slope: predicted effect of X1 at average X2

Helps with multicollinearity

75
New cards

Dummy and Interaction

the dummy moves intercepts, the interaction moves slopes

76
New cards

Additive assumption

the effect of each predictor is the same no matter what the other predictors are doing