Feature Request: `kfold_cv()` Wrapper Function for Terminology Consistency and Usability
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- r
- 领域
- data, machine-learning
调研方向
Start by locating the existing vfold_cv() entry point and its documentation in rsample, then check how exported functions and aliases are tested. Define done as a documented, exported kfold_cv() interface that accepts the requested arguments and preserves vfold_cv() behavior, with coverage for the wrapper and its k argument.
由索引模型根据 Issue 内容生成。
描述
Dear Tidymodels Development Team,
First, thank you for the excellent work on the rsample package and the entire tidymodels ecosystem. Your contributions have significantly improved accessibility and usability for data science and machine learning in R, and your consistent, high-quality work is truly appreciated.
Feature Request: kfold_cv() Wrapper Function
I would like to suggest adding a kfold_cv() function as a wrapper for vfold_cv(). This request is aimed at enhancing both terminology consistency and user accessibility, as "k-fold cross-validation" is overwhelmingly the more common term in the literature and among practitioners.
It could simply be implemented as:
#' @rdname vfold_cv
#' @param v,k The number of partitions of the data set
#' @export
kfold_cv(data, k = 10, repeats = 1, strata = NULL, breaks = 4, pool = 0.1, ...) {
vfold_cv(data = data, v = k, repeats = repeats, strata = strata, breaks = breaks, pool = pool, ...)
}
Rationale
-
Standard Terminology Usage: The term "k-fold cross-validation" is widely recognized as the standard across numerous publications and textbooks on machine learning and statistics. Here are some authoritative sources where the term "k-fold cross-validation" is used consistently:
- Hastie, Tibshirani, and Friedman (2009) in The Elements of Statistical Learning specifically refer to "k-fold cross-validation" (p. 222, Springer) as a foundational resampling method.
- James, Witten, Hastie, and Tibshirani (2013) in An Introduction to Statistical Learning also use "k-fold cross-validation" (p. 176, Springer), reflecting the term’s adoption in foundational texts.
- Goodfellow, Bengio, and Courville (2016) in Deep Learning further emphasize "k-fold cross-validation" as a core method in machine learning (MIT Press, p. 120).
The popularity of the term "k-fold" over "v-fold" is also evident in applied contexts, including online courses, tutorials, and the documentation of other machine learning libraries such as scikit-learn in Python, where
KFoldis explicitly named. -
User Familiarity and Accessibility: Most users, especially those new to tidymodels, might be more familiar with the term "k-fold" and may not immediately recognize "v-fold" as equivalent. This can lead to confusion, especially for those coming from other languages or tools where "k-fold" is standard. A
kfold_cv()function could help bridge this gap, enhancing the user experience without altering any functionality. -
Maintaining Code Consistency and Readability: Many users adapt code from textbooks or other languages, where
kis typically the identifier for the number of folds. Allowing bothvfold_cv()andkfold_cv()would support more readable code for these users and may help streamline transitions for those migrating workflows into R and tidymodels.
Thank you for considering this suggestion, and for your commitment to improving the tools available to the R and data science communities. Your work has set a high standard, and small enhancements like this can make an even greater impact on usability.
- 主要语言
- R
- 星标
- 343
- 派生
- 68
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tidymodels/rsample 的其他 Issue
-
tidy-dev-day :nerd_face:
难度 1/5 1-3 小时 新手友好度 92/100
tidymodels/rsample#611 ·
-
repeats attribute is hardcoded to 1 for group_vfold_cv()可能已有人在做 @taekop 于 29 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
tidymodels/rsample#607 ·
-
难度 4/5 3-5 天 新手友好度 68/100
tidymodels/rsample#618 ·
-
documentation
难度 3/5 1-2 天 新手友好度 68/100
tidymodels/rsample#608 ·
-
难度 5/5 一周以上 新手友好度 25/100
tidymodels/rsample#600 ·
查看 tidymodels/rsample 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
atomashevic/transforEmotion#46 ·
维护者通常 1 天内回复
-
`pk.calc.time_above()` with lin-up/log-down silently drops segments that end at a negative value未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
OHDSI/CohortConstructor#777 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 68/100
nmfs-ost/stockplotr#445 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复