时间序列分析 lstm
Neural networks can be a hard concept to wrap your head around. I think this is mostly due to the fact that they can be used for so many different things such as classification, identification or just simply regression.
神经网络可能是一个难以理解的概念。 我认为这主要是由于它们可以用于许多不同的事情,例如分类,识别或仅用于回归。
In this article, we will look at how easy it is to set up a simple LSTM model. All you need is your helpful friend KERAS and some array of numbers to throw into it.
在本文中,我们将探讨建立一个简单的LSTM模型有多么容易。 您所需要的只是您乐于助人的朋友KERAS和一些数字。
First thing we always do? Import!
我们总是做的第一件事? 进口!
import math
import pandas as pd
import numpy as np#keras models
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM#scaler
from sklearn.preprocessing import MinMaxScaler#analysis tool
from sklearn.metrics import mean_squared_error
Next we need some set of numbers to play with. There are a couple ways you can go about doing this, but the best way is to use some data that actually has meaning and to do that I recommend going to Kaggle.
接下来,我们需要一些数字来处理。 您可以通过几种方法来执行此操作,但是最好的方法是使用一些确实有意义的数据,并且建议我转到Kaggle。