highFIS is a comprehensive Python package for training and evaluating high-dimensional TSK fuzzy systems, built on PyTorch and compatible with the scikit-learn API.
Project description
highFIS
highFIS is a PyTorch-based framework for high-dimensional Takagi–Sugeno–Kang (TSK) fuzzy systems. It brings differentiable fuzzy inference, numerical stability, and sklearn-compatible estimators to both classification and regression. The library also includes DGTSK dynamic-gating models for feature and rule selection in high-dimensional fuzzy systems.
🚀 Overview
- Differentiable TSK fuzzy systems built for high-dimensional data.
- Supports both concrete model classes and sklearn-style estimator wrappers.
- Includes adaptive and gated inference variants for feature selection and sparse rule extraction.
- Designed for numerical stability with log-space and inverse-log defuzzifiers.
📦 Installation
Install from PyPI:
pip install highfis
🧠 Quick Start
from highfis import HTSKClassifierEstimator
clf = HTSKClassifierEstimator(
n_mfs=4,
mf_init="kmeans",
epochs=150,
learning_rate=1e-3,
random_state=42,
)
clf.fit(X_train, y_train)
print(f"Test accuracy: {clf.score(X_test, y_test):.4f}")
highFIS integrates with sklearn.pipeline.Pipeline, GridSearchCV, and
cross_val_score.
🧩 Model families
highFIS provides a full family of TSK models, each tuned for a specific high-dimensional inference strategy.
TSK— vanilla TSK with product antecedent aggregation and sum-based normalization.HTSK— high-dimensional TSK with geometric mean aggregation and log-space normalization.LogTSK— log-domain inverse-log normalization for stable aggregation.DombiTSK— Dombi t-norm aggregation with a learnable shape parameter.ADMTSK— adaptive Dombi TSK with Composite Gaussian membership functions.AYATSK— Yager aggregation for flexible antecedent behavior.AdaTSK— adaptive softmin-style inference with dynamic rule weighting.ADPTSK— adaptive double-parameter softmin inference with stable normalized rule weights.FSRE-AdaTSK— adaptive model with gated feature selection and rule extraction.DG-TSK— double-gated training for feature selection and rule extraction.DG-ALETSK— adaptive Ln-Exp softmin with embedded feature and rule gates.HDFIS— high-dimensional inference with product DMF (HDFIS-prod) and minimum T-norm frozen antecedents (HDFIS-min).
Each family exposes classifier and regressor variants.
🔧 Core components
Models
HTSKClassifier,HTSKRegressorTSKClassifier,TSKRegressorLogTSKClassifier,LogTSKRegressorDombiTSKClassifier,DombiTSKRegressorADMTSKClassifier,ADMTSKRegressorAYATSKClassifier,AYATSKRegressorAdaTSKClassifier,AdaTSKRegressorADPTSKClassifier,ADPTSKRegressorFSREAdaTSKClassifier,FSREAdaTSKRegressorDGTSKClassifier,DGTSKRegressorDGALETSKClassifier,DGALETSKRegressorHDFISProdClassifier,HDFISProdRegressorHDFISMinClassifier,HDFISMinRegressor
Estimator wrappers
HTSKClassifierEstimator,HTSKRegressorEstimatorTSKClassifierEstimator,TSKRegressorEstimatorLogTSKClassifierEstimator,LogTSKRegressorEstimatorDombiTSKClassifierEstimator,DombiTSKRegressorEstimatorADMTSKClassifierEstimator,ADMTSKRegressorEstimatorDGALETSKClassifierEstimator,DGALETSKRegressorEstimatorDGTSKClassifierEstimator,DGTSKRegressorEstimatorFSREAdaTSKClassifierEstimator,FSREAdaTSKRegressorEstimatorAYATSKClassifierEstimator,AYATSKRegressorEstimatorAdaTSKClassifierEstimator,AdaTSKRegressorEstimatorADPTSKClassifierEstimator,ADPTSKRegressorEstimatorHDFISProdClassifierEstimator,HDFISProdRegressorEstimatorHDFISMinClassifierEstimator,HDFISMinRegressorEstimator
Building blocks
- Memberships:
GaussianMF,TriangularMF,TrapezoidalMF,BellMF,SigmoidalMF,DiffSigmoidalMF,ProdSigmoidalMF,SShapedMF,LinSShapedMF,ZShapedMF,LinZShapedMF,PiMF,CompositeExponentialMF,GaussianPIMF - Defuzzifiers:
SoftmaxLogDefuzzifier,SumBasedDefuzzifier,LogSumDefuzzifier - T-norms:
prod,min,gmean,dombi,yager,yager_simple,ale_softmin_yager - Rule base strategies:
cartesian,coco,en,custom - Persistence: checkpoint save/load and validation via
highfis.persistence
🛠️ Training options
highFIS uses gradient-based optimization and supports:
- adaptive optimizers like Adam/W and standard SGD
- early stopping with validation
- uniform rule regularization for balanced rule activation
- custom T-norms, custom rule bases, and custom defuzzifiers
📚 Documentation
The published documentation is available at:
https://dcruzf.github.io/highFIS
Key reference pages:
🧪 Testing & quality
Run the test suite with coverage:
hatch test -c -a
Format and lint the repository:
hatch fmt
Run static type checks:
hatch run typing
🤝 Contributing
Contributions are welcome! Please open issues or pull requests, and refer to our development guide in the documentation:
https://dcruzf.github.io/highFIS/latest/contributing/
📄 License
Distributed under the GPLv3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file highfis-0.12.0.tar.gz.
File metadata
- Download URL: highfis-0.12.0.tar.gz
- Upload date:
- Size: 92.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a35df5dda651f7b02d240f35d93758c49f453d8a1a68441f5080e1e1f1271228
|
|
| MD5 |
0b17f0a66b17c419000f23070f03a0f2
|
|
| BLAKE2b-256 |
6eed65b88f9d98eca5202ad2bee5654ac0dcb3da8a439c08e1ec7da68a962f9f
|
File details
Details for the file highfis-0.12.0-py3-none-any.whl.
File metadata
- Download URL: highfis-0.12.0-py3-none-any.whl
- Upload date:
- Size: 81.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf14e173a3ffaf86f9118269abf494c8c6c227c7850af774eccf26acd3590a5
|
|
| MD5 |
cf8e94abb98530531990155102e93f4a
|
|
| BLAKE2b-256 |
2aa5dfbe290937efb93f5a375875c252672af122a6568067deca428b5de65059
|