hwm API Reference¶
Overview¶
The hwm package is a comprehensive package for nonlinear dynamic modeling and analysis,
primarily focusing on regression and classification within time-dependent and complex data scenarios.
The package provides robust tools for working with datasets, machine learning estimators,
and custom evaluation metrics, supporting a range of applications in fields such as
system dynamics, financial forecasting, and geophysical analysis.
Subpackages¶
api: Provides core API functionalities and property management.
compat: Compatibility layer to ensure integration with Scikit-learn utilities and functions.
datasets: A collection of synthetic datasets to support experimentation, benchmarking, and practice.
estimators: Advanced machine learning estimators for handling regression and classification tasks in dynamic systems.
utils: Utility functions and helper modules for data transformation, context management, validation, and more.
metrics: Custom evaluation metrics and performance measures designed for tracking model stability and accuracy.
Usage¶
To use the functionalities provided by hwm, import the required subpackage or module:
import hwm
from hwm.estimators import HammersteinWienerRegressor
from hwm.datasets import make_system_dynamics
from hwm.metrics import prediction_stability_score
Each subpackage is designed to integrate seamlessly into data science workflows, making it easier to analyze complex datasets, create advanced machine learning models, and evaluate model performance. Whether conducting dynamic system modeling or applying nonlinear transformations, the hwm library provides tools to streamline these tasks.
hwm.api: Core API Functionality¶
The hwm.api module provides essential API functions and property management tools for handling core functionalities within the hwm package. This includes attribute handling and dynamic property management across various model implementations.
User guide: Refer to the api section for detailed usage and examples.
hwm.compat: Compatibility Layer¶
The hwm.compat module offers compatibility with external packages, particularly Scikit-learn, to ensure seamless integration and interoperability. It includes functions and classes that adapt Scikit-learn components for enhanced functionality in hwm.
Provides compatibility utilities for different versions of scikit-learn (sklearn). It includes functions and feature flags that ensure smooth operation across various sklearn versions, handling breaking changes and deprecated features. The module includes resampling utilities, scorer functions, and compatibility checks.
Key functionalities include: - Resampling with sklearn’s resample - Validation with check_is_fitted - Scorer retrieval with get_scorer - Feature and compatibility flags for sklearn versions
The module ensures compatibility with sklearn versions less than 0.22.0, 0.23.0, and 0.24.0.
- hwm.compat.sklearn.SKLEARN_VERSION¶
The installed scikit-learn version.
- Type:
packaging.version.Version
- hwm.compat.sklearn.SKLEARN_LT_0_22¶
True if the installed scikit-learn version is less than 0.22.0.
- Type:
- hwm.compat.sklearn.SKLEARN_LT_0_23¶
True if the installed scikit-learn version is less than 0.23.0.
- Type:
- hwm.compat.sklearn.SKLEARN_LT_0_24¶
True if the installed scikit-learn version is less than 0.24.0.
- Type:
- hwm.compat.sklearn.Functions¶
- ---------
User guide: See the compat section for more information.
hwm.datasets: Dataset Collection¶
The hwm.datasets subpackage provides synthetic datasets that allow users to experiment with and benchmark machine learning models. These datasets are designed for training, testing, and evaluating models within the hwm framework, supporting use cases in dynamic systems, financial trends, and more.
User guide: See the datasets section for dataset details and usage.
hwm.estimators: Advanced Estimators¶
The hwm.estimators module provides machine learning estimators specialized for dynamic systems. Key models include the Hammerstein-Wiener regression and classification models, which combine nonlinear and linear components to handle time-dependent and complex data.
Dynamic system implements various dynamic system models for classification and regression tasks within the gofast library. These models are designed to handle complex, time-dependent data by combining dynamic system theory with machine learning techniques.
User guide: See the estimators section for in-depth model documentation.
hwm.metrics: Evaluation Metrics¶
The hwm.metrics module includes specialized evaluation metrics that measure model stability, accuracy, and other performance aspects. These metrics are particularly useful for models applied to dynamic systems and time-series data, providing insights into prediction consistency and temporal stability.
User guide: See the metrics section for metric descriptions and examples.
hwm.utils: Utilities and Helper Functions¶
The hwm.utils subpackage offers a range of utility functions and helper modules for common data processing tasks, including validation, context management, and array operations. These utilities support efficient data handling and preprocessing, helping users streamline their workflows within the hwm ecosystem.
User guide: See the utils section for detailed information on utility functions.