Releases: tidymodels/recipes
recipes 1.1.0
Improvements
-
Improved error message for misspelled argument in step functions. (#1318)
-
recipe()
can now take data.frames with list-columns or sf data.frames as input todata
. (#1283) -
recipe()
will now show better error when columns are misspelled in formula (#1283). -
add_role()
now errors if a column would simultaneously have roles"outcome"
and"predictor"
. (#935) -
prep()
will now error if the ptype of the data doesn't match which was used to define the recipe. (#793) -
Added more documentation in
?selections
about howtidyselect::everything()
works in recipes. (#1259) -
New
extract_fit_time()
method has been added that returns the time it took to train the recipe. (#1071) -
step_spline_b()
,step_spline_convex()
,step_spline_monotone()
, andstep_spline_nonnegative()
now throws informative errors if thedegree
,deg_free
, andcomplete_set
arguments causes an error. (#1170) -
step_mutate()
gained.pkgs
argument to specify what packages need to be loaded for step to work. (#1282) -
step_interact()
now gives better error ifterms
isn't a formula. (#1299) -
The
prefix
argument ofstep_dummy_multi_choice()
is now properly documented. (#1298) -
Significant speedup in
step_dummy()
when applied to many columns. (#1305) -
step_dummy()
now gives an informative error on attempt to generate too many columns to fit in memory. (#828) -
step_dummy()
andstep_unknown()
now throw more informative warnings for unseen levels. (#450) -
step_dummy()
now throws more informative warnings forNA
values. (#450)
Bug Fixes
-
NA
levels in factors aren't dropped when passed torecipe()
. (#1291) -
recipe()
no longer crashes when given long formula expression (#1283). -
Fixed bug in
step_ns()
andstep_bs()
whereknots
field inoptions
argument wasn't correctly used. (#1297) -
Bug fixed in
step_interact()
where long formulas were used. (#1231, #1289) -
Fixed documentation mistake where default value of
keep_original_cols
argument were wrong. (#1314)
Developer
-
Developer helper function
recipes_ptype()
has been added, returning expected input data forprep()
andbake()
for a given recipe object. (#1329) -
Developer helper function
recipes_ptype_validate()
has been added, to validate new data is compatible with recipe ptype. (#793) -
Developer helper functions
recipes_names_predictors()
andrecipes_names_outcomes()
have been added to aid variable selection in steps. (#1026)
recipes 1.0.10
recipes 1.0.9
Improvements
-
Minor speed-up and reduced memory consumption for
step_pca()
in thebake()
stage by reducing unused multiplications (@jkennel, #1265) -
Document that
update_role()
,add_role()
andremove_role()
are applied before steps and checks. (#778) -
Documentation for tidy methods for all steps has been added when missing and improved to describe the return value more accurately. (#936)
-
step_dummy()
will now error if passed character instead of loudly ignoring them. Only applicable when settingstrings_as_factors = FALSE
. (#1233) -
It is now documented that
step_spline_b()
can be made periodic. (#1223) -
prep()
now correctly throws a warning whentraining
argument is set when prepping a prepped recipe, telling the user that it will be ignored. (#1244) -
When errors are thrown about wrongly typed input to steps, the offending variables and their types are now listed. (#1217)
-
All warnings and errors have been updated to use the cli package for increased clarity and consistency. (#1237)
-
Added warnings when
step_scale()
,step_normalise()
,step_center()
orstep_range()
result inNaN
columns. (@mastoffel, #1221)
Bug Fixes
recipes 1.0.8
Bug Fixes
- Fixed bugs where spline steps (
step_ns()
,step_bs()
,step_spline_b()
,step_spline_convex()
,step_spline_monotone()
,step_spline_natural()
,step_spline_nonnegative()
) would error if baked with 1 row. (#1191)
recipes 1.0.7
New Steps
step_classdist_shrunken()
, a regularized version ofstep_classdist()
, was added. (#1185)
Improvements
-
step_bs()
andstep_ns()
have gainedkeep_original_cols
argument. (#1164) -
The
keep_original_cols
argument has been added tostep_classdist()
,step_count()
,step_depth()
,step_geodist()
,step_indicate_na()
,step_interact()
,step_lag()
,step_poly()
,step_regex()
,step_window()
. The default for each step is set to preserve past behavior. This change should mean that every step that produces new columns has thekeep_original_cols
argument. (#1167)
Bug Fixes
-
Fixed bugs where
step_classdist()
,step_count()
,step_depth()
,step_geodist()
,step_interact()
,step_nnmf_sparse()
, andstep_regex()
didn't work with empty selection. All steps now leave data unmodified when having empty selections. (#1142) -
step_classdist()
,step_count()
andstep_depth()
no longer returns a column with allNA
s with empty selections. (#1142) -
step_regex()
no longer returns a column with all 0s with empty selections. (#1142) -
The
tidy()
methods forstep_geodist()
,step_nnmf_sparse()
, andstep_sample()
now correctly return zero-row tibbles when used with empty selections. (#1144) -
step_poly_bernstein()
,step_profile()
,step_spline_b()
,step_spline_convex()
,step_spline_monotone()
,step_spline_natural()
, andstep_spline_nonnegative()
now correctly return a zero row tibble when used with empty selection. (#1133) -
Fixed bug where the
tidy()
method forstep_sample()
didn't return anid
column. (#1144) -
check_class()
,check_missing()
,check_new_values()
,check_range()
,step_naomit()
,step_poly_bernstein()
,step_spline_b()
,step_spline_convex()
,step_spline_monotone()
,step_spline_natural()
,step_spline_nonnegative()
, andstep_string2factor()
now throw an informative error if needed non-standard role columns are missing duringbake()
. (#1145)
Breaking Changes
-
step_window()
now throws an error instead of silently overwriting ifnames
argument overlaps with existing columns. (#1172) -
step_regex()
andstep_count()
will now informatively error if name collision occurs. (#1169)
Developer
recipes 1.0.6
Improvements
-
Steps with tunable arguments now have those arguments listed in the documentation.
-
All steps that add new columns will now informatively error if name collision occurs. (#983)
Bug Fixes
-
Fixed bug in
step_spline_b()
,step_spline_convex()
,step_spline_monotone()
, andspline_nonnegative()
where you weren't able to tune thedegree
argument. -
step_range()
now perform correctly performs clipping on recipes created before 1.0.3. (#1097)
Breaking Changes
- The
tidy()
method forstep_impute_mean()
,step_impute_median()
, andstep_impute_mode()
now the imputed value with the column namevalue
instead ofmodel
. This is in line with the output ofstep_impute_lower()
. (#826)
recipes 0.1.17
New Steps
-
Added new
step_harmonic()
(#702). -
Added a new step called
step_dummy_multi_choice()
, which will take multiple nominal variables and produces shared dummy variables. (#716)
Deprecation News
-
The deprecation for
step_upsample()
andstep_downsample()
has been escalated from a deprecation warning to a deprecation error; these functions are available in the themis package. -
Escalate deprecation for old versions of imputation steps (such as
step_bagimpute()
) from a soft deprecation to a regular deprecation; these imputation steps have new names likestep_impute_bag()
(#753). -
step_kpca()
was un-deprecated and gained thekeep_original_cols
argument. -
The deprecation of the
preserve
argument tostep_pls()
andstep_dummy()
was escalated from a soft deprecation to regular deprecation. -
The deprecation of the
options
argument tostep_nzv()
was escalated to a deprecation error.
Bug Fixes
-
Fix imputation steps for new data that is all
NA
, and generate a warning for recipes created under previous versions that cannot be imputed with this fix (#719). -
A bug was fixed where imputed values via bagged trees would have the wrong levels.
Improvements and Other Changes
-
The computations for the Yeo-Johnson transformation were made more efficient (#782).
-
New
recipes_eval_select()
which is a developer tool that is useful for creating new recipes steps. It powers the tidyselect semantics that are specific to recipes and supports the modern tidyselect API introduced in tidyselect 1.0.0. Additionally, the olderterms_select()
has been deprecated in favor of this new helper (#739). -
Speed-up/simplification to
step_spatialsign()
-
When only the terms attributes are desired from
model.frame
use the first row of data to improve speed and memory use (#726). -
Use Haversine formula for latitude-longitude pairs in
step_geodist()
(#725). -
Reorganize documentation for all recipe step
tidy
methods (#701). -
Generate warning when user attempts a Box-Cox transformation of non-positive data (@liamblake, #713).
-
step_logit()
gained an offset argument for cases where the input is either zero or one (#784) -
The
tidy()
methods for objects fromcheck_new_values()
,check_class()
andstep_nnmf()
are now exported.
recipes 1.0.5
-
Added
outside
argument tostep_percentile()
to determine different ways of handling values outside the range of the training data. -
step_range()
is now backwards compatible with respect to theclipping
argument that was added 1.0.3, and old saved recipes can now be baked. (#1090) -
update print methods to use cli package for formatting. (#426)
-
Print methods no longer errors for untrained recipes with long selections. (#1083)
-
The
recipe
,step
, andcheck
methods forgenerics::tune_args()
are now registered unconditionally (tidymodels/workflows#192). -
Added a
conditionMessage()
method forrecipes_error
s to consistently point out which step errors occurred in when reporting errors. (#1080)
recipes 1.0.4
-
Added missing tidy method for
step_intercept()
andstep_lag()
. (#730) -
Errors in
prep()
andbake()
will now indicate which step caused the error. (#420) -
Developer focused
check_type()
got a newtypes
argument for more precise checking of column types. -
recipes_extension_check()
have been added. This developer focused function checks that steps have all the required S3 methods. -
recipe()
now error more informatively whendata
is missing. (#1042)
recipes 1.0.3
-
step_dummy()
no longer returns integer columns as there are a number of contrast methods that return fractional values. (#1053) -
Fixed a 0-length recycling bug in
step_dummy_extract()
exposed by the
development version of purrr (#1052). -
Types of variables have been made granular.
"nominal"
has been split into"ordered"
and"unordered"
and"numeric"
has been split into"double"
and"integer"
. (#993) -
New selectors:
all_double()
,all_ordered()
,all_unordered()
,all_date()
andall_datetime()
, in addition to the existingall_numeric()
andall_nominal()
. All selectors come with a*_predictors()
variant. (#993) -
Developer focused
.get_data_types()
generic has been added to designate types of columns. Exported for use in extension packages that deal with types not supported in recipes directly. (#993) -
The
step_date()
function now defaults to using the clock package to format day-of-week and month labels. (#1048) -
step_range()
has gained a argumentclipping
that when set toFALSE
no longer clips the data to be betweenmin
andmax
.