mirror of
https://github.com/wassname/DeepTime.git
synced 2026-08-02 12:20:30 +08:00
try with stock data
This commit is contained in:
+6
-3
@@ -62,9 +62,12 @@ class Experiment(ABC):
|
||||
# write command file
|
||||
command_file = os.path.join(instance_path, 'command')
|
||||
with open(command_file, 'w') as cmd:
|
||||
# cmd.write(f'python -m {module} '
|
||||
# f'--config_path={instance_config_path} '
|
||||
# f'run >> {instance_path}/instance.log 2>&1')
|
||||
cmd.write(f'python -m {module} '
|
||||
f'--config_path={instance_config_path} '
|
||||
f'run >> {instance_path}/instance.log 2>&1')
|
||||
f'--config_path={instance_config_path} '
|
||||
f'run 2>&1 | tee -a {instance_path}/instance.log')
|
||||
|
||||
@abstractmethod
|
||||
def instance(self):
|
||||
@@ -102,4 +105,4 @@ class Experiment(ABC):
|
||||
def build_experiment(self):
|
||||
if EXPERIMENTS_PATH in str(self.root):
|
||||
raise Exception('Cannot build ensemble from ensemble member configuration.')
|
||||
self.build()
|
||||
self.build()
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
build.experiment_name = 'Stocks/96M'
|
||||
build.module = 'experiments.forecast'
|
||||
build.repeat = 1
|
||||
build.variables_dict = {
|
||||
}
|
||||
|
||||
instance.model_type = 'deeptime'
|
||||
instance.save_vals = False
|
||||
|
||||
get_optimizer.lr = 1e-3
|
||||
get_optimizer.lambda_lr = 1.
|
||||
get_optimizer.weight_decay = 0.
|
||||
|
||||
get_scheduler.warmup_epochs = 5
|
||||
|
||||
get_data.batch_size = 256
|
||||
|
||||
train.loss_name = 'mse'
|
||||
train.epochs = 50
|
||||
train.clip = 10.
|
||||
|
||||
Checkpoint.patience = 7
|
||||
|
||||
deeptime.layer_size = 256
|
||||
deeptime.inr_layers = 5
|
||||
deeptime.n_fourier_feats = 4096
|
||||
deeptime.scales = [0.01, 0.1, 1, 5, 10, 20, 50, 100]
|
||||
|
||||
ForecastDataset.data_path = 'stocks/OXY_2019.csv.gz'
|
||||
ForecastDataset.target = 'RSMKs_18_144_72'
|
||||
ForecastDataset.scale = True
|
||||
ForecastDataset.cross_learn = False
|
||||
ForecastDataset.time_features = []
|
||||
ForecastDataset.normalise_time_features = True
|
||||
ForecastDataset.features = 'M'
|
||||
ForecastDataset.horizon_len = 96
|
||||
ForecastDataset.lookback_mult = 1
|
||||
@@ -0,0 +1,37 @@
|
||||
build.experiment_name = 'Stocks/96S'
|
||||
build.module = 'experiments.forecast'
|
||||
build.repeat = 1
|
||||
build.variables_dict = {
|
||||
}
|
||||
|
||||
instance.model_type = 'deeptime'
|
||||
instance.save_vals = False
|
||||
|
||||
get_optimizer.lr = 1e-3
|
||||
get_optimizer.lambda_lr = 1.
|
||||
get_optimizer.weight_decay = 0.
|
||||
|
||||
get_scheduler.warmup_epochs = 5
|
||||
|
||||
get_data.batch_size = 256
|
||||
|
||||
train.loss_name = 'mse'
|
||||
train.epochs = 50
|
||||
train.clip = 10.
|
||||
|
||||
Checkpoint.patience = 7
|
||||
|
||||
deeptime.layer_size = 256
|
||||
deeptime.inr_layers = 5
|
||||
deeptime.n_fourier_feats = 4096
|
||||
deeptime.scales = [0.01, 0.1, 1, 5, 10, 20, 50, 100]
|
||||
|
||||
ForecastDataset.data_path = 'stocks/OXY_2019.csv.gz'
|
||||
ForecastDataset.target = 'RSMKs_18_144_72'
|
||||
ForecastDataset.scale = True
|
||||
ForecastDataset.cross_learn = False
|
||||
ForecastDataset.time_features = []
|
||||
ForecastDataset.normalise_time_features = True
|
||||
ForecastDataset.features = 'S'
|
||||
ForecastDataset.horizon_len = 96
|
||||
ForecastDataset.lookback_mult = 3
|
||||
@@ -0,0 +1,37 @@
|
||||
build.experiment_name = 'Stocks/96Splus'
|
||||
build.module = 'experiments.forecast'
|
||||
build.repeat = 1
|
||||
build.variables_dict = {
|
||||
}
|
||||
|
||||
instance.model_type = 'deeptime2'
|
||||
instance.save_vals = False
|
||||
|
||||
get_optimizer.lr = 1e-3
|
||||
get_optimizer.lambda_lr = 1.
|
||||
get_optimizer.weight_decay = 0.
|
||||
|
||||
get_scheduler.warmup_epochs = 5
|
||||
|
||||
get_data.batch_size = 256
|
||||
|
||||
train.loss_name = 'mse'
|
||||
train.epochs = 50
|
||||
train.clip = 10.
|
||||
|
||||
Checkpoint.patience = 7
|
||||
|
||||
deeptime2.layer_size = 256
|
||||
deeptime2.inr_layers = 5
|
||||
deeptime2.n_fourier_feats = 4096
|
||||
deeptime2.scales = [0.01, 0.1, 1, 5, 10, 20, 50, 100]
|
||||
|
||||
ForecastDataset.data_path = 'stocks/OXY_2019.csv.gz'
|
||||
ForecastDataset.target = 'RSMKs_18_144_72'
|
||||
ForecastDataset.scale = True
|
||||
ForecastDataset.cross_learn = False
|
||||
ForecastDataset.time_features = []
|
||||
ForecastDataset.normalise_time_features = True
|
||||
ForecastDataset.features = 'S'
|
||||
ForecastDataset.horizon_len = 96
|
||||
ForecastDataset.lookback_mult = 3
|
||||
@@ -0,0 +1,37 @@
|
||||
build.experiment_name = 'Stocks/96Splusshort'
|
||||
build.module = 'experiments.forecast'
|
||||
build.repeat = 1
|
||||
build.variables_dict = {
|
||||
}
|
||||
|
||||
instance.model_type = 'deeptime2'
|
||||
instance.save_vals = False
|
||||
|
||||
get_optimizer.lr = 1e-3
|
||||
get_optimizer.lambda_lr = 1.
|
||||
get_optimizer.weight_decay = 0.
|
||||
|
||||
get_scheduler.warmup_epochs = 5
|
||||
|
||||
get_data.batch_size = 256
|
||||
|
||||
train.loss_name = 'mse'
|
||||
train.epochs = 50
|
||||
train.clip = 10.
|
||||
|
||||
Checkpoint.patience = 7
|
||||
|
||||
deeptime2.layer_size = 256
|
||||
deeptime2.inr_layers = 5
|
||||
deeptime2.n_fourier_feats = 4096
|
||||
deeptime2.scales = [0.01, 0.1, 1, 5, 10, 20, 50, 100]
|
||||
|
||||
ForecastDataset.data_path = 'stocks/OXY_2019.csv.gz'
|
||||
ForecastDataset.target = 'RSMKs_18_144_72'
|
||||
ForecastDataset.scale = True
|
||||
ForecastDataset.cross_learn = False
|
||||
ForecastDataset.time_features = []
|
||||
ForecastDataset.normalise_time_features = True
|
||||
ForecastDataset.features = 'S'
|
||||
ForecastDataset.horizon_len = 6
|
||||
ForecastDataset.lookback_mult = 8
|
||||
@@ -0,0 +1,37 @@
|
||||
build.experiment_name = 'Stocks/96Sshort'
|
||||
build.module = 'experiments.forecast'
|
||||
build.repeat = 1
|
||||
build.variables_dict = {
|
||||
}
|
||||
|
||||
instance.model_type = 'deeptime'
|
||||
instance.save_vals = False
|
||||
|
||||
get_optimizer.lr = 1e-3
|
||||
get_optimizer.lambda_lr = 1.
|
||||
get_optimizer.weight_decay = 0.
|
||||
|
||||
get_scheduler.warmup_epochs = 5
|
||||
|
||||
get_data.batch_size = 256
|
||||
|
||||
train.loss_name = 'mse'
|
||||
train.epochs = 50
|
||||
train.clip = 10.
|
||||
|
||||
Checkpoint.patience = 7
|
||||
|
||||
deeptime.layer_size = 256
|
||||
deeptime.inr_layers = 5
|
||||
deeptime.n_fourier_feats = 4096
|
||||
deeptime.scales = [0.01, 0.1, 1, 5, 10, 20, 50, 100]
|
||||
|
||||
ForecastDataset.data_path = 'stocks/OXY_2019.csv.gz'
|
||||
ForecastDataset.target = 'RSMKs_18_144_72'
|
||||
ForecastDataset.scale = True
|
||||
ForecastDataset.cross_learn = False
|
||||
ForecastDataset.time_features = []
|
||||
ForecastDataset.normalise_time_features = True
|
||||
ForecastDataset.features = 'S'
|
||||
ForecastDataset.horizon_len = 6
|
||||
ForecastDataset.lookback_mult = 8
|
||||
Reference in New Issue
Block a user