Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

featranker

Latest version: v2.0.0

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: CountZero
4 Stars
0 Forks
5 Versions
105 Downloads
Python Repo language

Scan summary

featranker was last scanned on 27 Nov 2026 at version 2.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 5 versions; the latest was published on 27 Nov 2026.
  • Findings: No rules fired in version 2.0.0.
  • Downloads: 105 downloads.

Versions

5 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.0.0 LATEST 27 Nov 2026 No rules fired
1.21.2 26 Oct 2026 No rules fired
1.21.1 25 Oct 2026 No rules fired
0.4.1 13 Oct 2026 Not shown
0.4.0 13 Oct 2026 Not shown

No rules fired in 2.0.0

Findings

Findings for v2.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

FEATRANKER

┌────────────────────────────────────────────────────────┐
│  FEATRANKER  [ FEATURE RANKING TERMINAL ]              │
├────────────────────────────────────────────────────────┤
│  > MODEL ARRAY ............... 40 UNITS      [ OK ]    │
│  > SEPARATE EVAL SET ......... REQUIRED      [ OK ]    │
│  > DUMMY BASELINE GATE ....... ARMED         [ OK ]    │
│  > RANK CONSENSUS ............ ONLINE        [ OK ]    │
├────────────────────────────────────────────────────────┤
│  READY._                                               │
└────────────────────────────────────────────────────────┘

FeatRanker trains a set of estimators on explicit training data, measures permutation importance on separate evaluation data, and combines each model's ranking into a single consensus. It is built for ML workflows where leakage control, semantic feature groups, and model failures must stay visible.

▍ Why FeatRanker?

Ships with 40 built-in models (22 classification, 18 regression), or bring your own scikit-learn estimators and pipelines.

▍ 01 · Install

pip install featranker

Requires Python ≥ 3.10 and scikit-learn ≥ 1.5. Optional extras: featranker[xgboost], [catboost], [all] (both), [plot] (matplotlib, for report.plot()), or [shap] (SHAP summaries for evidence=True, shap ≥ 0.49; not part of [all]). The lightgbm extra was removed in 1.0; install lightgbm directly for custom LightGBM estimators. [all] now installs only XGBoost and CatBoost.

▍ 02 · Quick start

The caller owns splitting and preprocessing. Fit on training data, then rank on a separate evaluation set. This example runs as is:

from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split

from featranker import FeatureRanker

data = load_diabetes()
X_train, X_eval, y_train, y_eval = train_test_split(
    data.data, data.target, test_size=0.3, random_state=0
)

ranker = FeatureRanker(task="reg", group="tree")
ranker.fit(X_train, y_train, feature_names=list(data.feature_names))

report = ranker.rank_features(
    X_eval,
    y_eval,
    scoring="neg_mean_absolute_error",
    feature_groups={"serum": ["s1", "s2", "s3", "s4", "s5", "s6"]},
    random_state=42,
)

for row in report["consensus"]:
    print(f"{row['feature_group']:>6}  median rank {row['median_rank']:.1f}  ({row['n_models']} models)")
 serum  median rank 1.0  (7 models)
   bmi  median rank 2.0  (7 models)
    bp  median rank 3.0  (7 models)
   sex  median rank 4.0  (7 models)
   age  median rank 5.0  (7 models)

Output shown with the xgboost and catboost extras installed; a core-only install has fewer tree models, so n_models is lower. The six blood-serum columns are ranked as one group. The decision tree scored worse than the dummy baseline, so it stays in the report without a vote. See Reading the report for what to do next.

For a faster run, group="fast" fits one model per family (7 for classification, 5 for regression), so every family has a representative with about a third of the models; a representative can fail, so the voting families can differ from "all" (details).

Or from the command line:

featranker --task reg --train-data train.csv --eval-data eval.csv \
  --target target --scoring neg_mean_absolute_error --output report.json

[!TIP] NumPy training matrices require feature_names; pandas DataFrames keep their column names. See the manual for every parameter, your own models, n_jobs, the CLI, and the input contract.

