bulanik
Easy-to-use fuzzy numbers, fuzzy inference and fuzzy multi-criteria decision making (MCDM) in pure Python, with no runtime dependencies. Bulanık is Turkish for fuzzy. Optional bridges connect it to LumiX (optimization modelling) and sezgi (metaheuristics), and an optional plotting module draws the results in a light and a dark theme.
Documentation: https://tdelphi1981.github.io/bulanik/
Install
pip install bulanik # core, no runtime dependencies
pip install "bulanik[lumix]" # + the LumiX bridge (bulanik.lumix)
pip install "bulanik[sezgi]" # + the sezgi bridge (bulanik.sezgi)
pip install "bulanik[plot]" # + figures (bulanik.plot, needs matplotlib)
pip install "bulanik[lumix,sezgi,plot]" # everything
Python 3.10 to 3.13. For development, clone the repository and run uv sync (see
Contributing).
Quickstart
from bulanik import IFN, TFN
from bulanik.aggregate import wa
a, b = IFN(0.6, 0.3), IFN(0.5, 0.4)
print(a + b) # IFN(mu=0.8, nu=0.12)
print(a.add(b, ops="einstein")) # the Einstein operator family
print(wa([a, b], [0.7, 0.3])) # weighted average
print((TFN(1, 2, 3) + TFN(3, 4, 5)).score()) # crisp score for ranking
Every operator family, score and method is chosen by name (ops="einstein",
score("normalized")); an unknown name raises a ValueError that lists the valid ones.
What is in it
- Fuzzy numbers: triangular and trapezoidal; intuitionistic, Pythagorean, Fermatean
and q-rung orthopair; spherical, picture and neutrosophic; their interval-valued
versions (
IVIFN,IVPFN,IVFFN,IVQROFN,IVNeutrosophicFN) and interval type-2 trapezoidal numbers (IT2TrFN). Immutable and validated. - Aggregation, sets and scales: weighted average and geometric mean, expert aggregation, membership functions, linguistic variables and linguistic scales.
- Fuzzy inference: Mamdani, Sugeno and Tsukamoto systems from plain-text rules; interval type-2 systems with KM, EKM, Nie-Tan and BMM type reduction; ANFIS.
- Decision making: AHP, fuzzy AHP (also over any number kind), SWARA, entropy, CRITIC
and PIPRECIA weights; DEMATEL with CFCS; best-worst consistency; TOPSIS, VIKOR, WASPAS,
EDAS, CODAS, COPRAS, MARCOS, CoCoSo, WISP and ELECTRE, on crisp matrices or fuzzy
ratings (fuzzy CODAS, WASPAS and CoCoSo included), and Chen's fuzzy TOPSIS. Interval-valued
AHP (
ahp_interval_valued) with the multiplicative and possibility methods. - Bridges: with LumiX, the linear best-worst method, Zimmermann fuzzy programming and MCDM scores as optimization data; with sezgi, nonlinear and fuzzy BWM and ANFIS training.
- Figures:
bulanik.plotfor numbers, scales, inference, rankings and DEMATEL.
The documentation has a user guide, an API
reference, and 24 runnable examples (also in examples/).
Development
uv sync
uv run python -m pytest -q
The dev group installs LumiX, OR-Tools, sezgi and matplotlib, so the bridge tests and every example run; without an extra, its tests and examples are skipped. Coverage is measured on the pure-Python core.
Citing
Please cite bulanik using CITATION.cff (GitHub's "Cite this repository"),
and the original papers behind the methods you use, listed with DOIs in the
references.
License
MIT. See LICENSE.
Metadata
Release files for bulanik 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bulanik-0.3.0.tar.gz | 1.7 MB | Without provenance | Details for bulanik-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bulanik-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for bulanik-0.3.0-py3-none-any.whl |
Total release size: 2.0 MB
Release files / bulanik-0.3.0.tar.gz
| Download URL | bulanik-0.3.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59e7f1cdea20bb140552b671b687f0003aea63baa93e9aab4d9e795036a88975
|
|
BLAKE2b-256 checksum How to use checksums |
36be663e37c7eabf10ea8c9b9f45ebf711e05839cd4a431a4ff0f74992841cd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / bulanik-0.3.0-py3-none-any.whl
| Download URL | bulanik-0.3.0-py3-none-any.whl |
|---|---|
| Size | 217.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9595b8ef724a534dbb6bc02b0c90a7251c82f2f8d4894a9e6cbdc5aecd8b956
|
|
BLAKE2b-256 checksum How to use checksums |
fface465274eaadbe3baa49611896aee9ae83d6abe2fb62a8bddd6bca7fcff1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for bulanik 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.