Skip to content

Commit 01ad351

Browse files
committed
Pushing the docs to dev/ for branch: master, commit 5311c81769326fbf5c8f63eb94e1886208ab87fc
1 parent 3559c0c commit 01ad351

File tree

1,022 files changed

+3133
-3133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,022 files changed

+3133
-3133
lines changed
1 Byte
Binary file not shown.
1 Byte
Binary file not shown.

dev/_downloads/plot_scaling_importance.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Importance of Feature Scaling\n\n\nFeature scaling though standardization (or Z-score normalization)\ncan be an important preprocessing step for many machine learning\nalgorithms. Standardization involves rescaling the features such\nthat they have the properties of a standard normal distribution\nwith a mean of zero and a standard deviation of one.\n\nWhile many algorithms (such as SVM, K-nearest neighbors, and logistic\nregression) require features to be normalized, intuitively we can\nthink of Principle Component Analysis (PCA) as being a prime example\nof when normalization is important. In PCA we are interested in the\ncomponents that maximize the variance. If one component (e.g. human\nheight) varies less than another (e.g. weight) because of their\nrespective scales (meters vs. kilos), PCA might determine that the\ndirection of maximal variance more closely corresponds with the\n'weight' axis, if those features are not scaled. As a change in\nheight of one meter can be considered much more important than the\nchange in weight of one kilogram, this is clearly incorrect.\n\nTo illustrate this, PCA is performed comparing the use of data with\n:class:`StandardScaler <sklearn.preprocessing.StandardScaler>` applied,\nto unscaled data. The results are visualized and a clear difference noted.\nThe 1st principal component in the unscaled set can be seen. It can be seen\nthat feature #13 dominates the direction, being a whole two orders of\nmagnitude above the other features. This is contrasted when observing\nthe principal component for the scaled version of the data. In the scaled\nversion, the orders of magnitude are roughly the same across all the features.\n\nThe dataset used is the Wine Dataset available at UCI. This dataset\nhas continuous features that are heterogeneous in scale due to differing\nproperties that they measure (i.e alcohol content, and malic acid).\n\nThe transformed data is then used to train a naive Bayes classifier, and a\nclear difference in prediction accuracies is observed wherein the dataset\nwhich is scaled before PCA vastly outperforms the unscaled version.\n\n\n"
18+
"\n# Importance of Feature Scaling\n\n\nFeature scaling through standardization (or Z-score normalization)\ncan be an important preprocessing step for many machine learning\nalgorithms. Standardization involves rescaling the features such\nthat they have the properties of a standard normal distribution\nwith a mean of zero and a standard deviation of one.\n\nWhile many algorithms (such as SVM, K-nearest neighbors, and logistic\nregression) require features to be normalized, intuitively we can\nthink of Principle Component Analysis (PCA) as being a prime example\nof when normalization is important. In PCA we are interested in the\ncomponents that maximize the variance. If one component (e.g. human\nheight) varies less than another (e.g. weight) because of their\nrespective scales (meters vs. kilos), PCA might determine that the\ndirection of maximal variance more closely corresponds with the\n'weight' axis, if those features are not scaled. As a change in\nheight of one meter can be considered much more important than the\nchange in weight of one kilogram, this is clearly incorrect.\n\nTo illustrate this, PCA is performed comparing the use of data with\n:class:`StandardScaler <sklearn.preprocessing.StandardScaler>` applied,\nto unscaled data. The results are visualized and a clear difference noted.\nThe 1st principal component in the unscaled set can be seen. It can be seen\nthat feature #13 dominates the direction, being a whole two orders of\nmagnitude above the other features. This is contrasted when observing\nthe principal component for the scaled version of the data. In the scaled\nversion, the orders of magnitude are roughly the same across all the features.\n\nThe dataset used is the Wine Dataset available at UCI. This dataset\nhas continuous features that are heterogeneous in scale due to differing\nproperties that they measure (i.e alcohol content, and malic acid).\n\nThe transformed data is then used to train a naive Bayes classifier, and a\nclear difference in prediction accuracies is observed wherein the dataset\nwhich is scaled before PCA vastly outperforms the unscaled version.\n\n\n"
1919
]
2020
},
2121
{

dev/_downloads/plot_scaling_importance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Importance of Feature Scaling
66
=========================================================
77
8-
Feature scaling though standardization (or Z-score normalization)
8+
Feature scaling through standardization (or Z-score normalization)
99
can be an important preprocessing step for many machine learning
1010
algorithms. Standardization involves rescaling the features such
1111
that they have the properties of a standard normal distribution

dev/_downloads/scikit-learn-docs.pdf

-2.87 KB
Binary file not shown.
326 Bytes
326 Bytes
-470 Bytes
-470 Bytes
-525 Bytes

0 commit comments

Comments
 (0)