drcme.spca.spca_transform_new_data¶
- drcme.spca.spca_transform_new_data(spca_results, new_data, spca_zht_params, orig_mean, orig_std, pev_threshold=0.01)[source]¶
Transform and z-score new data with existing loadings
Results from new data are z-scored with original mean and standard deviation so that they are directly comparable to values in spca_results.
- Parameters
spca_results (dict) – Output of
spca_on_all_data()
with original loadings to be applied to new_datanew_data (dict) – Dictionary of data sets for transformation
orig_mean (array) – Mean values of original sPCs before z-scoring
orig_std (array) – Standard deviations of sPCs before z-scoring
pev_threshold (float, optional) – Minimum adjusted explained variance level (default 0.01) to retain sPCs
- Returns
Transformed and z-scored sPC values
- Return type
array