You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ The project is grouped into the following sections, which are representative of
18
18
19
19
By the end of this project, you will have a fully functional LSTM model that predicts future stock prices based on historical price movements, all in a single Python file. This tutorial has been written in a way such that all the essential code snippets have been embedded inline. You should be able to develop, train, and test your machine learning model without referring to other external pages or documents.
20
20
21
-
Let's get started!
21
+
Let's get started!
22
22
23
23
## Installing Python dependencies
24
24
@@ -31,6 +31,9 @@ With Python installed, please go to the Command Line interface of your operating
<summary>Create your Python file and follow along the codes in this tutorial</summary>
36
+
34
37
Now, create a new Python file named `project.py` and paste the following code into the file:
35
38
36
39
```python
@@ -93,6 +96,7 @@ config = {
93
96
```
94
97
95
98
Over the course of this project, we will continue adding new code blocks to the **project.py** file. By the time you reach the end of the tutorial, you should have a fully functional LSTM machine learning model to predict stock market price movements, all in a single Python script. Please feel free to compare your **project.py** with the [official copy](https://github.com/jinglescode/time-series-forecasting-pytorch/blob/main/project.py) if you would like to have a "sanity check" anytime during the project.
99
+
</details>
96
100
97
101
## Data preparation: acquiring financial market data from Alpha Vantage
98
102
@@ -404,6 +408,8 @@ for epoch in range(config["training"]["num_epoch"]):
Using *mean squared error* as the loss function to optimize our model, we calculate the loss on training and validation based on how well the model is doing in these two sets. After every epoch, a smaller *loss* value indicates that the model is learning and 0.0 means that no mistakes were made. `Loss train` gives an idea of how well the model is learning, while `loss test` gives an idea of how well the model generalizes on the validation dataset.
412
+
407
413
Console showing the loss and learning rate during training:
0 commit comments