高频比特币价格预测与人口规模聚类及种族预测
比特币价格预测部分
价格预测与模型评估
在比特币价格预测系统中,当接收到短期预测数据时,有如下处理逻辑:
case data: CurrentDataWithShortTermPrediction =>
Logger.debug("received short - term prediction" + data)
data.prediction match {
case "0" => notifySellShortTerm()
case "1" => notifyHoldShortTerm()
}
ShortTermPredictionServiceImpl 类负责使用给定的模型和数据进行实际的预测。具体步骤如下:
1. 调用 transformPriceData(priceData: PriceData) 方法将 PriceData 转换为与训练时使用的方案相对应的Spark DataFrame。
2. 调用 model.transform(dataframe) 方法进行预测。
3. 提取所需的变量,写入调试日志并返回给调用者。
以下是具体的代码实现:
override def predictPriceDeltaLa
超级会员免费看
订阅专栏 解锁全文
3240

被折叠的 条评论
为什么被折叠?



