ComponentChooser
- class lightning_pose.utils.pca.ComponentChooser[source]
Bases:
objectDetermine the number of PCA components to keep.
Attributes Summary
Methods Summary
__call__()Call self as a function.
Attributes Documentation
- cumsum_explained_variance
Methods Documentation
- __init__(fitted_pca_object: PCA, components_to_keep: int | float | None) None[source]
Initialize ComponentChooser.
- Parameters:
fitted_pca_object – a fitted
sklearn.decomposition.PCAorNaNPCAinstance whoseexplained_variance_ratio_attribute is used to select the number of components.components_to_keep – criterion for selecting components. An
intreturns that exact count; afloatin[0, 1]returns the minimum number of components needed to reach that cumulative explained-variance threshold;Nonekeeps all components.
- __new__(**kwargs)