src.utils.ftransf.pca_transformer
Classes
|
- class src.utils.ftransf.pca_transformer.PCATransformer(**kwargs)
- Author:
Alberto M. Esmoris Pena
Class for transforming features by projecting them to a lower dimensionality space defined by the singular vectors of the centered matrix of features.
See
FeatureTransformer.- Variables:
out_dim (int or float) – The number of features after the projection, i.e., the dimensionality of the output. It can be given as a float inside [0, 1] that represents how many variance must be preserved (1 preserves the 100%, 0 nothing).
whiten (False) – True to multiply the singular vectors by the square root of the number of points and divide by the corresponding singular value. False otherwise.
random_seed (int) – Optional attribute to specify a fixed random seed for the random computations of the model.
frenames (list) – The names for the output features (it must match the output dimensionality. If None, they will be determined automatically as PCA_{1}, …, PCA_{out_dim}.
pca – The internal PCA model.
- static extract_ftransf_args(spec)
Extract the arguments to initialize/instantiate a PCATransformer.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a PCATransformer.
- __init__(**kwargs)
Initialize/instantiate a PCATransformer.
- Parameters:
kwargs – The attributes for the PCATransformer.
- transform(F, y=None, fnames=None, out_prefix=None)
The fundamental feature transform logic defining the PCA transformer.
See
FeatureTransformerandfeature_transformer.FeatureTransformer.transform().
- get_names_of_transformed_features(**kwargs)
See
FeatureTransformerandfeature_transformer.FeatureTransformer.get_names_of_transformed_features()
- build_new_las_header(pcloud)
See
feature_transformer.FeatureTransformer.build_new_las_header().