Releases: tidymodels/recipes
recipes 1.3.1
recipes 1.3.0
-
Fixed printing for
step_geodist()
when no variables are selected. (#1423) -
Fixed bug where
extract_fit_time()
would throw warning for when recipe didn't have any steps. (#1475) -
step_num2factor()
has gotten improved documentation to avoid getting NAs as output. (#575) -
step_select()
has started its deprecation process. See?step_select()
for alternatives. (#1488) -
step_interact()
now works with empty selections instead of erroring. (#1417) -
Added developer function
check_options()
. (#1269) -
fixed bug where
step_nnmf_sparse()
required that the Matrix package was loaded. (#1141) -
Fixed bug where
recipe()
would error on sf objects. (#1393) -
step_impute_bag()
now has a much smaller memory footprint when prepped. (#638) -
step_cut()
not longer errors on NA values inbake()
. (#1304) -
The following arguments in steps can now take bare names as input instead of strings, calls to
vars()
,imp_vars()
, anddenom_vars()
. (#1225)step_classdist_shrunken(class)
step_classdist(class)
step_depth(class)
step_impute_bag(impute_with)
step_impute_knn(impute_with)
step_impute_linear(impute_with)
step_pls(outcome)
step_profile(profile)
step_ratio(denom)
-
Fixed bug in
step_impute_knn()
would error on character vectors whenstrings_as_factors = TRUE
. (#926) -
Make it so
recipe.formula()
can't take table objects as input, in accordance with documentation. (#1416) -
The
strings_as_factors
argument ofprep.recipe()
has been soft-deprecated in favor ofrecipe(strings_as_factors)
. If both are provided, the value inrecipe()
takes precedence. This allows control of recipe behavior within a workflow, which wasn't previously possible. (@smingerson, #331, #287) -
More informative error for some failures of
step_impute_bag()
(#209) -
Fixed bugs in
step_bs()
,step_depth()
,step_harmonic()
,step_invlogit()
,step_isomap()
,step_logit()
,check_range()
,step_poly_bernstein()
,step_spline_b()
,step_spline_convex()
,step_monotone()
,step_natural()
,step_nonnegative()
would error inbake()
with zero-row data. (#1219) -
Fixed bug where
step_lincomb()
would remove both variables if they were identical. (#1357) -
step_impute_bag()
andstep_impute_knn()
now gives more informative warnings whenimpute_with
data contains all NAs. (#1385) -
step_spline_b()
,step_spline_convex()
,step_spline_monotone()
,step_spline_natural()
, andstep_spline_nonnegative()
now gives informative errors when applied to zero variance predictors. (#1455) -
fixed bug where
bake.step_discretize()
would error if applied to predictor only containingNA
s. (#1350) -
Officially deprecate
printer()
in favor ofprint_step()
. (#1243) -
step_dummy()
has gainedcontrasts
argument. This change soft deprecates the use ofgetOption("contrasts")
withstep_dummy()
. (##1349) -
step_mutate_at()
has been superceded in favor ofstep_mutate()
when used withacross()
. (#662)
recipes 1.2.1
Bug Fixes
- Fixed bug where sparsity creation steps error if applied to variables created by other steps. (#1448)
recipes 1.2.0
Improvements
-
recipe()
,prep()
, andbake()
now work with sparse tibbles. (#1364, #1366) -
recipe()
,prep()
, andbake()
now work with sparse matrices. (#1364, #1368, #1369) -
The following steps has gained the argument
sparse
. When set to"yes"
, they will produce sparse vectors. (#1392)step_count()
step_dummy_extract()
step_dummy_multi_choice()
step_dummy()
step_dummy()
step_holiday()
step_indicate_na()
step_regex()
-
The following steps have been modified to preserve sparsity in its input. (#1395)
step_arrange()
step_filter_missing()
step_filter()
step_impute_mean()
step_impute_median()
step_lag()
step_lag()
step_rename_at()
step_rename()
step_rm()
step_sample()
step_scale()
step_select()
step_shuffle()
step_slice()
step_sqrt()
step_zv()
-
All steps and checks now require arguments
trained
,skip
,role
, andid
at all times. (#1387)
Bug Fixes
- Fixed bug where name repaired column names would get changed when baked for some steps. (#1347)
recipes 0.1.8
Breaking Changes
-
The imputation steps do not change the data type being imputed now. Previously, if the data were integer, the data would be changed to numeric (for some step types). The change is breaking since the underlying data of imputed values are now saved as a list instead of a vector (for some step types).
-
The data sets were moved to the new
modeldata
package. -
step_num2factor()
was rewritten due to a bug that ignored the user-supplied levels (#425). The results of thetransform
argument are now required to be a function andlevels
must now be supplied.
Other Changes
-
Using a minus in the formula to
recipes()
is no longer allowed (it didn't remove variables anyway).step_rm()
orupdate_role()
can be used instead. -
When using a selector that returns no columns,
juice()
andbake()
will now return a tibble with as many rows as the original template data or thenew_data
respectively. This is more consistent with how selectors work in dplyr (#411). -
Code was added to explicitly register
tunable
methods whenrecipes
is loaded. This is required because of changes occurring in R 4.0. -
check_class()
checks if a variable is of the designated class. Class is either learned from the train set or provided in the check. (contributed by Edwin Thoen) -
step_normalize()
andstep_scale()
gained afactor
argument with values of 1 or 2 that can scale the standard deviations used to transform the data. (#380) -
bake()
now produces a tibble with columns in the same order asjuice()
(#365)
recipes 1.1.1
Improvements
-
Example for
step_novel()
now better illustrates how it works. (@Edgar-Zamora, #1248) -
prep.recipe(..., strings_as_factors = TRUE)
now only converts string variables that have role "predictor" or "outcome". (@dajmcdon, #1358, #1376)
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)