watex.analysis.compute_scores#
- watex.analysis.compute_scores(X, n_features, n_components=5)[source]#
Compute PCA score and Factor Analysis scores from training X.
- Parameters
X (Ndarray of shape ( M x N), \(M=m-samples\) & \(N=n-features\)) β training set; Denotes data that is observed at training and prediction time, used as independent variables in learning. The notation is uppercase to denote that it is ordinarily a matrix. When a matrix, each sample may be represented by a feature vector, or a vector of precomputed (dis)similarity with each training sample.
Xmay also not be a matrix, and may require a feature extractor or a pairwise metric to turn it into one before learning a model.n_features (int,) β number of features that composes X
n_components (int, default {5}) β number of component to retrieve.
- Returns
Scores from PCA and FA from transformed X
- Return type
Tuple (pca_scores, fa_scores)