Skip to content

Commit

Permalink
update comments on yfinance LSTM example
Browse files Browse the repository at this point in the history
  • Loading branch information
briangu committed Dec 24, 2023
1 parent c040301 commit 2ddf398
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/stocks/yfinance/lstm.kg
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ T::fetch("MSFT";"2020-01-01"; "2023-01-01"])
:" get close prices "
close::T?"Close"

:" window size of 10 "
k::10

:" create windows "
windows::mkwindows(close;k)

:" create the model wrapper "
m::model(1;10;1)

:" create windowed data "
:" create windowed data and labels "
windows::mkwindows(close;k)
labels::{x@-1}'1_windows

Expand All @@ -25,7 +28,7 @@ windows::(-1)_windows
:" show unnormalized windows and labels "
.d("series ");.d(1#windows);.d(" predicts ");.p(1#labels)

:" normalize windows and labels "
:" normalize windows and labels to the corresponding window max"
wmax::{(x@>x)@0}'windows
windows::wmax{y%x}'windows
labels::wmax{y%x}'labels
Expand Down

0 comments on commit 2ddf398

Please sign in to comment.