我正在从here运行以下代码
我的代码
library(tune)
library(AmesHousing)
library(workflows)
# ------------------------------------------------------------------------------
ames <- make_ames()
set.seed(4595)
data_split <- initial_split(ames, strata = "Sale_Price")
ames_train <- training(data_split)
set.seed(2453)
rs_splits <- vfold_cv(ames_train, strata = "Sale_Price")
# ------------------------------------------------------------------------------
ames_rec <-
recipe(Sale_Price ~ ., data = ames_train) %>%
step_log(Sale_Price, base = 10) %>%
step_YeoJohnson(Lot_Area, Gr_Liv_Area) %>%
step_other(Neighborhood, threshold = .1) %>%
step_dummy(all_nominal()) %>%
step_zv(all_predictors()) %>%
step_ns(Longitude, deg_free = tune("lon")) %>%
step_ns(Latitude, deg_free = tune("lat"))
knn_model <-
nearest_neighbor(
mode = "regression",
neighbors = tune("K"),
weight_func = tune(),
dist_power = tune()
) %>%
set_engine("kknn")
ames_wflow <-
workflow() %>%
add_recipe(ames_rec) %>%
add_model(knn_model)
ames_set <-
parameters(ames_wflow) %>%
update(K = neighbors(c(1, 50)))
set.seed(7014)
ames_grid <-
ames_set %>%
grid_max_entropy(size = 10)
ames_grid_search <-
tune_grid(
ames_wflow,
resamples = rs_splits,
grid = ames_grid
)
set.seed(2082)
ames_iter_search <-
tune_bayes(
ames_wflow,
resamples = rs_splits,
param_info = ames_set,
initial = ames_grid_search,
iter = 15
)
我收到以下错误,并且在运行其他相关示例时也遇到相同的错误
Fold01:内部:错误:没有注册tidyselect变量
Fold02:内部:错误:没有注册tidyselect变量
Fold03:内部:错误:没有注册tidyselect变量
Fold04:内部:错误:没有注册tidyselect变量
Fold05:内部:错误:没有注册tidyselect变量
Fold06:内部:错误:没有注册tidyselect变量
Fold07:内部:错误:没有注册tidyselect变量
Fold08:内部:错误:没有注册tidyselect变量
Fold09:内部:错误:没有注册tidyselect变量
Fold10:内部:错误:没有注册tidyselect变量
任何主意,这里出了什么问题?我的会话在下面]
sessionInfo()R版本3.5.3(2019-03-11)平台:x86_64-w64-mingw32 / x64(64位)在以下环境下运行:Windows> = 8 x64(内部版本9200)
Matrix产品:默认
语言环境:1LC_COLLATE =英语_美国.1252 LC_CTYPE =英语_美国.1252[3] LC_MONETARY =英语_美国。1252LC_NUMERIC = C[5] LC_TIME =英语_美国。1252
附加的基本软件包:1统计图形grDevices utils数据集方法库
其他附件包:1kknn_1.3.1工作流程_0.1.0.9000 AmesHousing_0.0.3 tune_0.0.1[5]码尺_0.0.5 tibble_2.1.3 rsample_0.0.5 tidyr_0.8.3[9]食谱_0.1.9 purrr_0.3.2 parsnip_0.0.5推断_0.5.1[13] ggplot2_3.2.1 dplyr_0.8.4表盘_0.0.4刻度_1.0.0[17]扫帚_0.5.2 tidymodels_0.0.3
通过名称空间加载(未附加):1minqa_1.2.4 colorspace_1.4-1省略号_0.2.0.1 class_7.3-15[5] ggridges_0.5.2 rsconnect_0.8.16 markdown_1.1 base64enc_0.1-3[9] tidytext_0.2.2 rstudioapi_0.10 listenv_0.8.0 furrr_0.1.0[13] rstan_2.19.2 SnowballC_0.6.0 DT_0.12 prodlim_2019.11.13[17] fani_0.4.0 lubridate_1.7.4 codetools_0.2-16 splines_3.5.3[21] knitr_1.24 Shinythemes_1.1.2 zeallot_0.1.0 bayesplot_1.7.1[25] nloptr_1.2.1 pROC_1.16.1 Shiny_1.3.2piler_3.5.3[29] backports_1.1.4断言_0.2.1 Matrix_1.2-15 lazyeval_0.2.2[33] cli_2.0.1之后_0.8.0 htmltools_0.3.6 prettyunits_1.0.2[37] tools_3.5.3 igraph_1.2.4.2 gtable_0.3.0胶水_1.3.1[41] reshape2_1.4.3 Rcpp_1.0.1 DiceDesign_1.8-1 vctrs_0.2.0[45] nlme_3.1-137迭代器_1.0.12串扰_1.0.0 timeDate_3043.102[49] xfun_0.9 gower_0.2.1 stringr_1.4.0 globals_0.12.5[53] ps_1.3.0 lme4_1.1-21 mime_0.7 miniUI_0.1.1.1[57] gtools_3.8.1 tidypredict_0.4.5 future_1.16.0 MASS_7.3-51.1[61] zoo_1.8-7 ipred_0.9-9 rstanarm_2.19.2 colourpicker_1.0[65]许诺_1.0.1 parallel_3.5.3 inline_0.3.15 Shinystan_2.5.0[69] tidyposterior_0.0.2 yaml_2.2.0 gridExtra_2.3 loo_2.2.0[73] StanHeaders_2.21.0-1 rpart_4.1-13 stringi_1.4.3 tokenizers_0.2.1[77] dygraphs_1.1.1.6 foreach_1.4.7 lhs_1.0.1安全帽_0.1.1[81] boot_1.3-20 pkgbuild_1.0.3 lava_1.6.6 rlang_0.4.4[85] pkgconfig_2.0.2 matrixStats_0.55.0点阵_0.20-38 rstantools_2.0.0[89] htmlwidgets_1.5.1 tidyselect_0.2.5 processx_3.3.1 plyr_1.8.4[93] magrittr_1.5 R6_2.4.0泛型_0.0.2支柱_1.4.3[97] withr_2.1.2 xts_0.12-0 Survival_2.43-3 nnet_7.3-12[101] janeaustenr_0.1.5 crayon_1.3.4 grid_3.5.3 callr_3.2.0[105] threejs_0.3.3摘要_0.6.19 xtable_1.8-4 httpuv_1.5.1[109] stats4_3.5.3 GPfit_1.0-8 munsell_0.5.0 Shinyjs_1.1
我正在从此处运行以下代码我的代码库(调优)库(AmesHousing)库(工作流程)#------------------------- -------------------------------------------------- --- ames
是的,当然!很抱歉没有明确指出错误的来源。