Release history#
Release 0.10.0#
New Features#
Transformers:
The
SessionEncoderis now available. This encoder adds asession_idcolumn, which groups together events that occur within the given session gap. Additionally, it is possible to provide asplit_bycolumn or list of columns (e.g., user ID or (user ID, user device)) to compute sessions for each grouping value. #1930 by Riccardo Cappuzzo.The
DropSimilartransformer has been added, for removing columns that present high correlation with other columns in a dataframe . #2023 by Eloi Massoulié.ToFloatnow allows users to specifydecimalandthousandseparators to parse numerical columns that use formatting different from the default formatting used in Python, such as1'234,5. Additionally, negative numbers indicated with parentheses can be converted to the regular numeric format ((432)becomes-432). #1772 by Gabriela Gómez Jiménez.The transformer
DurationToFloathas been added. #2069 by Riccardo Cappuzzo.
TableReport:
TableReport.json()now includes histogram data for numeric and datetime columns (the bin count and edges, and numbers of low and high outliers). Nowjson()contains all the information shown in the report HTML rendering, including the plots. The schema of the generated JSON is available at TableReport JSON schema. #2164 by Jérôme Dockès.The
TableReportcan now be exported in markdown format withmarkdown(). #2048 by Riccardo Cappuzzo.TableReport.dict()now allows exporting the report data as a Python dictionary. #2188 by m4nn2609-dot.
Data Ops:
ParamSearch.plot_results()andOptunaParamSearch.plot_results()accept new parametersshow_scores,show_choices, andshow_timesto control respectively which scores, choices (params), and times (fit or score durations) should be included in the figure. #2202 by Jérôme Dockès.New
SkrubLearnermethodsSkrubLearner.get_named_params()andSkrubLearner.set_named_params()allow getting and setting the outcomes for choices contained in the DataOp, keyed by choice name. They provide a more robust way of transferring selected hyperparameters from one DataOp to a different one thanSkrubLearner.get_params()andSkrubLearner.set_params(). #2090 by Jérôme Dockès.A parameter
becomes_defaulthas been added tovar(). It allows indicating that the provided previewvalueshould also be treated as a default value for this variable in all contexts (for example in a SkrubLearner’s method likefitorpredict). #2082 by Jérôme Dockès.It is now possible to attach new preview values to the variables in a DataOp with
DataOp.skb.set_data(). #2081 by Jérôme Dockès.DataOpobjects have a new attributeDataOp.skb.id.DataOp.skb.idprovides an alternative for referring to a node in the environment passed toDataOp.skb.eval(),SkrubLearner.predict(), etc., or inDataOp.skb.find()orSkrubLearner.truncated_after(). #2062 by Jérôme Dockès.
Misc:
A new synthetic dataset generator for timestamped data and session-based operations has been added:
make_retail_events(). #1930 by Riccardo Cappuzzo.Added the
object()selector to select columns with theobject(pandas) orpl.Object(polars) dtype. #2171 by Omkar Kabde.set_config()andconfig_context()now accept atable_report_n_rowsparameter to globally control the default number of rows displayed inTableReport. #2193 by Mann.
Changes#
SkrubLearner’sSkrubLearner.score()has been enhanced when the DataOp usedDataOp.skb.with_scoring(). During scoring, predict(), predict_proba() etc. are cached to avoid recomputation when multiple scorers are used (or one scorer calls them several times). Moreover it is possible to passreturn_predictions=Trueto also retrieve any predictions that have been computed during scoring, in addition to the scores. Finally, in cases where we already have the predictions but want the result of score() without recomputing them, it is possible to provide them in the environment passed toscore({..., "_skrub_predictions": {"predict_proba": ...}}). #2195 by Jérôme Dockès.SkrubLearner.find_fitted_estimator()now supports searching for the apply node by ID or callable predicate as alternatives to the node name. #2194 by Jérôme Dockès.The minimum required version of matplotlib has been increased from 3.4.3 to 3.6.1. #2159 by Riccardo Cappuzzo.
Gallery examples have been grouped into subject-specific sections. #2102 by Maureen Githaiga.
choose_from()now transparently convertsoutcomesto a list when it is another type of sequence. #2100 by aidbar.An unnecessary warning that was raised when passing a numpy array to the TableVectorizer has been removed. #1908 by Sandrine Henry.
The error message displayed in the Associations tab of the
TableReporthas been improved for reports where only one column is present. #2094 by Alicja Kosak.Added support for numpy arrays in
DataOp.skb.concat(). #2096 by Ayesha Siddiqua.
Bugfixes#
A bug in how the
TableVectorizerandCleanertreated columns duration columns in pandas and polars has been fixed. Now, both classes convert durations to the total number of seconds (with fractional part). This is done by the new transformerDurationToFloat. #2069 by Riccardo Cappuzzo.An error that could arise when running
TableReporton dataframes containing double dollar ($$) signs has been fixed. #2154 by Katerina Michenina, CecilyTS, Eve Rabin.MinHashEncoderwith the defaulthashing="fast"now uses every n-gram size inngram_range(the upper bound is inclusive, as documented and as already done byhashing="murmur"). Previously the largest size was dropped, so the defaultngram_range=(2, 4)ignored 4-grams and a single-size range such as(3, 3)produced the same constant encoding for every string. #2168 by José Maia.An error that happened when running
TableReportorcolumn_associationson some dataframes with non-string column names has been fixed in #2179 by Jérôme Dockès.An error that could arise in histograms when running
TableReporton data with a very small range (less than 10 representable floating-point numbers between min and max) has been fixed. #2189 by Jérôme Dockès.
Deprecations#
The parameter
order_byofTableReportis deprecated. Passingorder_bynow emits aDeprecationWarning#2101 by Heidi Koivisto.
Release 0.9.0#
New Features#
It is now possible to pass additional (dynamically computed) arguments to the scorers used by
DataOpobjects for validation, hyperparameter search etc. For example, sample weights. This is achieved by passing the scorers and their arguments toDataOp.skb.with_scoring(). #1995 by Jérôme Dockès.The diagrams displayed in notebooks for
SkrubLearner,ParamSearchandOptunaParamSearchhave been improved and now display theDataOpthey contain. #2024 by Jérôme Dockès.The method
DataOp.skb.find()can find a node by name (or by a callable predicate) in a DataOp. The methodDataOp.skb.find_X_y()finds the nodes marked withDataOp.skb.mark_as_X()andDataOp.skb.mark_as_y(), and thecvsplitter andsplit_kwargspassed toDataOp.skb.mark_as_X(), if they exist. #2041 by Jérôme Dockès.selectors.has_dtype()has been added, allowing users to select columns by passing the dtype objects they want to match. #2027 by kudos07.A new dataframe generator,
datasets.toy_cities(), has been added for use cases on dataframes with variable sizes and variable correlation between columns. #2042 by Eloi Massoulié.A new selector function,
selectors.drop(), has been added to drop columns from a dataframe using a selector. It mirrors the behavior ofselectors.select(). #2108 by Mary Njoroge.
Changes#
TableReportnow acceptsplot_distributionsandcompute_associationsparameters (True,False, or"auto") to explicitly control whether distribution plots and pairwise associations are computed. The threshold parameters controlling the maximum number of columns for which these are computed have been renamed toplots_thresholdandassociations_thresholdfor clarity. #1907 by JulietteBgl.The row indices of training and testing samples are now also included in the dictionaries produced by
DataOp.skb.iter_cv_splits(). #2012 by Jérôme Dockès.The
Cleanernow exposes aparse_numbersboolean parameter to control whether numeric-looking strings (e.g.,["1", "2", "3"]) are parsed tofloat32, and acast_to_floatparameter to downcast numeric columns tofloat32. #1910 by Varshith-yadaV.fetch_toxicity()now returns a shuffled version of the dataset by default. #1892 by Riccardo Cappuzzo.Added a
metricparameter tofuzzy_join()andJoinerto configure the nearest-neighbor distance used for matching. The metric can be any value supported byNearestNeighbors(see its docstring). #1861 by Saba Siddique.ApplyToColsnow accepts anexclude_colsparameter, making it possible to transform the columns selected bycolsexcept for an explicit subset, mirroringDataOp.skb.apply(). #2039 by Saba Siddique.In python versions >= 3.11,
ApplyToColsnow produces better error tracebacks when the wrapped transformer fails, . #1979 by Jérôme Dockès.The parameter
howofDataOp.skb.apply()is replaced by a simpler Boolean parameterno_wrap. #2049 by Jérôme Dockès.The
exclude_colsofDataOp.skb.apply()can now be a DataOp. #2050 by Jérôme Dockès.Skrub estimators now correctly show links to the documentation in the HTML representation that is generated for notebooks. #2036 by Riccardo Cappuzzo.
Bugfixes#
An error that could arise when calling
scoreon aSkrubLearnerthat contains an inner transformer that has ascoremethod has been fixed. #2052 by Jérôme Dockès.
Deprecations#
The parameter
numeric_dtypein theCleanerhas been deprecated in favor ofcast_to_floatin #1910.The parameter
drop_if_uniqueofCleanerandDropUninformativehas been deprecated. #2040 by Riccardo Cappuzzo.The parameters
max_plot_columnsandmax_association_columnsof theTableReporthave been deprecated in favor ofplot_distributionsandcompute_associations. #1907.
Release 0.8.0#
New Features#
The
eager_data_opsconfiguration option has been added. When set to False, no previews are computed and validation is deferred until the DataOp is actually used (e.g. with.skb.eval()) rather than as soon as it is defined. This can make the definition of complex DataOps with many nodes faster (the overhead it removes typically becomes noticeable only in DataOps with 50-100 nodes or more). Moreover, the evaluation of large DataOps has also become faster. #1890 by Jérôme Dockès.The reports produced by
DataOp.skb.full_report()andSkrubLearner.report()now also display the values provided in the environment. #1920 by Jérôme Dockès.SkrubLearner,ParamSearchandOptunaParamSearchexpose some more attributes for inspection by scikit-learn:__sklearn_tags__,classes_,_estimator_type. #1931 by Jérôme Dockès.It is now possible to pass additional (dynamically computed) arguments to the cross-validation splitter used by
DataOpobjects for validation, hyperparameter search etc. For example, the groups for asklearn.model_selection.GroupKFoldcan be computed as part of the DataOp evaluation and used for splitting. This is achieved by passing the splitter and its arguments toDataOp.skb.mark_as_X(). #1943 by Jérôme Dockès.selectors.has_nulls()now takes aproportionparameter, which allows selecting columns that have a fraction of null values above the given threshold. #1881 by Gabriela Gómez Jiménez.Added a new dataset,
fetch_electricity_usage(), which contains electricity usage data for several French cities and corresponding weather data. #2013 by Lisa McBride.
Changes#
Increased the minimum version of polars from 0.20 to 1.5.0. #1897 by Riccardo Cappuzzo.
ApplyToColsandApplyToFramehave been merged into a single class,ApplyToCols,that covers the functionality of both the old classes by detecting automatically whether the provided transformer should be applied independently on each column, or on all selected columns as a single dataframe. As a result,ApplyToColsandApplyToFramehave been removed. #1913, #1919 and #1962 by Riccardo Cappuzzo.The dataset fetcher functions now include a “path” field for each table in the dataset. For example, the dataset “employee_salaries” now has the field
employee_salaries_path. Additionally, datasets that include a single table have the fieldpath. These fields contain the paths to the datasets stored in theskrub_datafolder. The defaultskrub_datafolder can now be set in the skrub configuration and by setting theSKB_DATA_DIRECTORYenvironment variable. The environment variableSKRUB_DATA_DIRECTORYis deprecated and will be removed in a future version of skrub. #1852 by Riccardo Cappuzzo. Examples in the gallery have been updated accordingly in #1940 and #1964 by MuditAtrey.SingleColumnTransformerand associated exceptionRejectColumn(used internally by many skrub estimators) have been added to the public API, in the newly-createdskrub.coremodule. #1851 by Eloi Massoulié.Added the strings
"None"and"none"to the list of null string values inCleaner. Also, exposed the list of null string values that will be set to null by theCleaneras the parameternull_strings. #1952 and #1954 by Lisa McBride.The configuration parameter “use_table_report” has been removed from the skrub configuration. Use
patch_display()instead. #1973 by Riccardo Cappuzzo.Updated how the
column_filtersparameter ofTableReportworks. It now accepts a dictionary where the key is the display name for the dropdown menu, and the value is a filter of the columns that will be displayed. Accepts either a list of column indices, a list of column names or an instance of theSelector. #1976 by Lisa McBride.The overplotting of the counts atop the vertical histogram bars in the
TableReporthas been removed due to formatting issues. #1984 by Lisa McBride.The maximum number of associations that can be displayed in the
TableReporthas been increased to N=1000, and the associations are now displayed in a scrollable table. #1992 by Lisa McBride.
Bug Fixes#
The
TableVectorizernow correctly handles the case where one of the provided encoders is a scikit-learn Pipeline that starts with a skrub single-column transformer. #1899 by Jérôme Dockès and #1900 by Jérôme Dockès.Errors raised when a polars LazyFrame is passed where an eager DataFrame is expected are now clearer. #1916 by Jérôme Dockès.
DataOp.skb.cross_validate()would raise an error when passedreturn_indices=True. Now it returns the train and test indices of each fold in thetrain_indicesandtest_indicescolumns of the result dataframe. #1953 by Jérôme Dockès.Polars LazyFrames are no longer collected automatically anywhere in the library; a
TypeErroris now raised instead. #1941 by Mudit Atrey.
Release 0.7.2#
Changes#
The
StringEncodernow exposes thevocabularyparameter from the parentTfidfVectorizer. #1819 by Eloi Massouliécompute_ngram_distance()has been renamed to_compute_ngram_distance()and is now a private function. #1838 by Siddharth Baleja.
Bugfixes#
Fixed some issues related to the release of Pandas 3.0. #1855 by Riccardo Cappuzzo.
Release 0.7.1#
New features#
A new dataset,
fetch_california_housing(), has been added to theskrub.datasetsmodule. It allows to get a redundancy copy of the scikit-learnfetch_california_housing()function. #1830 by Guillaume Lemaitre.
Bugfixes#
DropColsandSelectCols:attributes were renamed to end with an underscore, in order to follow a scikit-learn convention which is used to determine if an estimator is fitted. #1813 by Auguste Baum.
Release 0.7.0#
New features#
It is now possible to tune the choices in a
DataOpwith Optuna. See Tuning DataOps with Optuna for an example. #1661 by Jérôme Dockès.DataOp.skb.apply()now allows passing extra named arguments to the estimator’s methods through the parametersfit_kwargs,predict_kwargsetc. #1642 by Jérôme Dockès.TableReport now displays the mean statistic for boolean columns. #1647 by Abdelhakim Benechehab.
DataOp.skb.get_vars()allows inspecting all the variables, or all the named dataops, in aDataOp. This lets us easily know what keys should be present in theenvironmentdictionary we pass toDataOp.skb.eval()or toSkrubLearner.fit(),SkrubLearner.predict(), etc. #1646 by Jérôme Dockès.DataOp.skb.iter_cv_splits()iterates over the training and testing environments produced by a CV splitter – similar toDataOp.skb.train_test_split()but for multiple cross-validation splits. #1653 by Jérôme Dockès.TableReportnow supportsnp.array. #1676 by Nisma Amjad.DataOp.skb.full_report()now accepts a new parameter,title, that is displayed in the html report. #1654 by Marie Sacksick.TableReportnow includes theopen_tabparameter, which lets the user select which tab should be opened when theTableReportis rendered. #1737 by Riccardo Cappuzzo.selectors.Selectornow has documentation for itsselectors.Selector.expand()andselectors.Selector.expand_index()methods, with added information and examples in the user guide, as well as mentions in the corresponding constructor functions. #1841 by Eloi Massoulié.
Changes#
The minimum supported version of Python has been increased to 3.10. Additionally, the minimum supported versions of scikit-learn and requests are 1.4.2 and 2.27.1 respectively. Support for python 3.14 has been added. #1572 by Riccardo Cappuzzo.
The
DataOp.skb.full_report()method now deletes reports created withoutput_dir=Noneafter 7 days. #1657 by Simon Dierickx.The
tabular_pipeline()uses aSquashingScalerinstead of aStandardScalerfor centering and scaling numerical features when linear models are used. #1644 by Simon DierickxThe transformer
ToFloat, previously calledToFloat32, is now public. #1687 by Marie Sacksick.Improved the error message raised when a Polars lazyframe is passed to
TableReport, clarifying that.collect()must be called first. #1767 by Fatima Ben Kadour.Computing the associations in
TableReportis now deterministic and can be controlled by the new parametersubsampling_seedof the global configuration. #1775 by Thomas S..Added
cast_to_strparameter toCleanerto prevent unintended conversion of list/object-like columns to strings unless explicitly enabled. #1789 by @PilliSiddharth.
Bugfixes#
The
skrub.cross_validate()function now raises a specific exception if the wrong variable type is passed. #1799 by Eloi MassouliéFixed various issues with some transformers by adding
get_feature_names_outto all single column transformers. #1666 by Riccardo Cappuzzo.Issues occurring when
DataOp.skb.apply()was passed a DataOp as the estimator have been fixed in #1671 by Jérôme Dockès.TableReportcould raise an error while trying to check if Polars columns with some dtypes (lists, structs) are sorted. It would not indicate Polars columns sorted in descending order. Fixed in #1673 by Jérôme Dockès.Fixed nightly checks and added support for upcoming library versions, including Pandas v3.0. #1664 by Auguste Baum and Riccardo Cappuzzo.
Fixed the use of
TableReportandCleanerwith Polars dataframes containing a column with empty string as name. #1722 by Marie Sacksick.Fixed an issue where
TableReportwould fail when computing associations for Polars dataframes if PyArrow was not installed. #1742 by Riccardo Cappuzzo.Fixed an issue in the Data Ops report generation in cases where the DataOp contained escape characters or were spanning multiple lines. #1764 by Riccardo Cappuzzo.
Added
get_feature_names_out()toCleanerfor consistency with theTableVectorizerand other transformers. #1762 by Riccardo Cappuzzo.Improve error message when
TextEncoderis used without the optional transformers dependencies. #1769 by Fangxuan Zhou.Accessing
.skb.applied_estimatoron aDataOpafter calling.skb.set_name(),.skb.set_description(),.skb.mark_as_X()or.skb.mark_as_y()used to raise an error, this has been fixed in #1782 by Jérôme Dockès.Fixed potential issues that could arise in
ParamSearch.plot_results()when NaN values were present in the cross-validation results. #1800 by Riccardo Cappuzzo.
Release 0.6.2#
New features#
The
DataOp.skb.full_report()now displays the time each node took to evaluate. #1596 by Jérôme Dockès.
Changes#
Ken embeddings are now deprecated, the functions
datasets.get_ken_embeddings(),datasets.get_ken_table_aliases(), anddatasets.get_ken_types()will be removed in the next release of skrub. #1546 by Vincent Maladiere.Improved error messages when a DataOp is being sent to dispatched functions. #1607 by Riccardo Cappuzzo.
The accepted values for the parameter
howofDataOp.skb.apply()have changed. The new values are"auto"(unchanged),"cols"to wrap the transformer inApplyToCols,"frame"to wrap the transformer inApplyToFrame, or"no_wrap"for no wrapping. The old values are deprecated and will result in an error in a future release. #1628 by Jérôme Dockès.The parameter
splitterofDataOp.skb.train_test_split()has been renamedsplit_func. #1630 by Jérôme Dockès.KEN embeddings and all the relevant functions have been removed from skrub. #1567 by Riccardo Cappuzzo.
The objects
tabular_learnerandDropIfTooManyNullswere removed. Usetabular_pipeline()andDropUninformativeinstead. #1567 by Riccardo Cappuzzo.The skrub global configuration now includes a parameter for setting the default verbosity of the
TableReport. #1567 by Riccardo Cappuzzo.
Bugfixes#
Fixed a compatibility bug with Polars 1.32.3 that may cause
ToFloat32to fail when applied to categorical columns. #1570 by Riccardo Cappuzzo.Fixed the display of DataOp objects in google colab cell outputs (no output was displayed). #1590 by Jérôme Dockès.
Fixed an error that occurred when using
.skb.concatwith a pandas dataframe with column names that aren’t strings. #1594 by Riccardo Cappuzzo.Fixed the range from which
choose_float()andchoose_int()sample values whenlog=Falseandn_stepsisNone. It was betweenlowandlow + high, now it is betweenlowandhigh. #1603 by Jérôme Dockès.DataOp hyperparameter search would raise an error when doing classification and using the
scoringparameter, when the dataop contained no variables. Fixed in #1601 by Jérôme Dockès.SkrubLearnerused to do a prediction on the train set duringfit(), this has been fixed. #1610 by Jérôme Dockès.DataOpwould raise errors when containing subclasses of list, tuple or dict that cannot be initialized with an instance of the builtin type (such as classes created bycollections.namedtuple), this has been fixed. DataOps now only recurse into the builtin collections to evaluate their items (not into their subclasses). If you need the items evaluated (ie if they contain DataOps or Choices), store them in one of the builtin collections. #1612 by Jérôme Dockès.SkrubLearner.report()withmode="fit"used to display the dataops themselves, rather than their outputs, in the report. This has been fixed in #1623 by Jérôme Dockès.Fixed a bug that happened when
get_feature_names_outwas called on instances of theDatetimeEncoder. #1622 by Riccardo Cappuzzo.
Release 0.6.1#
Bugfixes#
get_feature_names_outnow works correctly when used byGapEncoder,DropCols,SelectCols:from within a scikit-learnPipeline. In addition,DropCols’sget_feature_names_outmethod now returns the names of the columns that are not dropped, rather than the names of the columns that are dropped. #1543 by Riccardo Cappuzzo.
Release 0.6.0#
Highlights#
Major feature! Skrub DataOps are a powerful new way of combining dataframe transformations over multiple tables, and machine learning pipelines. DataOps can be combined to form compled data plans, that can be used to train and tune machine learning models. Then, the DataOps plans can be exported as
Learners(skrub.SkrubLearner), standalone objects that can be used on new data. More detail about the DataOps can be found in the User guide and in the examples.The
TableReporthas been improved with many new features. Series are now supported directly. It is now possible to skip computing column associations and generating plots when the number of columns in the dataframe exceeds a user-defined threshold. Columns with high cardinality and sorted columns are now highlighted in the report.selectors,ApplyToColsandApplyToFrameare now available, providing utilities for selecting columns to which a transformer should be applied in a flexible way. For more details, see the User guide and the example.The
SquashingScalerhas been added: it robustly rescales and smoothly clips numeric columns, enabling more robust handling of numeric columns with neural networks. See the example
New features#
The skrub DataOps are new mechanism for building machine-learning pipelines that handle multiple tables and easily describing their hyperparameter spaces. Main PR: #1233 by Jérôme Dockès. Additional work from other contributors can be found here: Vincent Maladiere provided very important help by trying the DataOps on many use-cases and datasets, providing feedback and suggesting improvements, improving the examples (including creating all the figures in the examples) and adding jitter to the parallel coordinate plots, Riccardo Cappuzzo experimented with the DataOps, suggested improvements and improved the examples, Gaël Varoquaux , Guillaume Lemaitre, Adrin Jalali, Olivier Grisel and others participated through many discussions in defining the requirements and the public API. See the examples for an introduction.
The
selectorsmodule provides utilities for selecting columns to which a transformer should be applied in a flexible way. The module was created in #895 by Jérôme Dockès and added to the public API in #1341 by Jérôme Dockès.The
DropUninformativetransformer is now available. This transformer employs different heuristics to detect columns that are not likely to bring useful information for training a model. The current implementation includes detection of columns that contain only a single value (constant columns), only missing values, or all unique values (such as IDs). #1313 by Riccardo Cappuzzo.get_config(),set_config()andconfig_context()are now available to configure settings for dataframes display and expressions.patch_display()andunpatch_display()are deprecated and will be removed in the next release of skrub. #1427 by Vincent Maladiere. The global configuration includes the parametercardinality_thresholdthat controls the threshold value used to warn user if they have high cardinality columns in their dataset. #1498 by rouk1. Additionally, the parameterfloat_precisioncontrols the number of significant digits displayed for floating-point values in reports. #1470 by George S.Added the
SquashingScaler, a transformer that robustly rescales and smoothly clips numeric columns, enabling more robust handling of numeric columns with neural networks. #1310 by Vincent Maladiere and David Holzmüller.datasets.toy_order()is now available to create a toy dataframe and corresponding targets for examples. #1485 by Antoine Canaguier-Durand.ApplyToColsandApplyToFrameare now available to apply transformers on a set of columns independently and jointly respectively. #1478 by Vincent Maladiere.
Changes#
Warning
The default high cardinality encoder for both TableVectorizer and
tabular_learner() (now tabular_pipeline()) has been changed from
GapEncoder to StringEncoder. #1354 by
Riccardo Cappuzzo.
The
tabular_learnerfunction has been deprecated in favor oftabular_pipeline()to honor its scikit-learn pipeline cultural heritage, and remove the ambiguity with the data ops Learner. #1493 by Vincent Maladiere.StringEncodernow exposes thestop_wordsargument, which is passed to the underlying vectorizer (TfidfVectorizer, orHashingVectorizer). #1415 by Vincent Maladiere.A new parameter
max_association_columnshas been added to theTableReportto skip association computation when the number of columns exceeds the specified value. #1304 by Victoria Shevchenko.The
packagingdependency was removed. #1307 by Jovan StojanovicTextEncoder,StringEncoderandGapEncodernow compute the total standard deviation norm during training, which is a global constant, and normalize the vector outputs by performing element-wise division on all entries. #1274 by Vincent Maladiere.The
DropIfTooManyNullstransformer has been replaced by theDropUninformativetransformer and will be removed in a future release. #1313 by Riccardo CappuzzoThe
concat_horizontal()function was replaced withconcat(). Horizontal or vertical concatenation is now controlled by theaxisparameter. #1334 by Parasa V Prajwal.The
TableVectorizerandCleanernow accept adatetime_formatparameter for specifying the format to use when parsing datetime columns. #1358 by Riccardo Cappuzzo.The
SimpleCleanerhas been removed. useCleanerinstead. #1370 by Riccardo Cappuzzo.The periodic encoding for the
day_in_yearhas been removed from theDatetimeEncoderas it was redundant. The feature itself is still added if the flag is set toTrue. #1396 by Riccardo Cappuzzo.The naming scheme used for the features generated by
TextEncoder,StringEncoder,MinHashEncoder,DatetimeEncoderhas been standardized. Now features generated by all encoders have indices in the range[0, n_components-1], rather than[1, n_components]. Additionally, columns with empty name are assigned a default name that depends on the encoder used. #1405 by Riccardo Cappuzzo.The optional dependencies ‘dev’, ‘doc’, ‘lint’ and ‘test’ have been coalesced into ‘dev’. #1404 by Vincent Maladiere.
The
TableReportnow supports Series in addition to Dataframes. #1420 by Vitor Pohlenz.The
Cleanernow exposes a parameter to convert numeric values to float32. #1440 by Riccardo Cappuzzo.The
TableReportnow shows if columns are sorted. #1512 by Dea María Léon.
Bugfixes#
Fixed a bug that caused the
StringEncoderandTextEncoderto raise an exception if the input column was a Categorical datatype. #1401 by Riccardo Cappuzzo.
Documentation#
A large number of improvements to the examples, docstrings, and the documentation website have been made. Contributors include Vincent Maladiere, Riccardo Cappuzzo, Jérôme Dockès, Gael Varoquaux, Gabriela Gómez Jiménez, Sylvain Combettes, Frits Hermans, Vitor Pohlenz, Arturo Amor Quiroz, Marie Sacksick, Emilien Battel, George El Haber, Antoine Canaguier-Durand, and Lionel Kusch.
Release 0.5.4#
Maintenance#
Make
skrubcompatible with scikit-learn 1.7. #1434 by Vincent Maladiere.
Release 0.5.3#
Changes#
The
SimpleCleanerhas been renamed toCleaner. Use of the nameSimpleCleaneris deprecated and will result in an error in some future release of skrub. #1275 by Riccardo Cappuzzo.A new parameter
max_plot_columnshas been added to theTableReportandpatch_display()to skip column plots when the number of columns exceeds the specified value. #1255 by Priscilla Baah.
Release 0.5.2#
New features#
The
TableReportnow switches its visual theme between light and dark according to the user preferences. #1201 by rouk1.Adding a new way to control the location of the data directory, using envar
SKRUB_DATA_DIRECTORY. #1215 by Thomas S.The
DatetimeEncodernow supports periodic encoding of datetime features with trigonometric functions and B-splines transformers. #1235 by Riccardo Cappuzzo.The
TableReportnow also compute Pearson’s correlation for numeric values. #1203 by Reshama Shaikh and Vincent Maladiere.The
SimpleCleaneris now available (⚠️ it was renamed toCleanerin skrub0.5.3.). This transformer is a lightweight pre-processor that applies some of the transformations applied by theTableVectorizer, with a simpler interface. #1266 by Riccardo Cappuzzo and Jerome Dockes .
Changes#
The estimator returned by
tabular_learner()now uses spline encoding of datetime features when the supervised learner is not a model based on decision trees such as random forests or gradient boosting. #1264 by Guillaume Lemaitre.The “distribution” tab of the
TableReportnow stacks cards horizontally to avoid adding vertical space. #1259 by Gaël VaroquauxProgress messages when generating a
TableReportare now written to stderr instead of stdout. #1236 by Priscilla BaahOptimize the
StringEncoder: lower memory footprint and faster execution in some cases. #1248 by Gaël Varoquaux
Bug fixes#
StringEncodernow works correctly in presence of null values. #1224 by Jérôme Dockès.The
TableVectorizer.get_feature_names_out()method now works when used in a scikit-learn pipeline by exposing theinput_featuresparameter. #1258 by Guillaume Lemaitre.
Release 0.5.1#
New features#
The
StringEncoderencodes strings using tf-idf and truncated SVD decomposition and provides a cheaper alternative toGapEncoder. #1159 by Riccardo Cappuzzo.
Changes#
New dataset fetching methods have been added:
fetch_videogame_sales(),fetch_bike_sharing(),fetch_flight_delays(),fetch_country_happiness(), and removedfetch_road_safety(). #1218 by Vincent Maladiere
Bug fixes#
Maintenance#
Release 0.4.1#
Changes#
TableReporthaswrite_htmlmethod. #1190 by Mojdeh Rastgoo.A new parameter
verbosehas been added to theTableReportto toggle on or off the printing of progress information when a report is being generated. #1182 by Priscilla Baah.A parameter
verbosehas been added to thepatch_display()to toggle on or off the printing of progress information when a table report is being generated. #1188 by Priscilla Baah.tabular_learner()accepts the alias"regression"for the option"regressor"and"classification"for"classifier". #1180 by Mojdeh Rastgoo.
Bug fixes#
Generating a
TableReportcould have an effect on the matplotib configuration which could cause plots not to display inline in jupyter notebooks any more. This has been fixed in skrub in #1172 by Jérôme Dockès and the matplotlib issue can be tracked here.The labels on bar plots in the
TableReportfor columns of object dtypes that have a repr spanning multiple lines could be unreadable. This has been fixed in #1196 by Jérôme Dockès.Improve the performance of
deduplicate()by removing some unnecessary computations. #1193 by Jérôme Dockès.
Maintenance#
Make
skrubcompatible with scikit-learn 1.6. #1169 by Guillaume Lemaitre.
Release 0.4.0#
Highlights#
The
TextEncodercan extract embeddings from a string column with a deep learning language model (possibly downloaded from the HuggingFace Hub).Several improvements to the
TableReportsuch as better support for other scripts than the latin alphabet in the bar plot labels, smaller report sizes, clipping the outliers to better see the details of distributions in histograms. See the full changelog for details.The
TableVectorizercan now drop columns that contain a fraction of null values above a user-chosen threshold.
New features#
The
TextEncoderis now available to encode string columns with diverse entries. It allows the representation of table entries as embeddings computed by a deep learning language model. The weights of this model can be fetched locally or from the HuggingFace Hub. #1077 by Vincent Maladiere.The
column_associations()function has been added. It computes a pairwise measure of statistical dependence between all columns in a dataframe (the same as shown in theTableReport). #1109 by Jérôme Dockès.The
patch_display()function has been added. It changes the display of pandas and polars dataframes in jupyter notebooks to replace them with aTableReport. This can be undone withunpatch_display(). #1108 by Jérôme Dockès
Major changes#
AggJoiner,AggTargetandMultiAggJoinernow require theoperationsargument. They do not split columns by type anymore, but applyoperationson all selected cols. “median” is now supported, “hist” and “value_counts” are no longer supported. #1116 by Théo Jolivet.The
AggTargetno longer supportsyinputs of type list. #1116 by Théo Jolivet.
Minor changes#
The column filter selection dropdown in the tablereport is smaller and its label has been removed to save space. #1107 by Jérôme Dockès.
The TableReport now uses the font size of its parent element when inserted into another page. This makes it smaller in pages that use a smaller font size than the browser default such as VSCode in some configurations. It also makes it easier to control its size when inserting it in a web page by setting the font size of its parent element. A few other small adjustments have also been made to make it a bit more compact. #1098 by Jérôme Dockès.
Display of labels in the plots of the TableReport, especially for other scripts than the latin alphabet, has improved.
before, some characters could be missing and replaced by empty boxes.
before, when the text is truncated, the ellipsis “…” could appear on the wrong side for right-to-left scripts.
Moreover, when the text contains line breaks it now appears all on one line. Note this only affects the labels in the plots; the rest of the report did not have these problems. #1097 by Jérôme Dockès and #1138 by Jérôme Dockès.
In the TableReport it is now possible, before clicking any of the cells, to reach the dataframe sample table and activate a cell with tab key navigation. #1101 by Jérôme Dockès.
The “Column name” column of the “summary statistics” table in the TableReport is now always visible when scrolling the table. #1102 by Jérôme Dockès.
Added parameter
drop_null_fractiontoTableVectorizerto drop columns based on whether they contain a fraction of nulls larger than the given threshold. #1115 and #1149 by Riccardo Cappuzzo.The
TableReportnow provides more helpful output for columns of dtype TimeDelta / Duration. #1152 by Jérôme Dockès.The
TableReportnow also reports the number of unique values for numeric columns. #1154 by Jérôme Dockès.The
TableReport, when plotting histograms, now detects outliers and clips the range of data shown in the histogram. This allows seeing more detail in the shown distribution. #1157 by Jérôme Dockès.
Bug fixes#
The
TableReportcould raise an exception when one of the columns contained datetimes with time zones and missing values; this has been fixed in #1114 by Jérôme Dockès.In scikit-learn versions older than 1.4 the
TableVectorizercould fail on polars dataframes when used with the default parameters. This has been fixed in #1122 by Jérôme Dockès.The
TableReportwould raise an exception when the input (pandas) dataframe contained several columns with the same name. This has been fixed in #1125 by Jérôme Dockès.The
TableReportwould raise an exception when a column contained infinite values. This has been fixed in #1150 by Jérôme Dockès and #1151 by Jérôme Dockès.
Release 0.3.1#
Minor changes#
For tree-based models,
tabular_learner()now addshandle_unknown='use_encoded_value'to theOrdinalEncoder, to avoid errors with new categories in the test set. This is consistent with the setting ofOneHotEncoderused by default in theTableVectorizer. #1078 by Gaël VaroquauxThe reports created by
TableReport, when inserted in an html page (or displayed in a notebook), now use the same font as the surrounding page. #1038 by Jérôme Dockès.The content of the dataframe corresponding to the currently selected table cell in the TableReport can be copied without actually selecting the text (as in a spreadsheet). #1048 by Jérôme Dockès.
The selection of content displayed in the TableReport’s copy-paste boxes has been removed. Now they always display the value of the selected item. When copied, the repr of the selected item is copied to the clipboard. #1058 by Jérôme Dockès.
A “stats” panel has been added to the TableReport, showing summary statistics for all columns (number of missing values, mean, etc. – similar to
pandas.info()) in a table. It can be sorted by each column. #1056 and #1068 by Jérôme Dockès.The credit fraud dataset is now available with the
fetch_credit_fraud function(). #1053 by Vincent Maladiere.Added zero padding for column names in
MinHashEncoderto improve column ordering consistency. #1069 by Shreekant Nandiyawar.The selection in the TableReport’s sample table can now be manipulated with the keyboard. #1065 by Jérôme Dockès.
The
TableReportnow displays the pandas (multi-)index, and has a better display & interaction of pandas columns when the columns are a MultiIndex. #1083 by Jérôme Dockès.It is possible to control the number of rows displayed by the TableReport in the “sample” tab panel by specifying
n_rows. #1083 by Jérôme Dockès.the
TableReportused to raise an exception when the dataframe contained unhashable types such as python lists. This has been fixed in #1087 by Jérôme Dockès.Display’s columns name with the HTML representation of the fitted TableVectorizer. This has been fixed in #1093 by Shreekant Nandiyawar.
AggTarget will now work even when y is a Series and not raise any error. This has been fixed in #1094 by Shreekant Nandiyawar.
Release 0.3.0#
Highlights#
Polars dataframes are now supported across all
skrubestimators.TableReportgenerates an interactive report for a dataframe. This page regroups some precomputed examples.
Major changes#
The
InterpolationJoinernow supports polars dataframes. #1016 by Théo Jolivet.The
TableReportprovides an interactive report on a dataframe’s contents: an overview, summary statistics and plots, statistical associations between columns. It can be displayed in a jupyter notebook, a browser tab or saved as a static HTML page. #984 by Jérôme Dockès.
Minor changes#
Joinerandfuzzy_join()used to raise an error when columns with the same name appeared in the main and auxiliary table (after adding the suffix). This is now allowed and a random string is inserted in the duplicate column to ensure all names are unique. #1014 by Jérôme Dockès.AggJoinerandAggTargetcould produce outputs whose column names varied across calls totransformin some cases in the presence of duplicate column names, now the output names are always the same. #1013 by Jérôme Dockès.In some cases
AggJoinerandAggTargetinserted a column in the output named “index” containing the pandas index of the auxiliary table. This has been corrected. #1020 by Jérôme Dockès.
Release 0.2.0#
Major changes#
The
Joinerhas been adapted to support polars dataframes. #945 by Théo Jolivet.The
TableVectorizernow consistently applies the same transformation across different calls totransform. There also have been some breaking changes to its functionality: (i) all transformations are now applied independently to each column, i.e. it does not perform multivariate transformations (ii) inspecific_transformersthe same column may not be used twice (go through 2 different transformers). #902 by Jérôme Dockès.Some parameters of
TableVectorizerhave been renamed:high_cardinality_transformer→high_cardinality,low_cardinality_transformer→low_cardinality,datetime_transformer→datetime,numeric_transformer→numeric. #947 by Jérôme Dockès.The
GapEncoderandMinHashEncoderare now a single-column transformers: theirfit,fit_transformandtransformmethods accept a single column (a pandas or polars Series). Dataframes and numpy arrays are not accepted. #920 and #923 by Jérôme Dockès.Added the
MultiAggJoinerthat allows to augment a main table with multiple auxiliary tables. #876 by Théo Jolivet.AggJoinernow only accepts a single table as an input, and some of its parameters were renamed to be consistent with theMultiAggJoiner. It now has akey`parameter that allows to join main and auxiliary tables that share the same column names. #876 by Théo Jolivet.tabular_learner()has been added to easily create a supervised learner that works well on tabular data. #926 by Jérôme Dockès.
Minor changes#
GapEncoderandMinHashEncoderused to modify their input in-place, replacing missing values with a string. They no longer do so. Their parameterhandle_missinghas been removed; now missing values are always treated as the empty string. #930 by Jérôme Dockès.The minimum supported python version is now 3.9 #939 by Jérôme Dockès.
Skrub supports numpy 2. #946 by Jérôme Dockès.
fetch_ken_embeddings()now add suffix even with the default value for the parameterpca_components. #956 by Guillaume Lemaitre.Joinernow performs some preprocessing (the same as done by theTableVectorizer, eg trying to parse dates, converting pandas object columns with mixed types to a single type) on the joining columns before vectorizing them. #972 by Jérôme Dockès.
skrub release 0.1.1#
This is a bugfix release to adapt to the most recent versions of pandas (2.2) and scikit-learn (1.5). There are no major changes to the functionality of skrub.
skrub release 0.1.0#
Major changes#
TargetEncoderhas been removed in favor ofsklearn.preprocessing.TargetEncoder, available since scikit-learn 1.3.Joinerandfuzzy_join()support several ways of rescaling distances;match_scorehas been replaced bymax_dist; bugs which prevented the Joiner to consistently vectorize inputs and accept or reject matches across calls to transform have been fixed. #821 by Jérôme Dockès.InterpolationJoinerwas added to join two tables by using machine-learning to infer the matching rows from the second table. #742 by Jérôme Dockès.Pipelines including
TableVectorizercan now be grid-searched, since we can now callset_paramson the default transformers ofTableVectorizer. #814 by Vincent Maladiereto_datetime()is now available to support pandas.to_datetime over dataframes and 2d arrays. #784 by Vincent MaladiereSome parameters of
Joinerhave changed. The goal is to harmonize parameters across all estimator that perform join(-like) operations, as discussed in #751. #757 by Jérôme Dockès.dataframe.pd_join(),dataframe.pd_aggregate(),dataframe.pl_join()anddataframe.pl_aggregate()are now available in the dataframe submodule. #733 by Vincent MaladiereFeatureAugmenteris renamed toJoiner. #674 by Jovan Stojanovicfuzzy_join()andFeatureAugmentercan now join on datetime columns. #552 by Jovan StojanovicJoinernow supports joining on multiple column keys. #674 by Jovan StojanovicThe signatures of all encoders and functions have been revised to enforce cleaner calls. This means that some arguments that could previously be passed positionally now have to be passed as keywords. #514 by Lilian Boulard.
Parallelized the
GapEncodercolumn-wise. Parametersn_jobsandverboseadded to the signature. #582 by Lilian BoulardIntroducing
AggJoiner, a transformer performing aggregation on auxiliary tables followed by left-joining on a base table. #600 by Vincent Maladiere.Introducing
AggTarget, a transformer performing aggregation on the target y, followed by left-joining on a base table. #600 by Vincent Maladiere.Added the
SelectColsandDropColstransformers that allow selecting a subset of a dataframe’s columns inside of a pipeline. #804 by Jérôme Dockès.
Minor changes#
DatetimeEncoderdoesn’t remove constant features anymore. It also supports an ‘errors’ argument to raise or coerce errors during transform, and a ‘add_total_seconds’ argument to include the number of seconds since Epoch. #784 by Vincent MaladiereScaling of
matching_scoreinfuzzy_join()is now between 0 and 1; it used to be between 0.5 and 1. Moreover, the division by 0 error that occurred when all rows had a perfect match has been fixed. #802 by Jérôme Dockès.TableVectorizeris now able to apply parallelism at the column level rather than the transformer level. This is the default for univariate transformers, likeMinHashEncoder, andGapEncoder. #592 by Leo Grinsztajninverse_transforminSimilarityEncodernow works as expected; it used to raise an exception. #801 by Jérôme Dockès.TableVectorizerpropagate then_jobsparameter to the underlying transformers except if the underlying transformer already set explicitlyn_jobs. #761 by Leo Grinsztajn, Guillaume Lemaitre, and Jerome Dockes.Parallelized the
deduplicate()function. Parametern_jobsadded to the signature. #618 by Jovan Stojanovic and Lilian BoulardFunctions
datasets.fetch_ken_embeddings(),datasets.fetch_ken_table_aliases()anddatasets.fetch_ken_types()have been renamed. #602 by Jovan StojanovicMake
pyarrowan optional dependencies to facilitate the integration withpyodide. #639 by Guillaume Lemaitre.Bumped minimal required Python version to 3.10. #606 by Gael Varoquaux
Bumped minimal required versions for the dependencies: - numpy >= 1.23.5 - scipy >= 1.9.3 - scikit-learn >= 1.2.1 - pandas >= 1.5.3 #613 by Lilian Boulard
You can now pass column-specific transformers to
TableVectorizerusing thespecific_transformersargument. #583 by Lilian Boulard.Do not support 1-D array (and pandas Series) in
TableVectorizer. Pass a 2-D array (or a pandas DataFrame) with a single column instead. This change is for compliance with the scikit-learn API. #647 by Guillaume LemaitreFixes a bug in
TableVectorizerwithremainder: it is now cloned if it’s a transformer so that the same instance is not shared between different transformers. #678 by Guillaume LemaitreGapEncoderspeedup #680 by Leo GrinsztajnImproved
GapEncoder’s early stopping logic. The parameterstolandmin_iterhave been removed. The parametermax_no_improvementcan now be used to control the early stopping. #663 by Simona Maggio #593 by Lilian Boulard #681 by Leo GrinsztajnImplementation improvement leading to a ~x5 speedup for each iteration.
Better default hyperparameters:
batch_sizenow defaults to 1024, andmax_iter_e_stepsto 1.
Removed the
most_frequentandk-meansstrategies from theSimilarityEncoder. These strategy were used for scalability reasons, but we recommend using theMinHashEncoderor theGapEncoderinstead. #596 by Leo GrinsztajnRemoved the
similarityargument from theSimilarityEncoderconstructor, as we only support the ngram similarity. #596 by Leo GrinsztajnAdded the
analyzerparameter to theSimilarityEncoderto allow word counts for similarity measures. #619 by Jovan Stojanovicskrub now uses modern type hints introduced in PEP 585. #609 by Lilian Boulard
Some bug fixes for
TableVectorizer( #579):check_is_fittednow looks at"transformers_"rather than"columns_"the default of the
remainderparameter in the docstring is now"passthrough"instead of"drop"to match the implementation.uint8 and int8 dtypes are now considered as numeric columns.
Removed the leading “<” and trailing “>” symbols from KEN entities and types. #601 by Jovan Stojanovic
Add
get_feature_names_outmethod toMinHashEncoder. #616 by Leo GrinsztajnRemoved
requestsfrom the requirements. #613 by Lilian BoulardTableVectorizernow handles mixed types columns without failing by converting them to string before type inference. #623`by :user:`Leo Grinsztajn <LeoGrin>Moved the default storage location of data to the user’s home folder. #652 by Felix Lefebvre and Gael Varoquaux
Fixed bug when using
TableVectorizer’stransformmethod on categorical columns with missing values. #644 by Leo GrinsztajnTableVectorizernever output a sparse matrix by default. This can be changed by increasing thesparse_thresholdparameter. #646 by Leo GrinsztajnTableVectorizerdoesn’t fail anymore if an inferred type doesn’t work during transform. The new entries not matching the type are replaced by missing values. #666 by Leo Grinsztajn
Dataset fetcher
datasets.fetch_employee_salaries()now has a parameteroverload_job_titlesto allow overloading the job titles (employee_position_title) with the columnunderfilled_job_title, which provides some more information about the job title. #581 by Lilian Boulard
Fix bugs which was triggered when
extract_untilwas “year”, “month”, “microseconds” or “nanoseconds”, and add the option to set it toNoneto only extracttotal_time, the time from epoch.DatetimeEncoder. #743 by Leo Grinsztajn
Before skrub: dirty_cat#
Skrub was born from the dirty_cat package.
Dirty-cat release 0.4.1#
Major changes#
fuzzy_join()andFeatureAugmentercan now join on numeric columns based on the euclidean distance. #530 by Jovan Stojanovicfuzzy_join()andFeatureAugmentercan perform many-to-many joins on lists of numeric or string key columns. #530 by Jovan StojanovicGapEncoder.transform()will not continue fitting of the instance anymore. It makes functions that depend on it (get_feature_names_out(),score(), etc.) deterministic once fitted. #548 by Lilian Boulardfuzzy_join()andFeatureAugmenternow perform joins on missing values as inpandas.mergebut raises a warning. #522 and #529 by Jovan StojanovicAdded
get_ken_table_aliases()andget_ken_types()for exploring KEN embeddings. #539 by Lilian Boulard.
Minor changes#
Improvement of date column detection and date format inference in
TableVectorizer. The format inference now tries to find a format which works for all non-missing values of the column, and only tries pandas default inference if it fails. #543 by Leo Grinsztajn #587 by Leo Grinsztajn
Dirty-cat Release 0.4.0#
Major changes#
SuperVectorizeris renamed asTableVectorizer, a warning is raised when using the old name. #484 by Jovan StojanovicNew experimental feature: joining tables using
fuzzy_join()by approximate key matching. Matches are based on string similarities and the nearest neighbors matches are found for each category. #291 by Jovan Stojanovic and Leo GrinsztajnNew experimental feature:
FeatureAugmenter, a transformer that augments withfuzzy_join()the number of features in a main table by using information from auxiliary tables. #409 by Jovan StojanovicUnnecessary API has been made private: everything (files, functions, classes) starting with an underscore shouldn’t be imported in your code. #331 by Lilian Boulard
The
MinHashEncodernow supports an_jobsparameter to parallelize the hashes computation. #267 by Leo Grinsztajn and Lilian Boulard.New experimental feature: deduplicating misspelled categories using
deduplicate()by clustering string distances. This function works best when there are significantly more duplicates than underlying categories. #339 by Moritz Boos.
Minor changes#
Add example
Wikipedia embeddings to enrich the data. #487 by Jovan Stojanovicdatasets.fetching: contains a new function
get_ken_embeddings()that can be used to download Wikipedia embeddings and filter them by type.datasets.fetching: contains a new function
fetch_world_bank_indicator()that can be used to download indicators from the World Bank Open Data platform. #291 by Jovan StojanovicRemoved example
Fitting scalable, non-linear models on data with dirty categories. #386 by Jovan StojanovicMinHashEncoder’sminhash()method is no longer public. #379 by Jovan StojanovicFetching functions now have an additional argument
directory, which can be used to specify where to save and load from datasets. #432 by Lilian BoulardFetching functions now have an additional argument
directory, which can be used to specify where to save and load from datasets. #432 and #453 by Lilian BoulardThe
TableVectorizer’s defaultOneHotEncoderfor low cardinality categorical variables now defaults tohandle_unknown="ignore"instead ofhandle_unknown="error"(for sklearn >= 1.0.0). This means that categories seen only at test time will be encoded by a vector of zeroes instead of raising an error. #473 by Leo Grinsztajn
Bug fixes#
The
MinHashEncodernow considersNoneand empty strings as missing values, rather than raising an error. #378 by Gael Varoquaux
Dirty-cat Release 0.3.0#
Major changes#
New encoder:
DatetimeEncodercan transform a datetime column into several numeric columns (year, month, day, hour, minute, second, …). It is now the default transformer used in theTableVectorizerfor datetime columns. #239 by Leo GrinsztajnThe
TableVectorizerhas seen some major improvements and bug fixes:Fixes the automatic casting logic in
transform.To avoid dimensionality explosion when a feature has two unique values, the default encoder (
OneHotEncoder) now drops one of the two vectors (see parameterdrop="if_binary").fit_transformandtransformcan now return unencoded features, like theColumnTransformer’s behavior. Previously, aRuntimeErrorwas raised.
Backward-incompatible change in the TableVectorizer: To apply
remainderto features (with the*_transformerparameters), the value'remainder'must be passed, instead ofNonein previous versions.Nonenow indicates that we want to use the default transformer. #303 by Lilian BoulardSupport for Python 3.6 and 3.7 has been dropped. Python >= 3.8 is now required. #289 by Lilian Boulard
Bumped minimum dependencies:
scikit-learn>=0.23
scipy>=1.4.0
numpy>=1.17.3
pandas>=1.2.0 #299 and #300 by Lilian Boulard
Dropped support for Jaro, Jaro-Winkler and Levenshtein distances.
The
SimilarityEncodernow exclusively usesngramfor similarities, and thesimilarityparameter is deprecated. It will be removed in 0.5. #282 by Lilian Boulard
Notes#
The
transformers_attribute of theTableVectorizernow contains column names instead of column indices for the “remainder” columns. #266 by Leo Grinsztajn
Dirty-cat Release 0.2.2#
Bug fixes#
Fixed a bug in the
TableVectorizercausing aFutureWarningwhen using theget_feature_names_out()method. #262 by Lilian Boulard
Dirty-cat Release 0.2.1#
Major changes#
Improvements to the
TableVectorizerType detection works better: handles dates, numerics columns encoded as strings, or numeric columns containing strings for missing values.
get_feature_names()becomesget_feature_names_out(), following changes in the scikit-learn API.get_feature_names()is deprecated in scikit-learn > 1.0. #241 by Gael Varoquaux- Improvements to the
MinHashEncoder It is now possible to fit multiple columns simultaneously with the
MinHashEncoder. Very useful when using for instance themake_column_transformer()function, on multiple columns.
- Improvements to the
Bug-fixes#
Fixed a bug that resulted in the
GapEncoderignoring the analyzer argument. #242 by Jovan StojanovicGapEncoder’sget_feature_names_outnow accepts all iterators, not just lists. #255 by Lilian BoulardFixed
DeprecationWarningraised by the usage ofdistutils.version.LooseVersion. #261 by Lilian Boulard
Notes#
Remove trailing imports in the
MinHashEncoder.Fix typos and update links for website.
Documentation of the
TableVectorizerand theSimilarityEncoderimproved.
Dirty-cat Release 0.2.0#
Also see pre-release 0.2.0a1 below for additional changes.
Major changes#
Bump minimum dependencies:
scikit-learn (>=0.21.0) #202 by Lilian Boulard
pandas (>=1.1.5) ! NEW REQUIREMENT ! #155 by Lilian Boulard
datasets.fetching - backward-incompatible changes to the example datasets fetchers:
The backend has changed: we now exclusively fetch the datasets from OpenML. End users should not see any difference regarding this.
The frontend, however, changed a little: the fetching functions stay the same but their return values were modified in favor of a more Pythonic interface. Refer to the docstrings of functions
dirty_cat.datasets.fetch_*for more information.The example notebooks were updated to reflect these changes. #155 by Lilian Boulard
Backward incompatible change to
MinHashEncoder: TheMinHashEncodernow only supports two dimensional inputs of shape (N_samples, 1). #185 by Lilian Boulard and Alexis Cvetkov.Update
handle_missingparameters:GapEncoder: the default value “zero_impute” becomes “empty_impute” (see doc).MinHashEncoder: the default value “” becomes “zero_impute” (see doc).
#210 by Alexis Cvetkov.
Add a method “get_feature_names_out” for the
GapEncoderand theTableVectorizer, sinceget_feature_nameswill be depreciated in scikit-learn 1.2. #216 by Alexis Cvetkov
Notes#
Removed hard-coded CSV file
dirty_cat/data/FiveThirtyEight_Midwest_Survey.csv.Improvements to the
TableVectorizerMissing values are not systematically imputed anymore
Type casting and per-column imputation are now learnt during fitting
Several bugfixes
Dirty-cat Release 0.2.0a1#
Version 0.2.0a1 is a pre-release. To try it, you have to install it manually using:
pip install --pre dirty_cat==0.2.0a1
or from the GitHub repository:
pip install git+https://github.com/dirty-cat/dirty_cat.git
Major changes#
Bump minimum dependencies:
Python (>= 3.6)
NumPy (>= 1.16)
SciPy (>= 1.2)
scikit-learn (>= 0.20.0)
TableVectorizer: Added automatic transform through theTableVectorizerclass. It transforms columns automatically based on their type. It provides a replacement for scikit-learn’sColumnTransformersimpler to use on heterogeneous pandas DataFrame. #167 by Lilian BoulardBackward incompatible change to
GapEncoder: TheGapEncodernow only supports two-dimensional inputs of shape (n_samples, n_features). Internally, features are encoded by independentGapEncodermodels, and are then concatenated into a single matrix. #185 by Lilian Boulard and Alexis Cvetkov.
Bug-fixes#
Fix
get_feature_namesfor scikit-learn > 0.21. #216 by Alexis Cvetkov
Dirty-cat Release 0.1.1#
Major changes#
Bug-fixes#
RuntimeWarnings due to overflow in
GapEncoder. #161 by Alexis Cvetkov
Dirty-cat Release 0.1.0#
Major changes#
GapEncoder: Added online Gamma-Poisson factorization through theGapEncoderclass. This method discovers latent categories formed via combinations of substrings, and encodes string data as combinations of these categories. To be used if interpretability is important. #153 by Alexis Cvetkov
Bug-fixes#
Multiprocessing exception in notebook. #154 by Lilian Boulard
Dirty-cat Release 0.0.7#
MinHashEncoder: Added
minhash_encoder.pyandfast_hast.pyfiles that implement minhash encoding through theMinHashEncoderclass. This method allows for fast and scalable encoding of string categorical variables.datasets.fetch_employee_salaries: change the origin of download for employee_salaries.
The function now return a bunch with a dataframe under the field “data”, and not the path to the csv file.
The field “description” has been renamed to “DESCR”.
SimilarityEncoder: Fixed a bug when using the Jaro-Winkler distance as a similarity metric. Our implementation now accurately reproduces the behaviour of the
python-Levenshteinimplementation.SimilarityEncoder: Added a
handle_missingattribute to allow encoding with missing values.TargetEncoder: Added a
handle_missingattribute to allow encoding with missing values.MinHashEncoder: Added a
handle_missingattribute to allow encoding with missing values.
Dirty-cat Release 0.0.6#
SimilarityEncoder: Accelerate
SimilarityEncoder.transform, by:computing the vocabulary count vectors in
fitinstead oftransformcomputing the similarities in parallel using
joblib. This option can be turned on/off via then_jobsattribute of theSimilarityEncoder.
SimilarityEncoder: Fix a bug that was preventing a
SimilarityEncoderto be created whencategorieswas a list.SimilarityEncoder: Set the dtype passed to the ngram similarity to float32, which reduces memory consumption during encoding.
Dirty-cat Release 0.0.5#
SimilarityEncoder: Change the default ngram range to (2, 4) which performs better empirically.
SimilarityEncoder: Added a
most_frequentstrategy to define prototype categories for large-scale learning.SimilarityEncoder: Added a
k-meansstrategy to define prototype categories for large-scale learning.SimilarityEncoder: Added the possibility to use hashing ngrams for stateless fitting with the ngram similarity.
SimilarityEncoder: Performance improvements in the ngram similarity.
SimilarityEncoder: Expose a
get_feature_namesmethod.