corrected some typos

This commit is contained in:
Morten Hjorth-Jensen
2022-10-28 08:41:02 +02:00
parent 1c5b6d5130
commit 89c7de4f27
7 changed files with 234 additions and 227 deletions
+13 -11
View File
@@ -921,11 +921,13 @@ predicted=np.concatenate((trainPredict,testPredict),axis=0)
trainScore = model.evaluate(trainX, trainY, verbose=0)
print(trainScore)
index = df.index.values
plt.plot(index,df)
plt.plot(index,predicted)
plt.axvline(df.index[Tp], c="r")
df = pd.DataFrame(x)
pred = pd.DataFrame(predicted)
plt.plot(df,c="b")
plt.plot(pred,c="r")
plt.show()
!ec
@@ -976,23 +978,23 @@ y_tot = np.array([-0.03077640549, -0.08336233266, -0.1446729567, -0.2116753732,
The way the recurrent neural networks are trained in this program
differs from how machine learning algorithms are usually trained.
Typically a machine learning algorithm is trained by learning the
relationship between the x data and the y data. In this program, the
relationship between the $x$ data and the $y$ data. In this program, the
recurrent neural network will be trained to recognize the relationship
in a sequence of y values. This is type of data formatting is
typically used time series forcasting, but it can also be used in any
in a sequence of $y$ values. This is type of data formatting is
typically used for time series forecasting, but it can also be used in any
extrapolation (time series forecasting is just a specific type of
extrapolation along the time axis). This method of data formatting
does not use the x data and assumes that the y data are evenly spaced.
does not use the $x$ data and assumes that the $y$ data are evenly spaced.
For a standard machine learning algorithm, the training data has the
form of (x,y) so the machine learning algorithm learns to assiciate a
y value with a given x value. This is useful when the test data has x
form of $(x,y)$ so the machine learning algorithm learns to associate a
$y$ value with a given $x$ value. This is useful when the test data has $x$
values within the same range as the training data. However, for this
application, the x values of the test data are outside of the x values
of the training data and the traditional method of training a machine
learning algorithm does not work as well. For this reason, the
recurrent neural network is trained on sequences of y values of the
form ((y1, y2), y3), so that the network is concerned with learning
form $((y1, y2), y3)$, so that the network is concerned with learning
the pattern of the y data and not the relation between the x and y
data. As long as the pattern of y data outside of the training region
stays relatively stable compared to what was inside the training