From f3d449008299d285d59b039a5d8bb287aede639f Mon Sep 17 00:00:00 2001 From: mhjensen Date: Thu, 10 Oct 2019 13:12:24 +0200 Subject: [PATCH] updating dim red stuff --- doc/src/DimRed/DimRed.do.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/src/DimRed/DimRed.do.txt b/doc/src/DimRed/DimRed.do.txt index e3981c5ca..e5e26c239 100644 --- a/doc/src/DimRed/DimRed.do.txt +++ b/doc/src/DimRed/DimRed.do.txt @@ -1,4 +1,4 @@ -TITLE: Data Analysis and Machine Learning: Dimensionality Reduction +TITLE: Data Analysis and Machine Learning: Preprocessing and Dimensionality Reduction AUTHOR: Morten Hjorth-Jensen {copyright, 1999-present|CC BY-NC} at Department of Physics, University of Oslo & Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University DATE: today @@ -19,6 +19,23 @@ reduction techniques: the principal component analysis PCA, Kernel PCA, and Loca !eblock +!split +===== Preprocessing our data ===== +!bblock + +Before we proceed however, we will discuss how to preprocess our +data. Till now and in connection with project 1 not met so many cases +where we are too sensitive to the scaling of our data. Normally the +data may need a rescaling and/or may be sensitive to extreme +values. Scaling the data renders our inputs much more suitable for the +algorithms we want to emply. + +_Scikit-Learn_ has several functions which allow us to rescale the data, normally resulting in much better results in terms of various accuracy scores. The _StandardScaler_ function in _Scikit-Learn_ ensures that for each feature/predictor we study the mean value is zero and the variance is zero (every column in the design/feature matrix). +This scaling has the drawback that it does not ensure that we have a particular maximum or minumum in our data set. Another function included in _Scikit-Learn_ is the _MinMaxScaler_ which ensures that all features are exactly between $0$ and $1$. The _Normalizer_ function scale each column of the design matrix so that + +!eblock + + !split ===== Principal Component Analysis =====