IS410 Simple Questions

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

1/50

encourage image

There's no tags or description

Looks like no tags are added yet.

51 Terms

1
New cards

Which statement about the TRAINING set and TEST set is TRUE?

A. The model learns from training data. Test data checks it on unseen rows. B. Test accuracy is usually higher than training accuracy, since it's smaller. C. The test set should be used to compare models and pick the best settings. D. Training and test sets should share rows so the model sees the test cases.

A. The model learns from training data. Test data checks it on unseen rows

Do - Split first , then build the model on training data only (homework)

Dont - let test row leak into training or model choice. (final exam)

2
New cards

Which statement about TRAINING, VALIDATION and TEST sets is TRUE?

A. Validation and test are two names for the same held-out data. B. Validation is for picking a model. Test is used once, at the end. C. The test set is used to tune min_samples_leaf before validation. D. The validation score should be reported as the final result.

B. Validation is for picking a model. Test is used once, at the end.

Training = learn ( homework )
Validation = Choose/tune hyperparameters (practice exam)

Test = final check (final exam)

3
New cards

Which statement about a BASELINE model is TRUE?

A. It is always 50% accuracy, because it's like flipping a coin. B. It is the best model you built, used as the benchmark for others. C. It uses all the independent variables, but without an intercept. D. It uses no variables: the training average, or the most common class.

D. It uses no variables - the training average, or the most common class

DO - always compare your model to the baseline

Dont - call a model good just because accuracy looks high.




4
New cards

Which statement about OVERFITTING is TRUE?

A. It shows up as low training accuracy and high test accuracy. B. Adding more splits or more epochs is the usual way to fix it. C. It scores great on training data but much worse on new data. D. It means the model is too simple to capture the real pattern.

C. it scores great on training data but much worse on new data

Do - watch for a big gap between training and test scores

Dont - jude a model only on training data ( memorizing answers )

5
New cards

Which statement about SUPERVISED vs. UNSUPERVISED learning is TRUE?

A. Supervised learning has an outcome y. k-means has no y. B. Unsupervised models are judged with a confusion matrix on test data. C. k-means is supervised, because it sorts rows into labeled groups. D. Logistic regression is unsupervised, because it outputs probabilities.

A. Supervised learning has an outcome y. k-means has no y.


X = The information you already know. ( size , bedrooms, location )
Y = The answer you want to predict ( price )

6
New cards

Which statement about DEPENDENT and INDEPENDENT variables is TRUE?

A. A regression model can only have one independent variable at a time. B. In 'y ~ x1 + x2', the dependent variable is on the right of the ~. C. y is what you predict. The x variables are what you predict it with. D. Independent variables must be uncorrelated with each other to be used.

C. y is what you predict. The x variable are what you predict it with.

7
New cards

What does random_state = 42 do in train_test_split?

A. It drops 42 random rows to balance the two classes. B. It tells the model to stop after 42 rounds of training. C. It puts 42% of the rows into the test set. D. It fixes the shuffle, so the split is the same every run.

D. it fixes the shuffle, so the split is the same every run.

8
New cards

In the Framingham split, stratify = df['TenYearCHD'] was used. Why?

A. To move all of the CHD cases into the training set only. B. To keep the same share of CHD cases in training and test. C. To sort the patients by age before splitting them. D. To force the split to be exactly 50/50 by row count.

B. To Keep the same share of CHD cases in training and test.

Stratify = keep the outcome mix the same in each split.

9
New cards

Which statement about R² is TRUE?

A. A high R² shows that the variables cause the outcome to change. B. It is the percent of predictions that are exactly right. C. It can't be computed for models with more than one variable. D. It shows how much the model improves on always guessing the average.

Answer: D


D. it shows how much the model improves on always guessing the average

R = 1 is a perfect fit


R² measures how much better your model performs compared to that simple average-based guess.

10
New cards
Which statement about SSE and SST is TRUE?

A. SSE is for the training data and SST is for the test data.
B. SST should be smaller than SSE for any useful model, on any data.
C. SSE = the model's squared errors. SST = the baseline's squared errors.
D. SSE counts how many variables are statistically significant.

Answer: C Smaller SSE = better model. SST is the "do nothing" error to beat. For test R², SST uses the TRAINING average. Don't mix up: SSE (your model) vs. SST (the baseline).





C. SSE = the model’s squared errors. SST = the baseline’s squared errors

dont mix up : SSE ( your model ) vs. SST ( the baseline ).

11
New cards

Which statement about R² and ADJUSTED R² is TRUE?

A. Adjusted R² always rises when you add any new variable. B. Adjusted R² can fall when you add a variable that doesn't help much. C. Adjusted R² is always larger than the regular R² value. D. Adjusted R² is just the R² computed on the test set instead of training.

B. Adjusted R squared can fall when you add a variable that doesn’t help much.


12
New cards

A regression shows: Price coefficient = −12.4. Which reading is CORRECT?

A. Holding others fixed, +1 in Price goes with 12.4 lower predicted y. B. Raising Price by 1 will cause the outcome to drop by exactly 12.4. C. Price explains 12.4% of the variation in the outcome variable. D. Price matters most, because it has the biggest coefficient.

A. Holding other fixed, +1 in Price goes with 12.4 lower predicted y.



13
New cards

Which statement about a p-value (P>|t|) is TRUE?

A. Below 0.05: the coefficient can be told apart from zero. B. Below 0.05: the effect of the variable is large. C. It is the probability that the variable causes y. D. Above 0.05: this proves the variable has no effect.

A. Below 0.05 : the coefficient can be told apart from zero

14
New cards

Which statement about MULTICOLLINEARITY is TRUE?

A. The outcome y is highly correlated with one of the x variables. B. It is a problem only in logistic regression, not linear regression. C. x variables are highly correlated, so signs can flip and p-values rise. D. It always makes R² drop sharply compared to a simpler model.

C. x variables are highly correlated, so signs can flip and p - values rise.

15
New cards

You want to simplify a regression with several non-significant variables. What should you DO?

A. Remove all the non-significant variables at once. B. Remove one variable at a time and refit each time. C. Remove the variable with the largest coefficient first. D. Keep all of them, since more variables always help on new data.

B. Remove one variable at a time and refit each time.

16
New cards

Which statement about CORRELATION is TRUE?

A. A correlation of 0.9 shows that x causes y. B. A negative correlation is always weaker than a positive one. C. It can be any number, like 15, if the data set is large. D. It runs from −1 to +1, and −0.8 is stronger than 0.3.

D. it runs from -1 to +1, and -0.8 is stronger than 0.3

17
New cards

Which is the right way to put a CATEGORY (like Month or State) into a regression?

A. Code the months as 1 to 12 so the model can rank them. B. Leave it out, because regressions can't use categories. C. Make a dummy for every level, and keep all of them in. D. Use C(Month): each level gets a 0/1 dummy, with one left out.

D. Use C (month) : each level gets 0/1 dummy, with one left out.

18
New cards

Which statement about OUT-OF-SAMPLE (test) R² is TRUE?

A. It is always between 0 and 1, just like training R². B. It can be negative if the model is worse than the training average. C. It is always higher than training R² for a good model, since data is new. D. It uses the test-set average as the baseline in SST.

B. it can be negative if the model is worse than the training average.

19
New cards

Why use LOGISTIC regression instead of linear regression for a yes/no outcome?

A. It keeps predictions between 0 and 1. Linear regression doesn't. B. Logistic regression doesn't need any training data. C. Linear regression can't use more than one variable at once. D. Logistic regression always gives a higher R² than linear.

A. it keeps predictions between 0 and 1. Linear regression doesn’t.

20
New cards

Which statement about a logistic regression COEFFICIENT is TRUE?

A. A negative coefficient means a negative probability. B. Coefficients are probabilities, so they're between 0 and 1. C. A positive coefficient means a higher chance that y = 1. D. A coefficient of 0.08 means an 8% higher probability.

C.A positive coefficient means a higher chance that y = 1.

21
New cards

Which statement about ODDS and PROBABILITY is TRUE?

A. P = 0.5 gives odds of 0.5, since half is half. B. Odds and probability are always the same number. C. Odds must be between 0 and 1, just like probability. D. Odds = P / (1 − P), so P = 0.8 gives odds of 4.

D. Odds = P / ( 1 - P ), so P = 0.8 gives odds of 4.

22
New cards

A logistic model gives logit = 0 for a patient. What is the predicted probability?

A. 1 B. 0.5 C. It can't be found from the logit alone. D. 0

B. 0.5

23
New cards

Which statement about the THRESHOLD (t) is TRUE?

A. It must always be 0.5 for logistic regression. B. Changing it means the model's coefficients get re-estimated. C. Pick it based on which mistake costs more. Default is 0.5. D. Changing it changes the model's AUC.

C. Pick it based on which mistake costs more. Default is 0.5



24
New cards

Which statement about a CONFUSION MATRIX is TRUE?

A. Rows are actual outcomes. Columns are predictions (as in class). B. The diagonal cells (top-left to bottom-right) hold the model's mistakes. C. It is used to evaluate linear regression models. D. The total of all cells equals the number of variables.

