Skip to content

Releases

v1.21.2

Choose a tag to compare

@CountZero-Error CountZero-Error released this 26 Oct 08:49

Fixes from an independent review of 1.21.1. Normal rankings are unchanged; the fixes close silent-failure paths.

pip install -U featranker

Fixes

  • Models can no longer corrupt each other. Every model fits and scores on read-only views of the shared arrays (array and model_input="dataframe", SHAP evidence included). A model that writes to its input now fails alone instead of silently changing later models' scores. Some scikit-learn linear models (Ridge; LinearRegression on 1.9) copy the read-only input once while fitting: about +17% peak memory on 1e5 × 200, no runtime change.
  • Opaque transformers are unverified for shadows. A FunctionTransformer with a function, or a transformer scikit-learn does not define, anywhere in a model (later pipeline steps, GridSearchCV, BaggingRegressor, TransformedTargetRegressor's regressor) leaves that model out of the shadow evidence with a shadows failure. Target transformers are not affected. Rankings are unchanged.
  • Shadow rules without shadow evidence (min_shadow_share, max_shadow_q, min_shadow_families) raise a clear ValueError instead of KeyError.
  • Repeated cv splits raise ValueError. A repeated split added no data but shrank shadow q-values.
  • max_shadow_q is experimental. Using it warns that shadow q-values are uncalibrated; shadow_test records "experimental": true.
  • ablate() checks model parameters against the report (raises on a mismatch; warns when the report came from another scikit-learn version).
  • Strict JSON with NumPy integers: random_state, shadow_seed, n_repeats, top_k and similar arguments are recorded as plain ints.
  • CLI checks the output path before ranking and reports write errors without a traceback.
  • The calibration harness test is repaired and benchmarks/ tests run in CI.

Behaviour changes

  • cv with identical splits now raises.
  • Pipelines with custom transformers no longer count toward shadow rules; with only such models, shadow rules raise.
  • shadow_seed, n_repeats and top_k accept NumPy integers.

Docs: Usage · Report

PyPI: https://pypi.org/project/featranker/1.21.2/

FeatRanker 1.21.1

Choose a tag to compare

@CountZero-Error CountZero-Error released this 26 Oct 03:37

First release on GitHub since 0.4.1. It carries every version from 0.5 to 1.21.1 (most of which were never published separately). Full per-version notes are in the docs; highlights below.

pip install -U featranker
pip install -U "featranker[all,shap,plot]"   # XGBoost, CatBoost, SHAP evidence, plots

Requires Python ≥ 3.10 and scikit-learn ≥ 1.5.

Highlights since 0.4.1

Ranking you can trust

  • Family-aware consensus: each model family casts one vote; families= groups your own models.
  • Resampled ranking (rank_resampled) with per-split stability.
  • Shadow features: per-family shares, a binomial hits test with BH q-values (labelled uncalibrated), and a check that every model actually keeps the shadow columns (nested ColumnTransformers, selectors, unions, meta-estimators).
  • Dummy-baseline gate, structured failures, and a run block that fingerprints data, labels, weights and splits.

Using the answer

  • ConsensusSelector: a scikit-learn selector, safe inside nested cross-validation.
  • ablate(): refit on the top-k groups and score each k, with provenance and a paired curve.
  • summarize() findings, Report.plot(), to_frame().
  • Evidence: train score, overfit gap, correlated groups, SHAP for linear and tree models.

Real-world data

  • Missing values (missing="impute"), categorical columns (categorical=[...] or "auto"), named model input (model_input="dataframe"), sample weights end to end.
  • Grouped or time-ordered rows: shuffle="within_groups" / "circular", with a warning for groups that cannot be measured that way.
  • Multiple scorers with shared predictions.
  • Large data: max_samples (scoring), fit(max_samples=) (training), max_categories (one-hot cap); lower memory peaks for shadows and correlations.

CLI: featranker --train-data … --eval-data … --target … --scoring …, plus --drop, --ablate, --categorical, --missing, --sample-weight, --max-categories, --max-train-samples.

1.21.1 fixes

  • Shadow check marks models unverified when a selector, FeatureUnion or ColumnTransformer follows an untracked step or sits inside a meta-estimator.
  • Prediction sharing only for scikit-learn's own scorer class; custom subclasses are called directly.
  • ablate() checks training rows in both directions.
  • Consistent fingerprint scheme for shuffle labels in old pickles; Spearman keeps float32 ranks on newer SciPy.
  • Resampled constant_within_groups finding names the affected splits.
  • Compatibility with scikit-learn 1.9 and Python 3.10 in the test suite.

Upgrading from 0.4.1

  • scikit-learn ≥ 1.5 is required.
  • The lightgbm extra was removed (no built-in model used it); all installs XGBoost and CatBoost.
  • explain() and to_prompt() are deprecated (removal in 2.0).
  • rank_features() returns a Report, a dict subclass; dict use is unchanged.
  • Report fingerprints of integer and boolean data changed in 1.17 (lossless hashing); compare runs within the same scheme (run.fingerprint_scheme).

Known limitations

  • The shadow hits test is not calibrated for arbitrary estimators or overlapping splits.
  • SHAP evidence covers linear and tree models only.
  • Custom transformers that drop columns (other than selectors) are assumed to use every column by the shadow check.
  • The calibration and benchmark studies predate 1.17.

Docs: Usage · Report · API and stability

PyPI: https://pypi.org/project/featranker/1.21.1/

v0.4.1

Choose a tag to compare

@CountZero-Error CountZero-Error released this 13 Oct 07:16

Fixed

  • Built-in sgd_classifier, passive_aggressive, perceptron, linear_svm, and the saga logistic models were unseeded, so their scores changed between runs. They now use random_state=42 like the other models; their scores differ from 0.4.0.

Docs

FeatRanker v0.4.0

Choose a tag to compare

@CountZero-Error CountZero-Error released this 12 Oct 12:47

Added

  • Dummy baseline (DummyClassifier/DummyRegressor): only models that strictly beat it vote in the consensus. Reports gain baseline_score and per-model in_consensus; an empty consensus warns.
  • FeatureRanker(models={...}) to rank with your own estimators or Pipelines (cloned at fit()).
  • n_jobs / --n-jobs to fit and rank models in parallel with results identical to sequential runs.
  • Report provenance (featranker, Python, NumPy, scikit-learn versions) and per-model JSON-safe params.
  • End-to-end tests of the shipped model registry; CI matrix over Python 3.10–3.13 and scikit-learn 1.5.x/latest.

Changed

  • Built-in linear models standardize features internally (StandardScaler fit on training data only).
  • Permutation reuses one scratch matrix per model (same results, less copying).
  • CLI moved to featranker/cli.py (console script featranker.cli:main); CSV flags are argparse-required and no arguments prints help.
  • Every classification target is label-encoded to 0..n-1; regression targets must be numeric.
  • CSV targets are typed by --task, so train/eval label sets stay comparable.

Fixed

  • Longer unseen eval labels were silently truncated to the training label width and accepted.
  • Mixed numeric/text targets across train and eval CSVs produced all-zero scores without error.
  • L1/elastic-net logistic models silently ran as L2 on scikit-learn < 1.8.
  • XGBoost failed on classification labels not starting at 0.
  • pls_da (PLSRegression) removed: it is not a classifier.
  • A failed refit left the ranker marked fitted.
  • NaN/inf features are rejected; CSV BOMs and blank lines are handled; invalid scorer, n_repeats, or feature groups fail before any model is fit.
  • Build requires setuptools>=77 for the SPDX license field.

Removed

  • Legacy preparation workflow: build_ranker(), run_ML(), rankFeatures(), prep_file/prep_class, --prep-file/--prep-class, in-sample evaluation_mode, and featranker.importance.main.

Known issues

  • CatBoost 1.2.8 lacks __sklearn_tags__; scikit-learn 1.8 may turn the current deprecation warning into per-model failures.

Full Changelog: v0.3.0...v0.4.0

FeatRanker v0.3.0

Choose a tag to compare

@CountZero-Error CountZero-Error released this 17 Jul 01:36

Full Changelog: v0.2.0...v0.3.0

FeatRanker v0.2.0

Choose a tag to compare

@CountZero-Error CountZero-Error released this 16 Jul 18:04