From fbd99e7e87ae9f9f76f5563ecdbcd66144b15b52 Mon Sep 17 00:00:00 2001 From: heart20003 <1789588961@qq.com> Date: Wed, 13 Nov 2024 15:50:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20function.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function.py b/function.py index 5ae9dc7..5c890e9 100644 --- a/function.py +++ b/function.py @@ -129,7 +129,7 @@ def k_fold_cross_validation(X, y, k=5, learning_rate=0.001, iterations=10000, ba y_train = np.concatenate((y[:val_start], y[val_end:])) models = [] # 存储每个模型 - n_models = 5 # 设定模型数量 + n_models = 50 # 设定模型数量 for _ in range(n_models): # 从训练集中随机采样,允许重复 X_sample, _, y_sample, _ = train_test_split(X_train, y_train, test_size=0.5, random_state=None)