generated from LufsX/Experiment-LogReg
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user