▍ 10-minute recipe

From a ranking to a validated subset, on three disjoint sets of rows: train (fit), validation (rank and choose k), and test (touched once, at the end). The choice of subset is made on training and validation rows only; the test set is used once, for the frozen choice. The script has four steps: rank on the validation rows; check support (how many models voted, what summarize() flags); choose k from the validation ablation curve; validate the chosen groups against all features on the test rows with ablate(). It runs as is and uses only scikit-learn models (group="fast"), so the output does not depend on optional extras.

from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split

from featranker import FeatureRanker

data = load_diabetes()
names = list(data.feature_names)
X_dev, X_test, y_dev, y_test = train_test_split(data.data, data.target, test_size=0.3, random_state=0)
X_train, X_val, y_train, y_val = train_test_split(X_dev, y_dev, test_size=0.4, random_state=0)

ranker = FeatureRanker(task="reg", group="fast", verbose=False)
ranker.fit(X_train, y_train, feature_names=names)
report = ranker.rank_features(X_val, y_val, scoring="r2", random_state=42)

print("voting models:", report["consensus"][0]["n_models"])
print("findings:", [f["code"] for f in report.summary()])

validation = ranker.ablate(X_train, y_train, X_val, y_val, report, ks=[1, 2, 3, 5, 10])
curve = validation["ablation"]["curve"]
best = max(curve, key=lambda row: row["median_score"])
k = best["k"]
print("chosen groups:", best["feature_groups"], f"(k={k}, validation r2 {best['median_score']:.2f})")

test = ranker.ablate(X_train, y_train, X_test, y_test, report, ks=[k, 10])
scores = {row["k"]: row["median_score"] for row in test["ablation"]["curve"]}
chosen, everything = scores[k], scores[10]
print(f"test r2, chosen {k} groups: {chosen:.2f}   all 10 groups: {everything:.2f}")
voting models: 5
findings: ['tied_groups', 'tied_groups', 'within_noise']
chosen groups: ['bmi', 's5', 'bp', 's4', 's3'] (k=5, validation r2 0.46)
test r2, chosen 5 groups: 0.13   all 10 groups: 0.15

What this shows. Five models voted, but the validation summarize() findings say several groups are tied in rank and three are within noise, so the order below the top is not firm. The validation curve, which includes k=10 (all features), picked k=5: that is the subset-versus-all decision, and it is frozen before the test rows are touched. On the untouched test rows those five groups score r2 0.13 against 0.15 for all ten: the selection did not beat using every feature here, and a smaller feature set is the only gain left (the drop from validation to test is mostly the difference between two small splits, and partly the optimism of choosing k on the validation curve; see Ablation curve). Report the test number, not the validation one, and do not change the choice because of it: that would make the test rows part of the selection. To decide again, use new development data (or cross-validate inside the training rows), then test once more on rows not used before.

▍ When to use FeatRanker

Use it when you want to know which feature groups a set of different models relies on, with a ranking you can check: a consensus over model families, a dummy baseline, optional shadow features, and a refit curve (ablate()) that tests whether the top groups are enough.

Do not use it, or read it with care, when:

  • n is tiny. Rankings from a few dozen evaluation rows are mostly noise; ties and within_noise findings are the signal to stop. Use rank_resampled() to see how much the order moves.
  • You need causal claims. Permutation importance describes how fitted models use a feature, not what happens if you change it.
  • You want one model's importance. The consensus is over many models by design; for a single model use scikit-learn's permutation_importance directly.
  • p is very wide and you have no feature groups. Every column is its own group and the cost grows with the number of groups; group columns, use group="fast", or see the memory and speed notes in the performance guide.
  • You would shrink a real-data feature set with min_shadow_share=0.5 alone. In the real-data study that rule kept as little as 1% of the features on some datasets and lost held-out score there; choose k from the ablation curve with nested cross-validation and check held-out scores.
  • You would trust the shadow p- or q-values as calibrated. They are experimental; see the report guide and the benchmark, which also shows where FeatRanker loses.

▍ 03 · How it works

fit()            train every model + a dummy baseline on the training data
rank_features()  score every model on the evaluation data
                 shuffle each feature group n_repeats times, measure the score drop
                 rank the groups within each model
                 models that beat the dummy vote, one vote per model family
                 ->  median / mean rank consensus

For each model, a feature group's importance is how much that model's score drops when the group is shuffled:

importance = model_score - model_score_after_shuffling

Every model uses the same scorer. In the report, the unshuffled score is each model's evaluation_score; baseline_score is the dummy's score, used only for the vote.

To see why a ranking looks the way it does, FeatureRanker(..., evidence=True) adds each model's train score and overfit gap, pairs of correlated groups, and (with featranker[shap]) how each group pushes predictions (details).

Permutation importance splits credit between near-copies. auto_groups(X) proposes feature_groups from correlation (no target), and ConsensusSelector(feature_groups="auto") or the CLI's --feature-groups auto computes them on the training data (details).

To see how stable a ranking is, rank_resampled() repeats this over cross-validation splits and reports each group's rank range and how often it lands in the top k (details).

With shadows=True, each stability row also shows which model families beat their shuffled shadows (shadow_families), and ConsensusSelector(min_shadow_families=2) keeps groups that at least two families find, for effects such as interactions that only some model types capture. It is a heuristic: its false-selection rate is not yet measured (see the calibration study) (details).

Built-in linear models are wrapped in a StandardScaler pipeline fit on training data only; tree models and your own models are used as given. With missing="impute", NaN is accepted and every built-in model starts with a median imputer fit on its training split only, so evaluation rows never shape the imputation (details).

With categorical="auto" (or a list of column names), raw text and category columns are accepted: levels are learned from each fit's training rows only, built-in linear models one-hot encode them and trees use the codes, and every column is still ranked as one feature (details).

With model_input="dataframe", every model, custom ones included, receives a pandas DataFrame with the feature names (and shadow__<name> shadow columns), so your own pipelines can select columns by name; a pipeline that drops the shadow columns is flagged and left out of the shadow evidence (details).

With sample_weight= on fit(), rank_features(), and rank_resampled() (and --sample-weight COLUMN on the CLI), models are fit and every score is computed with your weights; models that cannot take weights (built-in lda, qda, pls_regression) are recorded as fit failures, and correlation and SHAP evidence stay unweighted (details).

With max_samples= on rank_features() and rank_resampled() (ConsensusSelector(max_samples=...), --max-samples on the CLI), permutation scores use one random subsample of the evaluation rows, the same for the dummy gate and every score (details).

For large data, fit(max_samples=) fits on a subsample of the training rows (ConsensusSelector(max_train_samples=), --max-train-samples), and max_categories= caps the one-hot columns per categorical column in the built-in linear models (--max-categories) (details).

With scoring=["r2", "neg_mean_absolute_error"] (a list; --scoring a,b on the CLI), the first scorer ranks and the others are scored on the same permuted copies, reported per model as secondary (details).

With shuffle="within_groups" (labels passed as shuffle_groups=, or groups= in rank_resampled() and ConsensusSelector) or shuffle="circular" (rows in time order), permutations and shadows shuffle within groups or by a cyclic shift instead of freely, which respects grouped or time-ordered rows (details).

With ranker.ablate(X_train, y_train, X_eval, y_eval, report), the voting models are refit on the top-k consensus groups for several k, giving a curve of how well the top groups alone score; the CLI's --ablate adds it, and --drop id,created_at removes ID or timestamp columns from both CSVs (details).

Every report carries a run block (preset, data and split fingerprints, and the auto_groups threshold when grouping was automatic) so repeated runs can be compared, and summarize() reads resampled reports too (details).

[!IMPORTANT] Ranking belongs inside the training portion of validation. In nested validation, fit and rank on inner folds only, and keep the outer test fold untouched until final evaluation. Never use outer-fold or final-test rankings to choose features. ConsensusSelector does this for you as a scikit-learn Pipeline step.

▍ 04 · Docs

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases featranker

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229