r - 当响应为多个数值时,如何处理stablelearner的函数stabletre?
问题描述
这是我适合树模型的代码:
paluTree.sub3.75 <- partykit::ctree(I(DensitePf^.25) + I(DensitePm^.25) ~ Age + sexe + Temperature + Moustiquaire + Objet_gites + PrvPalu + RetenuEau + IndVegetation,
data = subset.df,
minsplit = 75,
minbucket = 75,
maxdepth = 4)
我想使用stabletree()
包的功能分析模型的稳定性stablelearner
diag.stabilite <- stablelearner::stabletree(paluTree.sub3.75,B = 100)
这不会产生错误,但是当我运行时,我会收到summary(diag.stabilite)
以下错误消息
Error in round(sapply(nm, function(n) { :
non-numeric argument to mathematical function
also the following barplot(diag.stabilite) results in an error
Error in plot.window(xlim, ylim, log = log, ...) :
need finite 'xlim' values
In addition: Warning messages:
1: In min(w.l) : no non-missing arguments to min; returning Inf
2: In max(w.r) : no non-missing arguments to max; returning -Inf
解决方案
推荐阅读
- python - 用实验数据训练模型
- c# - ASP 网络。- 执行 Ajax 调用时产生响应代码 500
- nvd3.js - 使用 NVd3 创建半圆形仪表
- if-statement - 在 Google 表格中记录单元格文本更改的日期
- javascript - 如何在 React JS 中配置 Ckeditor 工具栏?
- excel - 组合框上的宏和枢轴过滤需要很长时间才能完成
- d3.js - D3 按条件填充线性图的区域
- python - 如果单行条件为真,则引发异常?
- r - 如何使用 R 将复杂的字符串移交给 CMD?
- distributed - `ray up` 仅在头部启动 Docker 容器