Created
May 23, 2020 00:48
-
-
Save maskaravivek/9baae5b20ae914ab73cc42ca224a4dc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
featureMatrix = normalize(featureMatrix); % Normalize the feature matrix | |
% No of dimensions to keep | |
numberOfDimensions = 5; | |
[COEFF, SCORE, LATENT, TSQUARED, EXPLAINED] = pca(featureMatrix); % Perform PCA analysis | |
reducedDimension = COEFF(:,1:numberOfDimensions); | |
reducedFeatureMatrix = featureMatrix * reducedDimension; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment