Skip to content

Releases

Release: 0.1.1

Choose a tag to compare

@github-actions github-actions released this 02 Dec 00:46
  • Redrew the README's comparison plot so it is readable at the README's
    width: one horizontal band per dataset with a dot for the best
    LogitEncoder setting, the best category_encoders encoder, and
    scikit-learn's TargetEncoder, a shared AUC scale from 0.5 to 1 labeled
    once at the bottom, lines between the bands, the best encoders named
    beside each band, and see-through dots so overlapping dots stay visible.
  • Added LogitEncoder.get_mapping, which returns tables of each category's
    encoded values (with standard errors and counts when requested), and
    LogitEncoder.inverse_transform, which converts encoded data back to its
    categories.
  • Made LogitEncoder a drop-in replacement for the supervised
    category_encoders encoders: the same parameters in the same order
    (including min_group_size, min_group_name, combine_min_nan_groups,
    composite_cols, and keep_components, implemented with
    category_encoders' own helpers), the same mapping, ordinal_encoder,
    invariant_cols, and feature_names_out_ attributes, the
    get_feature_names_in and deprecated get_feature_names methods, the same
    default columns (booleans are no longer encoded by default), the same
    feature names for arrays, flat lists as one column, and extra DataFrame
    columns passed through transform in place.
  • Fixed multiclass outcomes whose class names end in "se" (such as "false"
    or "house"), which were mistaken for standard error columns.
  • Fixed columns that are not encoded losing their dtype (such as
    'category') in the output.
  • Raised clear errors for duplicate input columns, output columns that would
    have the same name, non-numeric C or l1_ratio, and continuous
    outcomes.
  • Added tests of the new methods, of compatibility with category_encoders,
    and of edge cases.
  • Added a comparison with scikit-learn and category_encoders to the
    README: a plot and table of each library's best encoder and its mean AUC
    on each of the nine benchmark datasets where every encoder ran, written
    by python -m benchmarks.readme.
  • Compared the benchmark encoders by their mean AUC (overall and by
    classifier) on the same datasets instead of by mean rank, which hid how
    small most differences are.
  • Made the benchmark tables easier to read: plain names that wrap between
    words, summary tables that compare encoders on the same datasets,
    collapsible per-dataset tables split by dataset size, and tighter cells
    so the tables fit without scrolling sideways.

Release: 0.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 21:27
  • Added LogitEncoder, which encodes categorical features with the log
    odds, coefficients, or marginal effects from a logit model of a binary or
    multiclass outcome.
    • Joint (one model for all columns, the default) and univariate (one
      model per column) models.
    • scikit-learn and statsmodels backends, which minimize the same
      penalized log loss.
    • L2, L1, and elastic net penalties, and a choice of reference category.
    • Multiclass outcomes, with a column per class against the most frequent
      class, fit as baseline-category logits.
    • return_uncertainty, which adds each value's standard error and each
      category's number of training rows.
    • interactions, which encodes combinations of columns as columns of
      their own.
    • Cross-fitting of the training rows in fit_transform, as in
      scikit-learn's TargetEncoder.
    • The category_encoders options for columns, invariant columns, output
      type, and missing and unknown categories.
    • Passes scikit-learn's check_estimator.
  • Added logit_encode.utils.BaseEncoder, SupervisedTransformerMixin, and
    OutputColumn, which mirror category_encoders' base classes but follow
    scikit-learn's estimator contract.
  • Added benchmarks against every category_encoders encoder and
    scikit-learn's TargetEncoder on 13 OpenML datasets, with the results in
    the documentation.
  • Added a citation file and a citation section in the README.