FITRON: adaptive fuzzy-tree MCDM decision engine
Project description
FITRON
FITRON is a Python package for hybrid decision intelligence under uncertainty.
The package combines:
- fuzzy feature transformation,
- decision tree learning,
- TOPSIS multi-criteria ranking,
- memory-guided adaptive weight updates,
- interpretable ranking outputs.
Package name on PyPI: fitron
Import path: pip_model
Why FITRON
Most pipelines stop at classification. FITRON extends that flow into adaptive decision ranking.
- Learns a predictive backbone with a decision tree.
- Ranks valid candidates with TOPSIS and learned criteria weights.
- Adapts weights over iterations using memory and exploration.
- Produces feature-level explanations for selected options.
Core Workflow
- Preprocess tabular data and encode features.
- Fuzzify numeric features into low/mid/high memberships.
- Train decision tree model and estimate feature importances.
- Filter valid candidates using model predictions.
- Rank candidates with TOPSIS.
- Update weights using adaptive exploration and memory feedback.
- Return best option, score, and explanation.
Installation
End users
pip install fitron
From source
pip install .
Editable install (development)
pip install -e .[dev]
Environment Setup
Use a standard CPython virtual environment.
Windows:
python -m venv .venv-win
.\.venv-win\Scripts\python.exe -m pip install -U pip setuptools wheel
.\.venv-win\Scripts\python.exe -m pip install -e .[dev]
If PowerShell blocks script activation, use:
.venv-win\Scripts\activate.bat
Linux or macOS:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -e .[dev]
Quick Start
import pandas as pd
from pip_model import FITRONModel
sample = pd.DataFrame(
{
"income": [50000, 20000, 75000, 43000],
"risk": [0.2, 0.8, 0.3, 0.5],
"credit_score": [710, 520, 760, 640],
"target": [1, 0, 1, 1],
}
)
model = FITRONModel(iterations=5, random_state=42)
result = model.fit(sample, target="target")
print("Best index:", result.best_index)
print("Best score:", result.best_score)
print("Explanation:", result.explanation)
Public API
FITRONModelfit(df, target, ...)rank(df, target, ...)explain(result)update_memory(memory, weights, score, best_idx)
Run Tests
pytest -q
Build and Publish
Build distribution artifacts:
python -m build
Validate artifacts:
python -m twine check dist/*
Upload:
python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*
Project Structure
src/pip_model/
core/
api.py
pipeline.py
tests/
examples/
pyproject.toml
Authors
- zibransheikh
- hazlived
License
MIT
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
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 fitron-0.1.2.tar.gz.
File metadata
- Download URL: fitron-0.1.2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fafee8e7434199fd6b6ec91c4c974712c0d17d1bc8a0a432450c246fb3a2c84
|
|
| MD5 |
621ae17343e4c8317e25896bdccda0e4
|
|
| BLAKE2b-256 |
74a081694338f3cb0adbc0ab1ccb697dfca70f45850855a2ad42f6cb8c2286cc
|
Provenance
The following attestation bundles were made for fitron-0.1.2.tar.gz:
Publisher:
publish.yml on hazlived/fitron
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fitron-0.1.2.tar.gz -
Subject digest:
9fafee8e7434199fd6b6ec91c4c974712c0d17d1bc8a0a432450c246fb3a2c84 - Sigstore transparency entry: 1296447332
- Sigstore integration time:
-
Permalink:
hazlived/fitron@0f3f3c7339e1f0d86dcd1f29206839f1ba88e1c4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/hazlived
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0f3f3c7339e1f0d86dcd1f29206839f1ba88e1c4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fitron-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fitron-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cbcc76f0359d28ea6b5df5192b6dd37150487dfca07e0641c1559b96480b197
|
|
| MD5 |
b08ca7e1d85c65a14a3af08fb9c48034
|
|
| BLAKE2b-256 |
17a48b7da23cce762f9f86d7271a5609ae0126be654c5122ba7eb05ea2c4a7d9
|
Provenance
The following attestation bundles were made for fitron-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on hazlived/fitron
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fitron-0.1.2-py3-none-any.whl -
Subject digest:
2cbcc76f0359d28ea6b5df5192b6dd37150487dfca07e0641c1559b96480b197 - Sigstore transparency entry: 1296447411
- Sigstore integration time:
-
Permalink:
hazlived/fitron@0f3f3c7339e1f0d86dcd1f29206839f1ba88e1c4 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/hazlived
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0f3f3c7339e1f0d86dcd1f29206839f1ba88e1c4 -
Trigger Event:
release
-
Statement type: