r - 为什么 `sample0` 里面是 `sample` 而不是 `cv.glm` ?

标签 r cross-validation glm

我正在查看 boot 中的 cv.glm 源代码。有一行

s <- sample0(rep(1L:K, f), n)

我查找了sample0,但它不存在。我相信它的真正含义是sample()。为什么这里输入为sample0

最佳答案

看看:

boot:::sample0
#function (x, ...) 
#x[sample.int(length(x), ...)]
#<bytecode: 0xa2a30e4>
#<environment: namespace:boot>

这是 boot 命名空间中的内部/非导出函数。

关于r - 为什么 `sample0` 里面是 `sample` 而不是 `cv.glm` ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41114825/

相关文章:

R中使用的k-means的结果

r - 如何将聚合与列名列表一起使用

machine-learning - GridSearchCV + StratifiedKfold(如果是 TFIDF)

r - 偏移量不适用于二项式 GLM

r - 在 Shiny 模块的 renderUI() 中使用 lapply()

r - 基于 R 中模型平均系数的部分残差图

python - KFold 交叉验证无法修复过度拟合

r - 使用 pROC 从现有数据制作 ROC 曲线

r - MCMCglmm 中 "trait"的含义

R:GLMM glmer 与 glmmPQL