Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

DSCI 100 COMPREHENSIVE ANSWERS AND QUESTIONS SET A.pd

Document preview thumbnail
Preview 2 out of 12 pages

DSCI 100 COMPREHENSIVE ANSWERS AND QUESTIONS SET A.pd

Content preview

DSCI 100 COMPREHENSIVE ANSWERS AND
QUESTIONS SET A+
✔✔evaluate classifier without collecting more data - ✔✔split into training set and testing
set
- only use training set when building the classifier

✔✔What does prediction accuracy calculation assess? - ✔✔It assesses how well our
predictions match the actual labels for the observations in the test set.

✔✔How is prediction accuracy calculated? - ✔✔It is calculated by dividing the number
of correct predictions by the total number of predictions.

✔✔What is a confusion matrix used for? - ✔✔To gain a more comprehensive view of
performance.

✔✔What does a confusion matrix show? - ✔✔How many test set labels of each type are
predicted correctly and incorrectly.

✔✔What is precision in the context of a confusion matrix? - ✔✔Quantifies how many
positive predictions were actually positive.

✔✔What is recall in the context of a confusion matrix? - ✔✔Quantifies how many
positive observations were correctly identified as positive.

✔✔What is the purpose of set.seed in programming? - ✔✔To ensure the result can be
reproduced.

✔✔What happens if the seed value is the same in set.seed? - ✔✔The result will be the
same.

✔✔How does set.seed help with randomness in analysis? - ✔✔It helps ensure the
analysis is fair, unbiased, and not influenced by human input.

, ✔✔cross validation - ✔✔for choosing the best K value
- split the data into validation set and training set

✔✔8 step for KNN classification - ✔✔1. use initial_split to split data into training and
testing set
2. use vfold_cv to split training set for cross-validation
3. create a recipe to specify class label and predictors, preprocess data
4. create a nearest_neighbors model spec, with neighbors - tune()
5. add recipe and model spec to a workflow() and use tune_grid to estimate classifier
accuracy for K values
6. pick a K
7. make a new model spec with K value, and restrain using fit
8. evaluate accuracy using the predict function

✔✔pros and cons of KNN - ✔✔pros
- simple intuitive algorithm
- requires few assumptions about what the data must look like
- works for binary and multi-class classification problems
cons
- becomes very slow with large data sets
- may not perform well with a lot of predictors
- may not perform well when classes are imbalanced

✔✔difference between regression and classification - ✔✔classifications predict
categorical values
regressions predict numerical values

✔✔What is overfitting in machine learning? - ✔✔Overfitting occurs when a model is
influenced too much by the training data.

✔✔What is a consequence of overfitting? - ✔✔A model that overfits will not make
accurate predictions on new data.

✔✔underfitting - ✔✔the model is not influenced enough by the training data

✔✔pros and cons of knn regression - ✔✔pros
- simple, intuitive algorithm
- requires few assumptions about what the data must look like
- works well with non-linear relationships cons
- becomes very slow as the training data gets larger
- may not perform well with a large number of predictors
- may not predict well beyond the range of values input in your training data

✔✔linear regression - ✔✔when there is a big training set the line we draw should
minimize the average squared vertical distance

Document information

Uploaded on
September 1, 2026
Number of pages
12
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$18.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BOARDWALK
3.5
(41)
Sold
287
Followers
11
Items
36042
Last sold
1 hour ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions