Search

# Machine Learning Assignment Help-Top 10 Machine Learning Algorithm | How Become a Data Scientist?

## Machine Learning Algorithms

• Principal Component Analysis(PCA)

• Naïve Bayes Classifier Algorithm

• Least Squares and Polynomial Fitting

• K Means Clustering Algorithm

• Linear Regression

• Logistic Regression

• Artificial Neural Networks

• Decision Trees

• Random Forests

• Nearest Neighbours

# Principal Component Analysis(PCA)

Principal Component Analysis, or PCA for short, is a method for reducing the dimensionality of data.

The PCA method can be described and implemented using the tools of linear algebra.

PCA is an operation applied to a dataset, represented by an n x m matrix A -

### Steps to perform Algorithm:

Step1:

Import all numpy library file related to this like:

from numpy import array

from numpy import mean

from numpy import cov

from numpy.linalg import eig

Step2:

Define a matrix like:

A=array([1,2],[3,4],[5,6])

print(A)

Step3:

Calculate the mean of each column

M=mean(A.T,axis=1)

print(M)

Step4:

Center column using given formula

C=A-M

print(C)

Step5:

Calculate covariance matrix of centered matrix

V=cov(C.T)

print(V)

Step6:

Igen decomposition of covariance matrix

value,vectors=eig(V)

print(vectors)

print(values)

Step7:

Then finally we find the Project data

P = vectors.T.dot(C.T)

print(P.T)

## Reusable PCA

Using the PCA() class in the scikit-learn library it it can be applied to new data again and again quite easily.

If you need any help related to Machine learning Algorithm or Assignment Help contact at below link.

If you like Codersarts blog and looking for Assignment help,Project help, Programming tutors help and suggestion  you can send mail at contact@codersarts.com.

Please write your suggestion in comment section below if you find anything incorrect in this blog post.

### Recent Posts

See All

#### Java Hibernate Project Assignment Help

Tel: (+91) 0120  4118730

Time :   10 : 00  AM -  08 : 00 PM IST