Skip to content

Commit

Permalink
Add docstring for getPCs.m
Browse files Browse the repository at this point in the history
  • Loading branch information
blairkan committed Sep 14, 2018
1 parent 3b0b496 commit ee47810
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/Classification/getPCs.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@
%-------------------------------------------------------------------
% y = getPCs(X, PCs)
%-------------------------------------------------------------------
% Function to extract principal componenets via singular value
% decomposition
% Function to compute principal componenets via singular value
% decomposition. For input matrix of dimensions trial by feature, PCA is
% computed along the feature dimensions (enabling reduction of the data
% matrix along the column dimension).
%
% INPUT ARGS:
% X - training data matrix
% PCs - if value is a positive integer, either number of PCs to extract based on significance , or variance explained by PCs if value
% between 0 and 1
% X - full data matrix. Rows are trials, columns are features.
% PCs - specification of how many PCs to retain.
% - if value is a positive integer, that number of PCs will be
% retained in theoutput matrix.
% - if value is greater than zero but less than one, the number
% of PCs needed to explain this proportion of variance will be
% retained in the output matrix.
%
% OUTPUT ARGS:
% y - training data matrix with only principal compenents
% y - Data matrix with only the specified number of PCs (columns)
% retained.
%
% EXAMPLES:

Expand Down

0 comments on commit ee47810

Please sign in to comment.