HWM: Adaptive Hammerstein-Wiener Modeling Toolkit
HWM is a Python toolkit for adaptive dynamic system modeling, designed to capture complex nonlinear and linear relationships in data through the Hammerstein-Wiener architecture. With a flexible, modular design, HWM integrates seamlessly with Scikit-learn, enabling streamlined workflows for regression, classification, and time-series forecasting tasks.
🚀 Key Features
- Adaptive Hammerstein-Wiener Models: Supports both regression and classification with customizable nonlinear and dynamic components.
- Time-Series and Dynamic System Modeling: Tools for handling sequence-based and time-dependent data.
- Scikit-Learn Compatible API: Designed to integrate easily with Scikit-learn workflows.
- Flexible Metrics and Utilities: Custom metrics like
prediction_stability_scoreandtwa_scorefor model evaluation, along with data handling utilities.
📦 Installation
HWM requires Python 3.9 or later. Install it from PyPI using pip:
pip install hwm
For detailed installation instructions, refer to the Installation Guide.
🏁 Getting Started
🔍 Example: Classification with Hammerstein-Wiener Model
import numpy as np
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from hwm.estimators import HWClassifier
from hwm.metrics import prediction_stability_score
# Generate synthetic data
X, y = make_classification(n_samples=10000, n_features=20)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
# Initialize the model
hw_model = HWClassifier(
nonlinear_input_estimator=StandardScaler(),
nonlinear_output_estimator=StandardScaler(),
p=2,
loss="cross_entropy",
max_iter =10
)
# Train and evaluate
hw_model.fit(X_train, y_train)
y_pred = hw_model.predict(X_test)
stability_score = prediction_stability_score(y_pred)
print(f"\nPrediction Stability Score: {stability_score:.4f}")
For more usage examples, see the Examples Page.
📖 Documentation
Comprehensive documentation is available on Read the Docs. Key sections include:
- API Documentation: Detailed reference for all modules and functions.
- User Guide: Step-by-step guidance for using HWM.
- Installation Guide: Complete installation instructions.
🔗 Project Links
- Documentation: hwm.readthedocs.io
- Source Code: GitHub Repository
- Issue Tracker: GitHub Issues
- Download: PyPI Downloads
🤝 Contributing
We welcome contributions! Please submit issues or pull requests via our GitHub repository. For major changes, discuss your ideas in the issues section first to align with project goals.
👨💼 Maintainers
- Laurent Kouadio
- Email: etanoyau@gmail.com
📝 License
HWM is licensed under the BSD-3-Clause license. See the LICENSE file for details.
🏷️ Keywords
machine learning, dynamic systems, regression,
classification, time-series, Scikit-learn compatible
For additional resources, visit the User Guide and explore our rich tools for dynamic system modeling and time-series analysis. A practical example of network intrusion detection is the use of KDD Cup 1999 dataset.
Metadata
Release files for hwm 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hwm-1.1.4.tar.gz | 100.1 kB | Without provenance | Details for hwm-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hwm-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for hwm-1.1.4-py3-none-any.whl |
Total release size: 199.0 kB
Release files / hwm-1.1.4.tar.gz
| Download URL | hwm-1.1.4.tar.gz |
|---|---|
| Size | 100.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65d481821c653baff10c617a5acc0e24c9b30ef1e4a61d211b65078725d98856
|
|
BLAKE2b-256 checksum How to use checksums |
634c2f65d50130523f2e5b7e9dbe228123d427112d42e71fee3f11d1bf707c88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / hwm-1.1.4-py3-none-any.whl
| Download URL | hwm-1.1.4-py3-none-any.whl |
|---|---|
| Size | 98.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d763cdca14ec7e3588f6ad9b4a8e570a524d62da23775469b3d761292fc4fcb
|
|
BLAKE2b-256 checksum How to use checksums |
b46f86381897424ecbc1d5c9a99b173a8964356d68436e6ea46189f3a7431342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for hwm 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.