Data Science Lecture 6

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

1/119

encourage image

There are no tags or description

Looks like no tags are added yet.

120 Terms

1
New cards

A regression model has very low training MSE but much larger testing MSE. Which statement best describes the model?

It is likely overfitting the training data.

2
New cards

For a numerical target, which criterion is most appropriate when comparing two predictive models for future prediction?

The model with the smaller error on an independent testing sample.

3
New cards

A model produces predictions close to the actual numerical values for most observations and has no strong systematic pattern in residuals. This model is best described as having:

good predictive accuracy and reasonable model fit.

4
New cards

Which situation is most likely to reduce a model’s ability to predict future numerical outcomes?

The model is tuned repeatedly until it performs best on the testing data.

5
New cards

A good predictive model for a numerical target should balance which two goals?

Low prediction error and ability to generalize to new observations.

6
New cards

Suppose Model 1 has training MSE = 4 and testing MSE = 25, while Model 2 has training MSE = 9 and testing MSE = 10. Which model is better for prediction?

Model 2, because its testing MSE is smaller.

7
New cards

Honest model performance assessment means that model performance is evaluated using:

data not used to train or tune the model.

8
New cards

Why is training error usually too optimistic as an estimate of future prediction error?

The model was directly fit to reduce error on the training data.

9
New cards

A researcher tries ten models and reports only the model with the best testing result. Why may this be dishonest assessment?

The testing set has been used for model selection and no longer gives an unbiased final evaluation.

10
New cards

Which design best supports honest assessment?

Training data for fitting, validation data for tuning, and testing data for final evaluation.

11
New cards

Data leakage occurs when:

information from the testing set influences model training or tuning.

12
New cards

If an instructor wants students to estimate future prediction error honestly, which instruction is best?

Fit models using the training sample and calculate final metrics only on the testing sample

13
New cards

In the validation set approach, the original data are commonly split into:

a training sample and a testing or validation sample.

14
New cards

A weakness of the validation set approach is that:

the result can depend strongly on one random split.

15
New cards

If the validation set is too small, the performance estimate may be:

unstable because it is based on few testing observations.

16
New cards

If the training set is too small in the validation set approach, the fitted model may:

perform poorly because it was trained with insufficient information.

17
New cards

A dataset of 1,000 observations is split into 700 for training and 300 for validation. What is the validation sample used for?

Estimating prediction performance on data not used to fit the model.

18
New cards

Which statement about the validation set approach is correct?

It is simple to implement but can waste data for model fitting.

19
New cards

In K-fold cross-validation, the data are divided into K parts, and each part is used once as:

the testing fold.

20
New cards

If K = 5, how many times is the model fit in standard 5-fold cross-validation?

5 times.

21
New cards

The K-fold cross-validation error estimate is usually calculated by:

averaging the testing errors across the K folds.

22
New cards

Compared with a single validation split, K-fold cross-validation often provides:

a more stable estimate because each observation is tested once.

23
New cards

Which value of K is commonly used in applied work because it balances computation and accuracy?

5 or 10.

24
New cards

In 10-fold cross-validation with 200 observations, about how many observations are in each testing fold?

20 observations.

25
New cards

Leave-One-Out Cross-Validation is equivalent to K-fold cross-validation with:

K equal to the sample size n.

26
New cards

For a dataset with 80 observations, LOOCV fits the model how many times?

80 times.

27
New cards

In each LOOCV iteration with sample size n, the training sample contains:

n - 1 observations.

28
New cards

A major disadvantage of LOOCV for complex models is:

high computational cost because many models must be fit.

29
New cards

Which statement about LOOCV is most accurate?

It uses nearly all data for training in each iteration but may have high variance in some settings

30
New cards

For numerical prediction, LOOCV testing error can be summarized by:

averaging the squared prediction errors from all left-out observations.

31
New cards

Sampling with replacement means that after an observation is selected:

it is returned to the population and can be selected again.

32
New cards

Bootstrap sampling is usually based on:

sampling with replacement

33
New cards

In a bootstrap sample of size n drawn from n observations, which outcome is possible?

Some observations appear multiple times and some do not appear at all.

34
New cards

Why is sampling with replacement useful in model assessment?

It can approximate sampling variability by creating many resampled datasets.

35
New cards

If there are 10 observations and we sample 10 times with replacement, the probability that a selected observation can be chosen again is:

positive after every draw.

36
New cards

Which phrase best describes a sample created with replacement?

A resample in which duplicated observations may occur.

37
New cards

Sampling without replacement means that after an observation is selected:

it cannot be selected again in the same sample

38
New cards

A simple random training-test split is usually an example of:

sampling without replacement.

39
New cards

If 30 observations are selected without replacement from 100 observations, how many unique observations are in the sample?

30 unique observations.

40
New cards

Why is sampling without replacement important for holdout validation?

It keeps training and testing samples separate.

41
New cards

In K-fold cross-validation, assigning observations to folds is usually done:

without replacement, so each observation belongs to one fold.

42
New cards

Which statement is correct about sampling without replacement?

The sample cannot contain the same observation more than once.

43
New cards

For an observation with actual value y = 20 and predicted value = 17, the residual is:

Residual = actual minus fitted = 20-17=3.

44
New cards

For residuals 2, -1, and 3, the MSE is:

MSE = (4+1+9)/3 = 14/3.

45
New cards

Mean Absolute Error (MAE) is based on:

the average of absolute residuals

46
New cards

Compared with MAE, MSE gives more weight to:

large errors.

47
New cards

The median squared error is useful because

it is less affected by extremely large squared errors than the mean squared error

48
New cards

R-squared for a numerical target is commonly interpreted as:

the proportion of variation in the target explained by the model

49
New cards

If a model has testing R-squared close to 0, this usually suggests:

the model explains little variation beyond using the mean prediction.

50
New cards

If actual values are close to zero, which metric may become unstable or difficult to interpret?

Mean Absolute Percentage Error.

51
New cards

For absolute errors 1, 4, 2, 10, and 3, the MAE is:

MAE = (1+4+2+10+3)/5=4.

52
New cards

For squared errors 1, 9, 4, 16, and 25, the median squared error is:

Sorted squared errors: 1,4,9,16,25, so median=9.

53
New cards

A model with lower testing MSE but higher training MSE than another model may be preferred because:

future prediction performance is more important than training fit.

54
New cards

Which set of metrics is appropriate for numerical target prediction?

MSE, MAE, median squared error, and R-squared.

55
New cards

A residual plot displays residuals against fitted values or a predictor to help assess:

whether model errors show systematic patterns.

56
New cards

A curved pattern in a residual plot often suggests:

a nonlinear relationship not captured by the model.

57
New cards

A funnel shape in a residual plot is commonly evidence of:

non-constant error variance.

58
New cards

If residuals are randomly scattered around zero with roughly constant spread, this generally indicates:

the model form is reasonably appropriate based on the residual plot.

59
New cards

An extreme point far away from the rest of the residuals may indicate:

a possible outlier that warrants further investigation.

60
New cards

Why should residual plots be used along with numerical metrics such as MSE?

Metrics summarize error size, while plots reveal patterns and assumption violations.

61
New cards

For a numerical target, a good predictive model should produce predicted values that are close to the true values on __________ data, not only on the training data.

unseen testing

62
New cards

A model with very low training error but much higher testing error is likely suffering from __________.

overfitting

63
New cards

A model with high training error and high testing error is usually too simple and is said to suffer from __________.

underfitting

64
New cards

For a numerical target, the main purpose of prediction is to estimate the conditional __________ of the target given the predictor information.

mean

65
New cards

A useful predictive model should balance model complexity and prediction accuracy so that it has a low __________ error.

generalization

66
New cards

When two models have similar testing accuracy, the simpler and more interpretable model is often preferred according to the principle of __________.

parsimony

67
New cards

Honest performance assessment requires evaluating the model using observations that were not used for model training or model __________.

selection

68
New cards

Using the training error as the final performance measure usually gives an __________ estimate of the true testing error.

optimistically biased

69
New cards

The testing sample should be held out until the final assessment stage to avoid information __________.

leakage

70
New cards

If preprocessing decisions such as variable selection are made using the full dataset before splitting, the assessment may no longer be __________.

honest

71
New cards

A model should be compared with competing models using the same testing data or the same resampling scheme to ensure a __________ comparison.

fair

72
New cards

Honest assessment is especially important when models have many tuning parameters because flexible models are more likely to __________ the training data.

overfit

73
New cards

In the validation set approach, the available data are commonly split into a training sample and a __________ sample.

validation or testing

74
New cards

If the validation sample is too small, the estimated testing error may have high __________.

variability

75
New cards

If the training sample is too small, the fitted model may perform poorly because it has less information for __________.

learning

76
New cards

Random splitting should be done before model fitting so that the validation sample remains __________ of the training process.

independent

77
New cards

When the sample size is limited, the validation set approach can waste data because only part of the sample is used for __________ the model.

training

78
New cards

For reproducible validation results, the analyst should set and report the random __________ used for the split.

seed

79
New cards

In K-fold cross-validation, the dataset is divided into K approximately equal-sized __________.

folds

80
New cards

In each round of K-fold cross-validation, the model is trained on __________ of the folds.

K - 1

81
New cards

The K-fold cross-validation error is usually computed by averaging the prediction errors across all __________.

folds

82
New cards

Compared with a single validation split, K-fold cross-validation generally gives a more __________ estimate of testing error.

stable

83
New cards

Common choices such as K = 5 or K = 10 are often used to balance computational cost and estimation __________.

accuracy

84
New cards

When the target distribution is very uneven across the range of Y, folds should be constructed carefully so each fold is reasonably __________.

representative

85
New cards

Leave-One-Out Cross-Validation is the special case of K-fold cross-validation from a

sample of N cases where K equals __________.

N

86
New cards

In each LOOCV iteration, the model is trained on N - 1 observations and tested on __________ observation.

one

87
New cards

LOOCV uses nearly all observations for training in each iteration, so its error estimate often has low __________ compared with small training-set validation methods.

bias

88
New cards

LOOCV can be computationally expensive because the model must be refit __________ times.

N

89
New cards

Although LOOCV often has low bias, its estimate can still have high __________ because the validation errors are highly correlated across fitted models.

variance

90
New cards

For large datasets and complex algorithms, 10-fold cross-validation is often preferred over LOOCV because it is less __________ intensive.

computationally

91
New cards

Sampling with replacement means that after an observation is selected, it is returned to the population and may be selected __________.

again

92
New cards

A bootstrap sample is a sample drawn with replacement from the original data and usually has the same size as the __________ dataset.

original

93
New cards

In sampling with replacement, some observations may appear multiple times while others may be __________.

omitted

94
New cards

Bootstrap methods are often used to approximate the sampling distribution of a statistic when the theoretical distribution is __________.

unknown

95
New cards

For a dataset of size N, the probability that a specific observation is not selected in one draw with replacement is __________.

1 - 1/N

96
New cards

Sampling with replacement is fundamental to bagging because each model is trained on a different __________ sample.

bootstrap

97
New cards

Sampling without replacement means that once an observation is selected, it cannot be selected __________ in the same sample.

again

98
New cards

In a simple random sample without replacement, every subset of a fixed size has an equal chance of being __________.

selected

99
New cards

A training-testing split is usually formed by sampling observations without __________ between the two samples.

overlap

100
New cards

Compared with sampling with replacement, sampling without replacement produces no duplicate observations within the same __________.

sample