[KongchangAI]
Concept

StandardScaler

A standardization transformer in scikit-learn that subtracts the mean and divides by the standard deviation for each feature, bringing the data into conformity with a standard normal distribution.

Timeline (last 90 days)

Nov 16

When standardizing, fit_transform must be called only on the training set to compute the mean and standard deviation, and then the same parameters must be used to transform the test set; otherwise, test set information will leak into the training process, causing overly optimistic performance evaluation.

Unverified50%
Nov 16

In SVM, standardization is a crucial preprocessing step, because the optimization objective of SVM depends on the Euclidean distances between sample points; if the feature scales differ greatly, the distance computation will be dominated by features with large numerical ranges.

Unverified50%
Oct 21

A typical way to write a Pipeline in scikit-learn is Pipeline([('scaler', StandardScaler()), ('clf', SVC())]), after which fit and predict can be called directly on the pipeline.

Unverified50%
Oct 12

The correct approach is to perform train_test_split first, then fit the scaler only on the training set, and subsequently use the same scaler to transform the test set.

Unverified50%
Sep 21

StandardScaler in scikit-learn can complete the standardization transformation in one step.

Unverified50%
Aug 26

Performing StandardScaler normalization on the entire dataset before the train/test split causes the mean and variance information of the test set to leak into the training set.

Unverified50%
Aug 25

Performing StandardScaler normalization on the entire dataset before the train/test split causes the mean and variance information of the test set to leak into the training set, constituting data leakage.

Unverified60%

All Facts (7)

Source Articles