Start | |__ Initialize an empty list called preds | |__ Loop 104 times: | | | |__ Select the most recent 104 days of the training set and add any previous predictions to it | | | |__ Calculate the sum of the closing prices of these 104 days and add to the sum of previous predictions | | | |__ Calculate the average by dividing the sum by 103 | | | |__ Add the average to the list preds | |__ Calculate the root mean squared error (RMSE) between the predicted values and the actual values of the validation set | End翻译成中文
时间: 2023-08-21 07:25:06 浏览: 153
开始 | |__ 初始化一个名为 preds 的空列表 | |__ 循环 104 次: | | | |__ 选择最近的 104 天作为训练集,并将之前的预测结果添加到其中 | | | |__ 计算这 104 天的收盘价总和,并将其与之前的预测结果相加 | | | |__ 通过将总和除以 103 来计算平均值 | | | |__ 将平均值添加到列表 preds 中 | |__ 计算预测值与验证集实际值之间的均方根误差 (RMSE) | 结束
阅读全文