Repository navigation
Releases
Releases · WithPrecedent/logit-encode
Release: 0.1.1
- 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
LogitEncodersetting, the bestcategory_encodersencoder, and
scikit-learn'sTargetEncoder, 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
LogitEncodera drop-in replacement for the supervised
category_encodersencoders: the same parameters in the same order
(includingmin_group_size,min_group_name,combine_min_nan_groups,
composite_cols, andkeep_components, implemented with
category_encoders' own helpers), the samemapping,ordinal_encoder,
invariant_cols, andfeature_names_out_attributes, the
get_feature_names_inand deprecatedget_feature_namesmethods, 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 throughtransformin 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-numericCorl1_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_encodersto 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
bypython -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
- 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'sTargetEncoder. - The
category_encodersoptions for columns, invariant columns, output
type, and missing and unknown categories. - Passes scikit-learn's
check_estimator.
- Joint (one model for all columns, the default) and univariate (one
- Added
logit_encode.utils.BaseEncoder,SupervisedTransformerMixin, and
OutputColumn, which mirrorcategory_encoders' base classes but follow
scikit-learn's estimator contract. - Added benchmarks against every
category_encodersencoder and
scikit-learn'sTargetEncoderon 13 OpenML datasets, with the results in
the documentation. - Added a citation file and a citation section in the README.