我对Scikit-Learn MLPRegressor有一些疑问当启用提前停止时:
验证数据(参见“validation_fraction”)是随机选择的,位于所提供的测试数据的前面还是后面?
在训练的连续迭代过程中验证数据是否相同或不同?
在训练的最后阶段会自动包含/重新调整验证数据吗?
当验证分数在 n_iter_no_change 连续 epoch 内没有提高至少 tol 时,会返回之前的最佳回归量,还是 fit() 函数会简单地返回最后一个回归量?
最佳答案
Is the validation data (see 'validation_fraction') randomly selected, at the front, or at the back of the test data supplied?
MLPRegressor
在内部使用 train_test_split
创建验证数据。如果 MLPRegressor
的 shuffle
参数设置为 false,则从测试数据的末尾获取分数。如果 shuffle
设置为 true,则随机选择数据。
Is the validation data the same or different during successive iterations of the training?
所有训练迭代的验证数据都是相同的
Will the validation data automatically be included/refit during the final stage of the training?
验证数据永远不会用于训练模型。它仅用于对模型进行评分。
When the validation score is not improving by at least tol for n_iter_no_change consecutive epochs, will the previous best regressor be returned, or will the fit() function simply return the last regressor?
如果验证分数没有提高,提前停止将停止训练模型(避免过度拟合),而不是继续,并返回模型最佳参数( link )
关于python - 关于 Scikit-Learn 提前停止的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56559360/