小编Kes*_*ari的帖子

在 R 中拆分为训练和测试集?

如何将以下用 python 编写的代码写入 R ?

X_train, X_test, y_train, y_test = train_test_split(X, y, 
                                                    test_size=0.2, random_state=42)   
Run Code Online (Sandbox Code Playgroud)

以 80/20 的比例拆分为训练集和测试集。

python r machine-learning train-test-split

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

machine-learning ×1

python ×1

r ×1

train-test-split ×1