API

Core elimination interfaces

rf_rfe(estimator, X, Y, features, fold[, ...])

Run random-forest feature elimination over an iterator process.

dev_rfe(estimator, X, Y, features, fold[, ...])

Recursive feature elimination for estimators using a dev split.

LOWESS helpers

extract_max_lowess(d[, frac, multi, acc])

Extract max features based on LOWESS rate of change.

extract_peripheral_lowess(d[, frac, ...])

Extract peripheral features based on LOWESS curvature.

optimize_lowess_plot(d, fold, output_dir[, ...])

Plot the LOWESS smoothing curve with selection annotations.

Plotting functions

Plotting helpers live in dRFEtools.plotting and are re-exported from the top-level package for convenience.

plot_metric(d, fold, output_dir, ...)

Plot feature elimination results for a metric.

plot_with_lowess_vline(d, fold, output_dir)

Plot LOWESS smoothing with feature count annotations.

Ranking utilities

features_rank_fnc(features, rank, ...)

Ranks features and writes the results to a file :type features: :param features: A vector of feature names :type rank: :param rank: A vector with feature ranks based on absolute value of feature importance :type n_features_to_keep: int :param n_features_to_keep: Number of features to keep. :type n_features_to_keep: int :type fold: int :param fold: Current fold being analyzed. :type fold: int :type out_dir: str :param out_dir: Output directory for text file. Default is current directory. :type out_dir: str :type RANK: bool :param RANK: Whether to perform ranking and write results. :type RANK: bool.

Developmental set metrics functions

dev_score_accuracy(estimator, X, Y)

Accuracy for development predictions.

dev_score_evar(estimator, X, Y)

Explained variance for development predictions.

dev_score_mse(estimator, X, Y)

Mean squared error for development predictions.

dev_score_nmi(estimator, X, Y)

Normalized mutual information for development predictions.

dev_score_r2(estimator, X, Y)

Coefficient of determination for development predictions.

dev_score_roc(estimator, X, Y)

Area under the ROC curve for development predictions.

Out-of-Bag (OOB) metrics functions

oob_score_accuracy(estimator, Y)

Accuracy for OOB predictions.

oob_score_evar(estimator, Y)

Explained variance for OOB predictions.

oob_score_mse(estimator, Y)

Mean squared error for OOB predictions.

oob_score_nmi(estimator, Y)

Normalized mutual information for OOB predictions.

oob_score_r2(estimator, Y)

Coefficient of determination for OOB predictions.

oob_score_roc(estimator, Y)

Area under the ROC curve for OOB predictions.

Utility helpers

utils.normalize_rfe_result(result)

Coerce RFE outputs into the standardized dictionary format.

utils.get_feature_importances(estimator)

Return absolute feature importance values from an estimator.

utils.save_plot_variants(plot_obj, ...[, ...])

Persist a plot to standard image formats.

utils.ensure_path(path_like)

Normalize user-provided file system paths.

Command-line entry points

cli.build_parser()

cli.run_rf_rfe(args)

cli.run_dev_rfe(args)