# #2 Dimensionality Reduction

--

With the rise of more and more dimension we may face curse of dimensionality problem. In order to overcome the issue, we need to come up with this dimension reducing approach. It simply means to reduct the number of input variables for a dataset.

We can consider the columns of data representing dimensions on an *n*-dimensional feature space and the rows of data as points in that space. This is a useful geometric interpretation of a dateset.

example: Having the large number of dimension denote we have large volume and thus, the elements or points are much and much smaller. It is psychology same where when we think earth as volume human are small. But if you assume universe as volume the human are minute and smaller than before.

Understood> ?

<if false: #2 Dimensionality reduction else:continue;>

Based upon the linear algebra, this is called as feature projection and algo as projection methods.

moving on,

Projection methods seek to reduce the number of dimensions in the feature space whilst also preserving the most important structure or relationships between the variables observed in the data.

The most common approach to dimensionality reduction is called principal components analysis or PCA.

## PCA Scikit-learn

from sklearn.decomposition import PCA

pca = PCA()

pca.fit(data)

transformed = pca.transform(data)

The ouptuts are then used to train the model