Skip to main content

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

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

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.
  • AYATSK — Yager aggregation for flexible antecedent behavior.
  • AdaTSK — adaptive softmin-style inference with dynamic rule weighting.
  • 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.

Each family exposes classifier and regressor variants.

🔧 Core components

Models

  • HTSKClassifier, HTSKRegressor
  • TSKClassifier, TSKRegressor
  • LogTSKClassifier, LogTSKRegressor
  • DombiTSKClassifier, DombiTSKRegressor
  • AYATSKClassifier, AYATSKRegressor
  • AdaTSKClassifier, AdaTSKRegressor
  • FSREAdaTSKClassifier, FSREAdaTSKRegressor
  • DGTSKClassifier, DGTSKRegressor
  • DGALETSKClassifier, DGALETSKRegressor

Estimator wrappers

  • HTSKClassifierEstimator, HTSKRegressorEstimator
  • TSKClassifierEstimator, TSKRegressorEstimator
  • LogTSKClassifierEstimator, LogTSKRegressorEstimator
  • DGALETSKClassifierEstimator, DGALETSKRegressorEstimator
  • DGTSKClassifierEstimator, DGTSKRegressorEstimator
  • FSREAdaTSKClassifierEstimator, FSREAdaTSKRegressorEstimator
  • AYATSKClassifierEstimator, AYATSKRegressorEstimator
  • AdaTSKClassifierEstimator, AdaTSKRegressorEstimator

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

highfis-0.9.0.tar.gz (83.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

highfis-0.9.0-py3-none-any.whl (74.2 kB view details)

Uploaded Python 3

File details

Details for the file highfis-0.9.0.tar.gz.

File metadata

  • Download URL: highfis-0.9.0.tar.gz
  • Upload date:
  • Size: 83.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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

Hashes for highfis-0.9.0.tar.gz
Algorithm Hash digest
SHA256 7514563027c615a2e2949cacacae81a6ceda45d2c42e45f22273a17375f0de0d
MD5 94b9c483c22c0f621f1ee1ee52eb9332
BLAKE2b-256 a59a31086125094fb5b7117bc313ad291db3336f0db73eaf1c96085ceed0bee4

See more details on using hashes here.

File details

Details for the file highfis-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: highfis-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 74.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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

Hashes for highfis-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6fcd49696979e9518488e5b2d1c17d23f017c49c9447af0d957a7524aa9430
MD5 fdd246bb411855637163db32851e9f00
BLAKE2b-256 c90e67bc99b7185515d38696706e595d482895ca99403c2d1a2d1d825a73c8b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page