watex.analysis.pcavsfa#
- watex.analysis.pcavsfa(X, rank=10, sigma=1.0, n_components=5, random_state=42, verbose=0, view=False)[source]#
Compute PCA score and Factor Analysis scores from training X and compare probabilistic PCA and Factor Analysis models.
- 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.
rank (int, default{10}) – Bounding for ranking
sigma (float, default {1.}) – data pertubator ratio for adding heteroscedastic noise
random_state (int , default {42}) – Determines random number generation for dataset shuffling. Pass an int for reproducible output across multiple function calls.
verbose (int, default is
0) – Control the level of verbosity. Higher value lead to more messages.
- Returns
Scores from PCA and FA from transformed X
- Return type
Tuple (pca_scores, fa_scores)