Skip to content

Releases: lhallee/featureranker

v3.0.4

Choose a tag to compare

@lhallee lhallee released this 18 Aug 17:15

Added

  • Split-aware Hub loading: get_hf_data now resolves a dataset's own validation (validation/valid/val/dev) and test splits automatically (valid_split/test_split, "auto" by default; name explicitly or disable with None). When extra splits exist the return is a DataSplits whose frames were cleaned and encoded jointly, so feature columns always match across splits (a category seen only in test still gets its sub-feature everywhere); rows are cleaned per split and n_rows samples train only.
  • Held-out evaluation for convex fits: fit_convex and RankingResult.fit_convex accept valid=(X, y) and test=(X, y) pairs they never train on (e.g. splits.valid, splits.test). Eval targets are encoded with the fitting target's class mapping; unseen labels raise. Best practice: fit on train, choose settings on valid, quote test.

Changed

  • ConvexFit.metrics reports the AUC/R2 per split ("train", plus "valid"/"test" when given); metric_value became a property over it and method_metrics now maps each selection to its per-split metrics.
  • get_data keeps the original row index of surviving rows instead of resetting it.

v3.0.3

Choose a tag to compare

@lhallee lhallee released this 18 Aug 16:51

Added

  • Maximum-entropy smoothing for convex fits: fit_convex and RankingResult.fit_convex gain entropy (default 0.1), which adds entropy * Var(y) * sum(w * log w) to the simplex least-squares objective. The entropy gradient diverges at the simplex boundary, so the optimum is strictly interior: every weight stays strictly positive, and the fit is unique even when features duplicate each other (near-duplicates split the weight symmetrically instead of one arbitrarily taking it all). Scaling by Var(y) makes the strength invariant to target units. entropy=0 recovers plain least squares, where redundant features get exact zero weights.

v3.0.2

Choose a tag to compare

@lhallee lhallee released this 18 Aug 04:27

Added

  • Glob column drops: columns_to_drop accepts patterns alongside exact names — "target_*" drops every matching column. A pattern never drops the target itself, and a pattern matching nothing raises to catch typos. Works in get_data and get_hf_data.
  • Probe metrics: feature_ranking(probe=True) (the default) evaluates every method's ranking with a shared cross-validated linear probe (standardized logistic regression or ridge, 3-fold, top-k cuts 1-64, at most 10,000 seeded rows). Per-method reports land in diagnostics[method]["probe"] and result.probe_table().
  • Auto-tuned vote weights: voting(result, weights="auto") weights each method by its probe skill, so more predictive methods vote harder; all-at-chance falls back to equal weights.
  • Per-method convex metrics: RankingResult.fit_convex fills ConvexFit.method_metrics with the fit metric recomputed on each ranking method's own top_n selection beside the returned "ensemble" fit.

Changed

  • fit_convex clamps a top_n above the feature count to all features instead of raising, so a fixed NUM_KEEP works across datasets of any width.

v3.0.1

Choose a tag to compare

@lhallee lhallee released this 18 Aug 00:57

Added

  • Hugging Face Hub integration: get_hf_data downloads a Hub dataset split, converts it to pandas, and returns ranking-ready (X, y) given the label column and columns to exclude; load_hf_dataset returns the raw DataFrame; hf_login authenticates for private or gated datasets. datasets >= 2.19 joins the required dependencies.
  • Convex combination fitting: RankingResult.fit_convex(X, y, top_n=...) fits the optimal weights >= 0 summing to one over the top consensus features (a deterministic convex quadratic program), and the standalone fit_convex fits every column of X. Features are z-scored internally by default (standardize=False fits the raw values). Both return a ConvexFit with aligned weights, an R2 or ROC AUC fit metric, predict, and table.
  • get_data gained encoding and max_categories parameters.

Changed

  • get_data now one-hot encodes categorical feature columns by default: each unique value becomes a 0/1 sub-feature named "{column}-{value}" (color-blue for strings, color-0 for integer categories), injected at the parent column's position. Columns with more than max_categories unique values (default 64) fall back to label encoding, and encoding="label" restores the previous behavior. Booleans stay single 0/1 columns.

v3.0.0

Choose a tag to compare

@lhallee lhallee released this 15 Aug 21:41
be982f0

Breaking release: the ranking engine, public API, packaging, and docs were rebuilt. Full details in CHANGELOG.md and the v2 to v3 migration guide.

Highlights

  • Correct L1 classification rankings. v2 recorded the wrong end of the regularization path (scores collapsed to ties), crashed on 3+ classes, and was nondeterministic. v3 finds each feature's true entry point with parallel coarse-to-fine C waves: 236.6s to 8.3s on 20k x 500, and deterministic at any n_jobs.
  • Adaptive L1 regression paths: exact Gram-based LARS breakpoints when affordable, dense warm-started coordinate descent otherwise.
  • Halving hyperparameter search for the tree models (27 candidates on subsampled rungs) with exactly one final full-data fit.
  • Typed results: feature_ranking returns a frozen RankingResult (rankings dict, rank/score matrices, diagnostics, save/load); per-method options dataclasses replace silent kwargs; ValueError contract throughout.
  • Any numeric feature matrix: pass a bare 2D numpy array (embeddings, pooled hidden states) and features get stable generated IDs. The ModernBERT sentiment example ranks 1,536 unnamed transformer dimensions; its top 20 keep 96.7% of full-representation probe accuracy and beat PCA, UMAP, and t-SNE at matched dimensionality.
  • Redesigned plots (consensus dot plot, rank heatmap, emphasis vote bars) and a docs/ reference set with self-regenerating examples.
  • Floors: Python >= 3.11, scikit-learn >= 1.8, xgboost >= 2.0. License is now MIT.

🤖 Generated with Claude Code

v2.0.0 release

Choose a tag to compare

@lhallee lhallee released this 03 Apr 20:44

Full Changelog: 1.3.2...2.0.0

1.3.2

Choose a tag to compare

@lhallee lhallee released this 20 Mar 20:57
Update pyproject.toml

1.3.1

Choose a tag to compare

@lhallee lhallee released this 20 Mar 20:51
Merge branch 'main' of https://github.com/lhallee/featureranker

1.3.0

Choose a tag to compare

@lhallee lhallee released this 20 Mar 20:36
053d90e

What's Changed

New Contributors

Full Changelog: v1.2.2...1.3.0

1.2.2

Choose a tag to compare

@lhallee lhallee released this 23 Oct 02:56

Bugfix