MODULE REFERENCE
pca
anomx.models.reconstruction.pcaReconstruction-based anomaly model.
classView source ↗
PcaReconstructionModel
PcaReconstructionModel(config: dict[str, Any] | None = None)Bases: NormalityModel, Reconstructive
Project numeric features into a low-rank space and score reconstruction error.
| Parameter | Type | Default |
|---|---|---|
config | dict[str, Any] | None | None |
Members
component_keyattribute
component_key = 'pca_reconstruction'component_iconattribute
component_icon = 'Cube01'signatureattribute
signature = ModelSignature(structures={DataStructure.TABULAR, DataStructure.TEMPORAL_SEQUENCE}, modalities={Modality.NUMERIC})component_nameattribute
component_name = 'PCA Reconstruction'component_default_configattribute
component_default_config = {'feature_columns': [], 'n_components': 2}component_config_schemaattribute
component_config_schema = {'feature_columns': {'type': 'array'}, 'n_components': {'type': 'integer'}}fitmethod
fit(data: Any) -> None| Parameter | Type | Default |
|---|---|---|
data | Any | required |
Returns None
predictmethod
predict(data: Any) -> pd.DataFrame| Parameter | Type | Default |
|---|---|---|
data | Any | required |
Returns pd.DataFrame
savemethod
save(path: str) -> None| Parameter | Type | Default |
|---|---|---|
path | str | required |
Returns None
loadmethod
load(path: str) -> PcaReconstructionModel| Parameter | Type | Default |
|---|---|---|
path | str | required |
Returns PcaReconstructionModel
Inherited members
partial_fitNormalityModelscore_batchNormalityModelis_component_abstractBaseComponentget_component_typeBaseComponentget_component_keyBaseComponentget_component_nameBaseComponentget_component_docsBaseComponentget_component_descriptionBaseComponentget_component_iconBaseComponentget_component_image_pathBaseComponentget_component_statusBaseComponentget_component_default_configBaseComponentget_component_config_schemaBaseComponentget_component_code_versionBaseComponentget_component_source_pathBaseComponentget_component_import_pathBaseComponentget_component_capabilitiesBaseComponentget_component_signatureBaseComponentget_component_parametersBaseComponentget_configBaseComponentreconstructReconstructiveget_capability_keyCapability