Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pca

#if required,do pca 1st 
#then outliers removal then skewness removal

from sklearn.decomposition import PCA
pca=PCA(n_components=20)
pca.fit(df)
x_pca=pca.transform(df)
print(x_pca.shape)
x_pca20=pd.DataFrame(data=x_pca)
x_pca20
Comment

PCA

from sklearn.decomposition import PCA
pca=PCA()
X_red = pca.fit_transform(scale(X))
Comment

pca

Principal Component Analysis (PCA) is a popular technique for analyzing large datasets containing a high number of dimensions/features per observation, increasing the interpretability of data while preserving the maximum amount of information, and enabling the visualization of multidimensional data.
Comment

PREVIOUS NEXT
Code Example
Python :: python 3 slice reverse 
Python :: box plot in seaborn 
Python :: flask run 
Python :: continue python 
Python :: python curl 
Python :: pandas dataframe drop rows with -ve in column value 
Python :: <IPython.core.display.HTML object 
Python :: convert float to string python 
Python :: Difference between two dates and times in python 
Python :: Kivy FileChooser 
Python :: how to print during multiprocessing 
Python :: histogram chart plotly 
Python :: Multidimensional Java Array 
Python :: boxplot python 
Python :: how to find length of list python 
Python :: create a database in python 
Python :: post list python 
Python :: dict get value by index 
Python :: python update header row 
Python :: google assistant in windows 10 
Python :: python gaussian filter 
Python :: fizz buzz in python 
Python :: how to negate a boolean python 
Python :: pyqt setfocus 
Python :: why are my static files not loading in django 
Python :: pytube get highest resolution 
Python :: inconsistent use of tabs and spaces in indentation 
Python :: Python Remove Character from String using replace() 
Python :: error: not well-formed (invalid token) 
Python :: pass args and kwargs to funcitons 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =