updating dim red stuff
This commit is contained in:
@@ -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 =====
|
||||
|
||||
Reference in New Issue
Block a user