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.
- Differentiable TSK fuzzy systems built for high-dimensional data.
- Supports both concrete PyTorch model classes and sklearn-compatible estimators.
- Includes adaptive and gated inference variants for feature selection and sparse rule extraction.
- Designed for numerical stability with log-space and inverse-log defuzzifiers.
Install from PyPI:
pip install highfisfrom highfis import HTSKClassifier
clf = HTSKClassifier(
n_mfs=5,
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.
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.MHTSK— multihead sparse TSK with feature-subset heads and sparse consequents.DombiTSK— Dombi T-norm aggregation with a learnable shape parameter.ADMTSK— adaptive Dombi TSK with composite Gaussian Pi membership functions.AYATSK— Yager T-norm 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.DGTSK— double-gated training for feature selection and rule extraction.DGALETSK— adaptive Ln-Exp softmin with embedded feature and rule gates.HDFIS— high-dimensional inference with product T-norm (HDFISProd) and minimum T-norm (HDFISMin) variants.
Each family exposes classifier and regressor variants.
highFIS exposes a compact, model-family-driven API with both concrete model classes and sklearn-compatible estimator wrappers.
- Model families:
TSK,HTSK,LogTSK,MHTSK,DombiTSK,ADMTSK,AYATSK,ADATSK,ADPTSK,FSRE-ADATSK,DGTSK,DGALETSK,HDFIS - Estimators:
*Classifierand*Regressorvariants for each model family, accessible directly fromimport highfis - Building blocks: membership functions (
highfis.memberships), defuzzifiers (highfis.defuzzifiers), T-norms (highfis.t_norms), and PyTorch model classes (highfis.models)
For the full class list and API reference, see the documentation:
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
The published documentation is available at:
https://dcruzf.github.io/highFIS
Key reference pages:
- TSK Vanilla
- LogTSK
- AYATSK
- HTSK
- DombiTSK
- ADPTSK
- ADMTSK
- ADATSK
- DGTSK
- DG-ALETSK
- FSRE-ADATSK
- MHTSK
- HDFIS
Format, lint, and type check:
hatch check --fixRun the test suite with coverage:
hatch test -c -aRun security scan:
hatch run securityContributions are welcome! Please open issues or pull requests, and refer to our development guide in the documentation: contributing.
Distributed under the GPLv3.