A. Rows are actual outcomes. Columns are predictions ( as in class )

25
New cards

A model predicts a patient WILL get CHD, but they DON'T. What is this?

A. A false negative (FN) B. A true positive (TP) C. A false positive (FP) D. A true negative (TN)

C. A false positive (FP)

26
New cards

Which pair is defined CORRECTLY?

A. Precision = FP / (FP + TN). Recall = FN / (FN + TP). B. Precision = TP / (TP + FP). Recall = TP / (TP + FN). C. Precision = TP / (TP + FN). Recall = TP / (TP + FP). D. Precision = (TP + TN) / total. Recall = TN / (TN + FP).

B. Precision = TP / ( TP + FP ). Recall = TP/ ( TP + FN ) .

27
New cards

Which statement about RECALL is TRUE?

A. Recall goes up when you raise the threshold, just like precision does. B. Recall is another name for precision, used in medicine. C. Recall = FP / (FP + TN), the share of real negatives flagged. D. Recall is also called sensitivity, or the true positive rate.

D. Recall is also called sensitivity, or the true positive rate.

28
New cards

When is ACCURACY a misleading way to judge a classifier?

A. When one outcome is rare, so guessing the common one scores high. B. Never, because accuracy counts every correct prediction. C. Whenever you evaluate the model on a test set instead of training data. D. When the two outcomes are about 50/50 in the data.

A. When one outcome is rare, so guessing the common one scores high.

29
New cards

Which statement about the ROC curve is TRUE?

A. A straight diagonal ROC line means a perfect model. B. It plots accuracy against the number of variables used. C. It shows how the model does at a threshold of 0.5 only. D. It plots TPR vs. FPR at every threshold.

D. it plots TPR vs FPR at every threshold.

30
New cards

Model A has AUC = 0.68. Model B has AUC = 0.63. Which is TRUE?

A. Model A will have higher accuracy at every threshold. B. Model A ranks cases from high to low risk better. C. Model B is better, since lower AUC means fewer errors. D. AUCs can't be compared between two different models.

B. Model A ranks cases from high to low risk better.

31
New cards

Which statement about the F1 score is TRUE?

A. It's the simple average, so precision 1.0 and recall 0.0 give 0.5. B. It only uses precision, so it ignores missed cases (recall). C. It's only high when both precision and recall are decent. D. It's another name for accuracy on the test set.

C. It’s only high when both precision and recall are decent.

32
New cards

Which statement about how CART makes a prediction is TRUE?

A. Follow the splits to a leaf. The leaf's share or average is the prediction. B. It needs each variable to have a linear link with y. C. It fits a straight line through the data, like linear regression. D. Every leaf predicts the same overall average of the whole training data set.

A. Follow the splits to a lead. The leaf’s share or average is the prediction.

33
New cards

Which is a real ADVANTAGE of CART over logistic regression?

A. It always beats logistic regression on test accuracy. B. It can never overfit, because it stops on its own. C. It's easy to read, and doesn't assume a linear model. D. It gives a p-value for every variable, like statsmodels.

C. It's easy to read, and doesn't assume a linear model.

34
New cards

Which statement about min_samples_leaf is TRUE?

A. Smaller value → more splits → higher risk of overfitting. B. Larger value → more splits → higher risk of overfitting. C. It has no effect on the shape of the tree. D. It sets how many trees go into a random forest.

A. Smaller value → more splits → higher risk of overfitting.

35
New cards

Which statement about HYPERPARAMETERS is TRUE?

A. They only exist in linear regression, not in trees. B. They should be chosen by checking which value gets the best test-set score. C. They are the coefficients shown in a regression output. D. You set them before training. Coefficients are learned from data.

D. You set them before training. Coefficients are learned from data.

36
New cards

Which statement about K-FOLD CROSS-VALIDATION is TRUE?

A. It replaces the test set, so you never need a final test. B. Each fold takes one turn as validation, then scores are averaged. C. Each data point is used for validation K times, once per fold. D. The TEST set is split into K folds, and each fold is scored once.

B. Each fold takes one turn as validation, then scores are averaged.

37
New cards

What does GridSearchCV do?

A. It picks which variables to keep in a linear regression. B. It draws a grid chart of the data to help you spot patterns between variables. C. It splits the data into a training set and a test set. D. It scores each hyperparameter value with CV and keeps the best.

D. It scores each hyperparameter value with CV and keeps the best.

38
New cards

Which statement about a BOOTSTRAP sample (used in random forests) is TRUE?

