简体   繁体   English

Keras LSTM输入尺寸相互理解

[英]Keras LSTM Input Dimension understanding each other

but I have been trying to play around with it for awhile. 但我已经尝试了一段时间了。 I've seen a lot of guides on how Keras is used to build LSTM models and how people feed in the inputs and get expected outputs. 我已经看到了很多关于如何使用Keras构建LSTM模型以及人们如何输入和获得预期输出的指南。 But what I have never seen yet is, for example stock data, how we can make the LSTM model understand patterns between different dimensions, say close price is much higher than normal because volume is low. 但是我还从未见过的是,例如股票数据,如何使LSTM模型理解不同维度之间的模式,比如说收盘价比正常价格高得多,因为交易量低。

Point of this is that I want to do a test with stock prediction, but make it so that each dimensions are not reliant on previous time steps, but also reliant on other dimensions it haves as well. 关键是我想对库存预测进行测试,但要使每个维度都不依赖于先前的时间步长,也要依赖于它具有的其他维度。

Sorry if I am not asking the question correctly, please ask more questions if I am not explaining it clearly. 抱歉,如果我提出的问题不正确,如果我没有清楚说明问题,请提出更多问题。

First: Regressors will replicate if you input a feature that gives some direct intuition about the predicted input might be to secure the error is minimized, rather than trying to actually predict it. 第一:如果您输入的特征可以直接反映出预测输入,则回归函数将进行复制,这可能是为了确保将错误最小化,而不是尝试实际预测误差。 Try to focus on binary classification or multiclass classification, whether the closing price go up/down or how much. 尝试关注二进制分类或多类分类,无论收盘价是涨还是跌。

Second: Always engineer the raw features to give more explicit patterns to the ML algorithm. 第二:始终设计原始功能,以为ML算法提供更明确的模式。 Think on inputs as Volume(t) - Volume(t-1), close(t)^2 - close(t-1)^2, technical indicators(RSI, CCI, OBV etc.) Create your own features. 考虑输入为Volume(t)-Volume(t-1),close(t)^ 2-close(t-1)^ 2,技术指标(RSI,CCI,OBV等)创建自己的功能。 You can use the pyti library for technical indicators. 您可以将pyti库用于技术指标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM