This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import tensorflow_ranking as tfr | |
_TRAIN_DATA_PATH="/data/train.txt" | |
_TEST_DATA_PATH="/data/test.txt" | |
_LOSS="approx_ndcg_loss" | |
_N_ASSETS=100 | |
_N_FEATURES=16 | |
_BATCH_SIZE=32 | |
_HIDDEN_LAYER_DIMS=["20", "10"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from agent.agent import Agent | |
from functions import * | |
import sys | |
if len(sys.argv) != 4: | |
print("Usage: python train.py [stock] [window] [episodes]") | |
exit() | |
stock_name, window_size, episode_count = sys.argv[1], int(sys.argv[2]), int(sys.argv[3]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import keras | |
from keras.models import Sequential | |
from keras.models import load_model | |
from keras.layers import Dense | |
from keras.optimizers import Adam | |
import numpy as np | |
import random | |
from collections import deque |