Comments (2)
Yep
from stock-price-prediction-using-gan.
The data leakage in this project is serious, I doubt how could those academic peer reviewed the paper...
train_size = round(len(dataset) * 0.7)
print(f'Training Data Size: {train_size}')
train_data = dataset[0:train_size]
test_data = dataset[train_size:]
X_train = pd.DataFrame(train_data)
X_test = pd.DataFrame(test_data)
y_train = pd.DataFrame(train_data['Close'])
y_test = pd.DataFrame(test_data['Close'])
# Fit & Transform Features
# Normalized the data
X_scaler = MinMaxScaler(feature_range=(-1, 1))
y_scaler = MinMaxScaler(feature_range=(-1, 1))
X_train = X_scaler.fit_transform(X_train)
y_train = y_scaler.fit_transform(y_train)
X_test = X_scaler.transform(X_test)
y_test = y_scaler.transform(y_test)
This snippet will generate the normalised data without data leakage.
After this correction, the scaler will not work probably which makes the model useless.
The price in testing period is way higher than training price, using common method like z-score or MinMax will not be useful.
So either it needs to use adaptive normalisation or changing the model target (y_value) to percentage delta change or trend classification.
from stock-price-prediction-using-gan.
Related Issues (14)
- Training error HOT 1
- WGAN test data plot / missing plot functions
- Reinforcement learning for hyperparameter optimization
- attribute error
- A dumb question
- DATA.CSV
- FileNotFoundError: [Errno 2] No such file or directory: 'yc_train.npy' HOT 1
- Autoencoder.py HOT 1
- Missing files HOT 3
- some questions HOT 1
- Outstanding project + a naive comment HOT 10
- ‘requirements.txt’ request
- Basic GAN test data plot / missing plot functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stock-price-prediction-using-gan.