好吧,您可以尝试三个选项,一个很明显,您将max_iter5000 增加到更高的数字,因为您的模型在 5000 个时期内没有收敛,其次,尝试使用batch_size,因为您有 1384 个训练示例,您可以使用 16,32 或 64 的批量大小,这有助于在 5000 次迭代内收敛您的模型,最后,您始终可以learning_rate_init将值增加到稍高的值,因为...
(8), max_iter = 5000 ) model = RegressionModel( model = mlp, output_chunk_length=4, multi_models = True, lags = 4 ) model.supports_probabilistic_prediction # False model.fit(series) hfc = model.historical_forecasts( series=series, start=validation_start, forecast_horizon=4, stride=4, ...
y = ybostonformomentumin[0,.9]: mlp = MLPRegressor(solver='sgd', max_iter=100, activation='relu', random_state=1, learning_rate_init=0.01, batch_size=X.shape[0], momentum=momentum)withwarnings.catch_warnings(record=True):# catch convergence warningmlp.fit(X, y) pred1 = mlp.predict(...
ConvergenceWarning: Stochastic Optimizer: Maximum iterations (5000) reached and the optimization hasn't converged yet.% self.max_iter, ConvergenceWarning) 我的数据集中有 87 个特征和 1384 行,都是数字的,并且已经使用 MinMaxScaler 进行了缩放。如果您能指导我调整超参数,我将不胜感激。