Final (1) Flashcards
(13 cards)
What does StandardScaler do?
Scales features to mean 0 and variance 1.
What does RobustScaler do?
Scales features using median and IQR (median = 0, IQR = 1).
What does MinMaxScaler do?
Scales features to a range between 0 and 1.
What does Normalizer do?
Scales each row to have unit norm (length of 1).
When do you use Ordinal Encoding?
For ordered categorical values.
When do you use One Hot Encoding?
For nominal (unordered) categorical values.
What tool helps apply both encoding and scaling?
ColumnTransformer
What is “Bag of Words”?
A method that converts text to numerical data by counting word frequency.
What does PCA do?
Reduces the number of features and can also de-noise data.
What is linear regression’s number of hyperparameters?
None
What does Ridge regression add?
L2 regularization via alpha.
What does Lasso regression add?
L1 regularization via alpha, can shrink some coefficients to zero.
What does a large alpha mean?
More regularization and simpler models.