- Fork and Clone
- Work on quiz
- Push back up to your repository
- A vector is given,
[2,3,9]
. What's the norm?
9.7 --- np.linalg.norm
- I have a biased coin. P(T) = 0.45. What's the probability, if I flip the coin 100 times, that I will get exactly 14 heads?
binom(100, 0.55).pmf(14)
- What is the rank of a matrix?
Checking to see if the rows/cols are linearly independent?
- Why is rank important for Linear Regression?
Checking for co-linearity.
- What is the purpose of the sigmoid function in a Logistic Regression model?
Gives your probability value. Log odds is the input.
- What is bias vs variance?
Bias is prediction differs from true value, Variance is the spead of the data from the mean.
- What is a hyperparameter? What part of the dataset (train, validation or test) is responsible for determining this value?
It is parameter to your model, before you fit the data. Train data set.
- Model selection via cross validation. What part of the dataset (train, validation or test) is responsible for choosing the best model?
Validation data set.
- What is parametric vs non-parametric model?
Parametric has fixed number of parameters.
- What models do you need to scale the data prior to fitting?
When using distance metric ... km to um ... sensitive to scale. (lin reg, log, nn)
Invariant to scale are Trees.
MinMaxScaling = 0 to 1 StandardScaling = mean of 0, stdev 1
- What is entropy? Which model uses this concept?
Measure of disorder. Trees.
- How is a random forest generated?
Sampling with replacement - bagging Split on not all featurs = sqrt of n
- How do you determine the correct number of clusters when using KMeans?
Elbow method.
- What is a dendrogram / what is it used for?
A dendrogram is a type of tree diagram showing hierarchical clustering — relationships between similar sets of data.
Used to pick the number of clusters.
- What is linkage and what are the types?
Linkage is the distance between clusters. Simple, Complete, Average, and Centroid Methods are the main versions.
- How does a recommender model work?
Matrix factorization (non-negative). User and (Item or Movie). Latent hidden features.
UxI = M
- How can you reduce the number of features in a model?
L1 (lasso), PCA, Tree (feature importance)
- What is a good use of PCA?
Visualization, feature reduction
- In general, how do neural networks "learn"?
Back propagation.
- What is your favorite model? Why?
Whichever gives best score - Rajani