Code covered by the BSD License  

Highlights from



Devinder (view profile)


this implements the PCA algorithm. User can choose/input the no.of features in the reduced Dataset.

%% =============== Program to Implement PCA ===============================

%this program implements pca along with it gives reduced dataset in terms
% of required mo. of features/dimesions
%for any query please contact:
% Devinder Kumar at
% X_reduce: Dataset with reduced dimensions ( here its 100 )
% please Note that here the dataset used i.e. faces.mat is cropped version
% of the orginal labeled faces in
% the wild dataset

close all; clc; clear;
fprintf('Loading Dataset ....\n')

load ('face.mat');
fprintf('Orignal dimensions/features in dataset for each example\n')
fprintf('implementing PCA ..\n')

[x_norm, mu, sigma] = featureNormalize(x);

[U,S,X_reduce]= pca(x_norm,10);
fprintf('Now the no. of dimesions/features in each instance of dataset is:\n')

Contact us