Install & Compatibility
Where this runs
tested against v0.62 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 10.7s · import 3.540s · 271MB
281MB installed
● package 281MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ReliefF
✓ from skrebate import ReliefF
✗ from skrebate import Relief
Old import path from pre-0.5 versions, raises ImportError
SURF
✓ from skrebate import SURF
✗ from skrebate.skmethods import SURF
Wrong submodule; direct import from skrebate is correct
MultiSURF
✓ from skrebate import MultiSURF
Basic ReliefF feature selection on the Iris dataset
from skrebate import ReliefF
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Feature selection with ReliefF
fs = ReliefF(n_neighbors=10, n_features_to_select=2)
fs.fit(X_train, y_train)
X_train_selected = fs.transform(X_train)
X_test_selected = fs.transform(X_test)
print(X_train_selected.shape)
Errors
Common errors & fixes
ImportError: cannot import name 'ReliefF' from 'skrebate'
Attempted import from the wrong package or wrong spelling. Possibly confused with 'sklearn' or old version.
fixEnsure you installed skrebate (pip install skrebate) and import from 'skrebate' (not 'sklearn' or 'scikit-rebate').
ModuleNotFoundError: No module named 'skrebate'
Package not installed or installed in a different environment.
fixRun 'pip install skrebate'. If using Anaconda, try 'conda install -c conda-forge skrebate'.
ValueError: n_neighbors should be >= 1, got 0
Instantiating ReliefF with n_neighbors=0 or negative.
fixSet n_neighbors to a positive integer (e.g., 10).
TypeError: fit() got an unexpected keyword argument 'verbose'
Using verbose parameter in newer versions where it was removed.
fixRemove the verbose argument from fit().
Upgrade
Version history
0.62latest on PyPI · released Feb 15, 2021
Audit
Dependencies
numpyrequiredNumerical operations
scikit-learnrequiredBase estimator and transformer interface
scipyrequiredSparse matrix support