Skip to main content

highFIS

CI Documentation DOI PyPI - Python Version PyPI - Version PyPI - License

highFIS is a PyTorch-based library for high-dimensional Takagi–Sugeno–Kang (TSK) fuzzy systems. It brings differentiable fuzzy inference, numerical stability, and scikit-learn compatible estimators to both classification and regression.

🚀 Overview

  • Differentiable TSK fuzzy systems built for high-dimensional data.
  • Thirteen model families from the literature behind one API, each with a classifier and a regressor.
  • Available as scikit-learn compatible estimators and as plain PyTorch model classes.
  • Designed for numerical stability with log-space and inverse-log defuzzifiers.

📦 Installation

Install from PyPI:

pip install highfis

highFIS requires Python 3.11 or newer and depends on PyTorch, NumPy, scikit-learn, and tqdm.

🧠 Quick Start

from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler

from highfis import HTSKClassifier

X, y = make_classification(n_samples=800, n_features=10, n_informative=8, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42)

# Membership functions are sensitive to feature scale.
scaler = MinMaxScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)

clf = HTSKClassifier(
    n_mfs=3,
    mf_init="kmeans",
    epochs=100,
    learning_rate=0.01,
    random_state=42,
)
clf.fit(X_train, y_train)
print(f"Test accuracy: {clf.score(X_test, y_test):.2%}")

highFIS integrates with sklearn.pipeline.Pipeline, GridSearchCV, and cross_val_score.

🧩 Model families

highFIS implements thirteen TSK model families, each following a published high-dimensional inference strategy.

  • TSK — vanilla TSK with product antecedent aggregation and sum-based normalization.
  • HTSK — geometric mean aggregation with log-space softmax normalization.
  • LogTSK — inverse-log normalization of log-domain rule weights.
  • HDFIS — high-dimensional inference with product T-norm (HDFISProd) and minimum T-norm (HDFISMin) variants.
  • DombiTSK — Dombi T-norm aggregation with a fixed shape parameter.
  • ADMTSK — adaptive Dombi T-norm, with the shape parameter derived from the input dimensionality, and composite Gaussian membership functions.
  • AYATSK — adaptive Yager T-norm with composite exponential membership functions.
  • ADATSK — adaptive softmin antecedent aggregation.
  • ADPTSK — adaptive double-parameter softmin antecedent aggregation.
  • FSRE-ADATSK — ADATSK extended with embedded feature selection and rule extraction.
  • DGTSK — double groups of gates for simultaneous feature selection and rule extraction.
  • DGALETSK — adaptive Ln-Exp softmin with simultaneous feature selection and rule extraction.
  • MHTSK — multihead TSK built from sparse subantecedents over random feature subsets.

Each family exposes classifier and regressor variants.

🔧 Core components

highFIS exposes a compact, model-family-driven API with both concrete model classes and sklearn-compatible estimator wrappers.

  • Estimators: *Classifier and *Regressor variants for each model family, importable directly from highfis (for example HTSKClassifier, FSREADATSKRegressor, HDFISProdClassifier)
  • PyTorch models: the underlying *ClassifierModel and *RegressorModel classes in highfis.models
  • Building blocks: membership functions (highfis.memberships), defuzzifiers (highfis.defuzzifiers), T-norms (highfis.t_norms), and layers (highfis.layers)
  • Utilities: evaluation metrics (highfis.metrics), estimator checkpoints (highfis.persistence), and a membership-function initialization cache

For the full class list and API reference, see the documentation:

🛠️ Training options

highFIS uses gradient-based optimization and supports:

  • an optimizer selected per model family (SGD, Adam, or AdamW), following the source paper
  • mini-batch training with learning-rate schedulers and weight decay on the consequent parameters
  • early stopping on a validation set passed to fit
  • uniform regularization (ur_weight) for balanced rule activation
  • custom T-norms, rule bases, and defuzzifiers through the PyTorch model classes

📚 Documentation

The published documentation is available at:

https://dcruzf.github.io/highFIS

Start with the model families overview, the user guides, and the cookbook.

Model reference pages:

🧪 Testing & quality

Format, lint, and type check:

hatch check --fix

Run the test suite with coverage:

hatch test -c -a

Run security scan:

hatch run security

📝 Citation

If you use highFIS in your research, please cite it using the metadata in CITATION.cff or the Zenodo DOI.

🤝 Contributing

Contributions are welcome! Please open issues or pull requests, and refer to our development guide in the documentation: contributing.

When reporting a bug, include the output of highfis.show_versions().

📄 License

Distributed under the GPLv3.

Metadata

Release files for highfis 0.30.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for highfis 0.30.0
File Size Uploaded
highfis-0.30.0.tar.gz 189.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for highfis 0.30.0
File Interpreter ABI Platform
highfis-0.30.0-py3-none-any.whl Python 3 none any Details

Total release size: 365.5 kB

Release files / highfis-0.30.0.tar.gz

Download URL highfis-0.30.0.tar.gz
Size 189.0 kB
Tags Source
SHA-256 checksum
How to use checksums
33739940756aefb659c97e9aec70e351b431adb068761d4a1354abe630d5c0a9
BLAKE2b-256 checksum
How to use checksums
13f27d59e228adc00c8c638462f794cea1f1d01d4bef00665b9dac6898f20982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Release files / highfis-0.30.0-py3-none-any.whl

Download URL highfis-0.30.0-py3-none-any.whl
Size 176.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7351ca368f8d0bd3865976c96b14b5fb143b45d1351476600edeccba9f3bc5dd
BLAKE2b-256 checksum
How to use checksums
59a24d7dc6a2bf78ef547759ef9fbdd969924f2967d94fa3822224bd7be2d7d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Release history Release notifications | RSS feed

0.34.0

2 release files

0.33.0

2 release files

This release

0.30.0 This release

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.23.7

2 release files

0.23.6

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.2

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page