This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.0a3 instead.
Bankai Boruta
Native Rust implementation of the Boruta all-relevant feature selection algorithm with a scikit-learn compatible Python API.
The canonical classification selector now runs its complete Boruta iteration
loop inside Rust. BankaiBoruta.fit(X, y) accepts C- or F-contiguous NumPy
float32/float64 arrays without copying X; incompatible numeric inputs can
use input_mode="copy". Rejected features are pruned between iterations,
confirmed features remain as context in canonical mode, and unresolved
features stay tentative when max_iter is reached. pruning="aggressive"
removes confirmed features from subsequent training and is experimental; use it
only when the benchmarked trade-off is acceptable for your data. Deterministic
multi-worker training is available with n_jobs. See
docs/ROADMAP.md for details.
Development
Python wheels and editable installs use Maturin:
uv sync --extra test
uv run maturin develop --skip-install
uv run pytest
Rust core tests run with Cargo:
cargo test --workspace
Polars and Arrow input
Install bankai-boruta[polars] to select directly from Polars DataFrames.
The strict path supports Float32/Float64 columns, mixed float widths, slices,
and independently chunked columns. It imports each Series through Arrow C
Stream, retaining the original value buffers for the duration of fit.
No rechunk, NumPy conversion or augmented matrix is needed. Nulls, NaN/Inf,
unsupported types and unaligned buffers raise an error. Integers can use the
explicit input_mode="copy" conversion path.
from bankai_boruta import BankaiBoruta
from sklearn.pipeline import make_pipeline
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import cross_val_score
selector = BankaiBoruta(random_state=42, n_jobs=4)
pipeline = make_pipeline(selector, DecisionTreeClassifier(random_state=42))
scores = cross_val_score(pipeline, X_polars, y, cv=3)
Selection belongs inside the cross-validation pipeline. For a fitted selector,
set_output(transform="polars") preserves named Polars output. transform may
allocate its selected output. Pickle/joblib store decisions and metadata, not
training buffers or forests; a failed refit clears the preceding fitted state.
Other CPU Arrow C Stream table exporters are accepted without copying buffers
inside the importer. Their own export methods may allocate; the end-to-end
zero-copy guarantee is tested specifically for supported Polars float layouts.
copied_bytes measures known matrix materializations, not all allocations or
allocations internal to third-party exporters. Labels, shadow indices, chunk
metadata and forest workspaces still allocate. Keep inputs unchanged during fit.
PyArrow is not a runtime dependency.
Optional scikit-learn estimator
The default BankaiBoruta() continues to use the native Rust forest and does
not call Python inside the iteration loop. To use a scikit-learn estimator,
pass a cloneable classifier that exposes feature_importances_:
from bankai_boruta import BankaiBoruta
from sklearn.ensemble import ExtraTreesClassifier
selector = BankaiBoruta(
estimator=ExtraTreesClassifier(n_estimators=64, random_state=42),
importance_getter="auto",
random_state=42,
)
selector.fit(X, y)
Bankai still owns the Boruta controller, shadow generation, pruning and
statistical decisions in Rust. The opt-in path clones and fits the Python
estimator once per iteration on a C-contiguous matrix containing active real
features followed by shadows. This requires a Python callback and materializes
that augmented matrix on every iteration, so it trades speed and memory for
model flexibility. diagnostics_["copied_bytes"] counts those matrix bytes;
external_estimator_calls and external_estimator_seconds report callback
count and time, while fit_time_seconds reports total selector fit time. The
estimator template is not fitted or otherwise mutated. At present,
importance_getter="auto" reads feature_importances_, falling back to
coef_ and summing absolute coefficients across classes. A dotted attribute
path or callable can supply custom scores. Getters must return one finite,
non-negative score per augmented input column. The native mode remains the
recommended default for performance and zero-copy input.
The Arrow development suite must run with its optional dependencies installed:
uv sync --extra test --extra arrow-test
uv run --no-sync maturin develop --release --skip-install
uv run --no-sync pytest
See the M6 plan and FFI ownership notes.
Metadata
Release files for bankai-boruta 0.1.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 | |
|---|---|---|---|
| bankai_boruta-0.1.0.tar.gz | 52.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| bankai_boruta-0.1.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| bankai_boruta-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| bankai_boruta-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| bankai_boruta-0.1.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| bankai_boruta-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 2.6 MB
Release files / bankai_boruta-0.1.0.tar.gz
| Download URL | bankai_boruta-0.1.0.tar.gz |
|---|---|
| Size | 52.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a86d22d5afcb8356855e8572ebabc5b8f0f0f6a3e05d24d79ba827fb9017666
|
|
BLAKE2b-256 checksum How to use checksums |
76896e98c74e0c1e25d712d9a0f24c2d86660a3beb4f49bcb63393a55afa838b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / bankai_boruta-0.1.0-cp311-abi3-win_amd64.whl
| Download URL | bankai_boruta-0.1.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 440.0 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5f2ef2effab6e685a0ae672a40301f34087f9c5fd3abb4bbc0add8c03ae5d832
|
|
BLAKE2b-256 checksum How to use checksums |
6fee676ada809adfa80599d7c68bfa62bf8eebdac8f0c4eaa2ef881eafffb549
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / bankai_boruta-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | bankai_boruta-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 551.2 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8fd82fca484c199ceaaaf89800b64196c01f0dd8de4201d36a072c56f573e1db
|
|
BLAKE2b-256 checksum How to use checksums |
d900daffb22ef4687ef34863ee79383f9e5728d1d929c3a14519aa8b5bb6d4f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / bankai_boruta-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | bankai_boruta-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 516.4 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0a86b30e8295f695d045fd5d9ea4b6176d28d14748f522197806fa885b3aace3
|
|
BLAKE2b-256 checksum How to use checksums |
6f722bab1c81781ecd41c4f9819e2b4662f8d5abaf7289c7159a96cf7e6446c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / bankai_boruta-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | bankai_boruta-0.1.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 476.6 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0390873a25d6480150bdd7efbab28b6808aed5eeeb55dce3eff2c8e6b71f6f17
|
|
BLAKE2b-256 checksum How to use checksums |
ba815ca458d09904fee21ef0fb1a079ab0bad59b6e3e1e8138fe56ec985faf44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / bankai_boruta-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | bankai_boruta-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 517.8 kB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
20efb10326d8b61fd3ebfe80b8c40f385dc937ffd094678b0c21689940b134be
|
|
BLAKE2b-256 checksum How to use checksums |
23d62288e2e5ce0ca48040b45caa563504f7b78c97259e7bd2ad3327261529a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|