-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Added lstm stock prediction #1777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This submission is quite complected containing numerous code files and data files, etc. It feels quite different that the other algorithms in this repo. It feels like an entire subsystem rather that an algorithm. It has no type hint, no doctest, no black formatting, etc. Should it be modified to fit into this repo or in a repo somewhere else?
timer.start() | ||
|
||
for layer in configs['model']['layers']: | ||
neurons = layer['neurons'] if 'neurons' in layer else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use dict.get()... https://docs.python.org/3/library/stdtypes.html#dict.get
neurons = layer.get('neurons')
# Repeat below...
normalise=configs['data']['normalise'] | ||
) | ||
|
||
predictions = model.predict_sequences_multiple(x_test, configs['data']['sequence_length'], configs['data']['sequence_length']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format code with psf/black to limit lines to 88 characters max.
class DataLoader(): | ||
"""A class for loading and transforming data for the lstm model""" | ||
|
||
def __init__(self, filename, split, cols): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type hints and doctests please.
data_windows.append(self.data_test[i:i+seq_len]) | ||
|
||
data_windows = np.array(data_windows).astype(float) | ||
data_windows = self.normalise_windows(data_windows, single_window=False) if normalise else data_windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is too long for a ternary if... Just do a normal if and wrap lines to 88 char max.
So should I fix or it doesn't belong here? |
@Tejaswgupta let's do a spike. How about you abstract away all the PS- In any case it would be good if you address the changes. |
Stale pull request message |
Describe your change:
Pr against issue #1770
Checklist:
Fixes: #{$ISSUE_NO}
.