A. Rows drawn with replacement, same size, so some repeat. B. A random half of the rows, drawn with no repeats. C. The test set, reused to build each of the trees. D. The exact same sample for every tree in the forest.

A. Rows drawn with replacement, same size, so some repeat.

39
New cards

How does a RANDOM FOREST make a prediction for a new case?

A. It picks one tree at random and uses that tree's answer. B. Every tree votes, and the vote share is compared to a threshold. C. It uses only the single best tree from the whole forest. D. It averages the coefficients of all the trees together into one equation.

B. Every tree votes, and the vote share is compared to a threshold

40
New cards

Which statement about CORRELATION vs. CAUSATION is TRUE?

A. Adding enough controls always gives a causal effect. B. A high R² is enough to show causation. C. A third factor can make two things move together. D. If a coefficient is significant, x causes y.

C. A third factor can make two things move together.

41
New cards

Which statement about a CONFOUNDER is TRUE?

A. It affects both x and y, so it can fake or hide an effect. B. It affects only y, so it doesn't bias the x coefficient. C. It is another name for an instrumental variable. D. Leaving it out of the model makes the x coefficient more accurate.

A. It affects both x and y, so it can fake or hide an effect.

42
New cards

Which statement about ENDOGENOUS vs. EXOGENOUS is TRUE?

A. Endogenous means the variable is measured perfectly. B. Endogenous x is tied to hidden factors, so OLS is biased. C. They mean the same thing in a regression output. D. Exogenous means the variable is statistically significant.

B. Endogenous x is tied to hidden factors, so OLS is biased.

43
New cards

Why does a RANDOMIZED EXPERIMENT give causal answers?

A. It uses more data than any regression can. B. It always produces a higher R² than observational data. C. It doesn't need a control group to compare against. D. Randomizing makes the groups alike except for treatment.

D. Randomizing makes the groups alike except for treatment.

44
New cards

Which statement about the TWO instrument conditions is TRUE?

A. Relevance means Z should have no effect on x at all. B. Exclusion means Z should strongly affect y directly. C. Relevance can be checked in data. Exclusion must be argued. D. Both conditions can be proven in the data with a small p-value.

C. Relevance can be checked in data. Exclusion must be argued.

45
New cards

Which statement about OLS vs. 2SLS (IV regression) is TRUE?

A. OLS always gives a causal effect if the p-value is below 0.05. B. 2SLS just runs the same OLS regression two times in a row. C. 2SLS works without needing any instrument at all. D. 2SLS uses an instrument to fix an endogenous x. OLS doesn't.

D. 2SLS uses an instrument to fix an endogenous x. OLS doesn't.

46
New cards

Which statement about choosing k in k-means is TRUE?

A. A larger k always gives a better clustering. B. k must equal the number of variables in the data. C. You choose k, then check that the clusters make sense. D. k-means automatically finds the right k for you.

C. You choose k, then check that the clusters make sense.

47
New cards

Which statement about a CENTROID is TRUE?

A. It's the average of all the points in its cluster. B. It's the first point picked at random to start. C. It's the point that is farthest from all the others. D. It's the split point used at the top of a tree.

A. It's the average of all the points in its cluster.

48
New cards
Which statement about EUCLIDEAN DISTANCE in clustering is TRUE?

A. It is not affected by the units of the variables (like dollars vs. millions).
B. Smaller distance means more similar observations.
C. Larger distance means more similar observations.
D. It is computed from the dependent variable only.

B. Smaller distance means more similar observations.

49
New cards
Which statement about MONTE CARLO SIMULATION is TRUE?

A. It gives the exact answer from a single random run.
B. It repeats a random process many times to estimate probabilities.
C. It only works with real data that was collected in casinos over many years.
D. It's a type of clustering, similar to k-means.

B. It repeats a random process many times to estimate probabilities.

50
New cards
Which statement about ACTIVATION FUNCTIONS is TRUE?

A. ReLU squeezes every value into the range 0 to 1, just like sigmoid does.
B. Tanh outputs only positive numbers, from 0 to 1.
C. Activation functions are only used in k-means.
D. Sigmoid gives 0 to 1. ReLU is the most common in hidden layers.

D. Sigmoid gives 0 to 1. ReLU is the most common in hidden layers.

51
New cards
Which statement about EPOCHS, STEPS and LOSS is TRUE?

A. One epoch = one full pass through all the training data.
B. More epochs always improve accuracy on new data, since it learns more.
C. One epoch = one small batch of training data.
D. The loss goes up as the model gets better.

A. One epoch = one full pass through all the training data.