PCA
Bases: BaseReduction
Principal Component Analysis (PCA) class.
Attributes: |
|
---|
Methods:
Name | Description |
---|---|
fit |
data: xr.Dataset, vars_to_stack: List[str], coords_to_stack: List[str], pca_dim_for_rows: str, window_in_pca_dim_for_rows: List[int] = [0], value_to_replace_nans: float = None, |
) -> None |
|
transform |
|
fit_transform |
data: xr.Dataset, vars_to_stack: List[str], coords_to_stack: List[str], pca_dim_for_rows: str, window_in_pca_dim_for_rows: List[int] = [0], value_to_replace_nans: float = None, |
) -> xr.Dataset |
|
inverse_transform |
|
__init__(n_components=0.98, is_incremental=False)
Initialize the PCA class.
Parameters: |
|
---|
Raises: |
|
---|
fit(data, vars_to_stack, coords_to_stack, pca_dim_for_rows, window_in_pca_dim_for_rows=[0], value_to_replace_nans=None)
Fit PCA model to data.
Parameters: |
|
---|
fit_transform(data, vars_to_stack, coords_to_stack, pca_dim_for_rows, window_in_pca_dim_for_rows=[0], value_to_replace_nans=None)
Fit and transform data using PCA model.
Parameters: |
|
---|
Returns: |
|
---|
inverse_transform(PCs)
Inverse transform data using the fitted PCA model.
Parameters: |
|
---|
Returns: |
|
---|
transform(data)
Transform data using the fitted PCA model.
Parameters: |
|
---|
Returns: |
|
---|
PCAError
Bases: Exception
Custom exception for PCA class.