drcme.load_data.define_spca_parameters¶
- drcme.load_data.define_spca_parameters(filename)[source]¶
Load an sPCA parameters file
The parameters file should be a set of keys with dictionaries as their values. Each dictionary must contain the following keys:
n_components: Number of components
nonzero_component_list: List of the number of non-zero loadings for each component
use_corr: Whether to scale the data by its standard deviation (true/false)
range: If null, all indices will be used. If a pair of values, the first value represents the first index and the second represents the index just after the last point (as in Python’s slicing notation). If more than two, the first of each pair is the start index and the second is the index just after the end (this allows sections of the full feature vector to be excluded).
The range is expanded into a list of indices by this function.
- Parameters
filename (str) – Path to JSON file with sPCA parameters
- Returns
Contains key/tuple pairs. The tuple has the format (n_components, nonzero_component_list, use_corr, indices).
- Return type
dict