Search
 
SCRIPT & CODE EXAMPLE
 

CPP

apply pca to dataframe

import pandas as pd
import numpy as np
from sklearn.decomposition import PCA

df = pd.DataFrame(data=np.random.normal(0, 1, (20, 10)))

pca = PCA(n_components=5)
pca.fit(df)
Comment

PREVIOUS NEXT
Code Example
Cpp :: C++ Multi-line comments 
Cpp :: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. 
Cpp :: delete file cpp 
Cpp :: queue implementation using linked list in cpp 
Cpp :: how to use string variable in switch case in c++ 
Cpp :: default access modifier in c++ 
Cpp :: factorial using recursion cpp 
Cpp :: c++ program to take input from user 
Cpp :: how to find length of character array in c++ 
Cpp :: prints out the elements in the array c++ 
Cpp :: cpp case 
Cpp :: time function c++ 
Cpp :: c++ struct with default values 
Cpp :: print vector of vector c++ 
Cpp :: sort vector using marge sorting in c++ 
Cpp :: how to check if a number is prime c++ 
Cpp :: const char to string 
Cpp :: convert refference to pointer c++ 
Cpp :: less than operator overloading in c++ 
Cpp :: What is the story of c++ 
Cpp :: concatenate string program in c++ 
Cpp :: how to send email in c++ program 
Cpp :: check if a string is palindrome cpp 
Cpp :: how to sort a string alphabetically in c++ 
Cpp :: check if set contains element c++ 
Cpp :: std vector c++ 
Cpp :: c++ rand include 
Cpp :: concatenate two vectors c++ 
Cpp :: c++ input 
Cpp :: integer range in c++ 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =