Exemplo n.º 1
0
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/uci_large/hepmass')

    conf.num_workers = 2
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 20000, '1': 20000}

    exp.data_loader = registry.hepmass(x_slice=slice(0), y_slice=slice(None))

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_BLOCK"))

    exp.hyper_param_search = GridSearch([
        Categorical([8, 10], name='nl'),
        Categorical([60, 80], name='nb'),
        Categorical(['tanh'], name='tr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 2
0
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/inv_sin_normal')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.inv_sin_normal()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MAF"))

    exp.hyper_param_search = GridSearch([
        Categorical([1, 2, 3, 4, 5], name='nb'),
        Categorical([32, 128, 256], name='sh'),
        Categorical([1, 2, 3], name='nh'),
        Categorical([16, 32, 64], name='shc'),
        Categorical([True, False], name='bn'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 3
0
from data import registry
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/sin_t')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.sin_t_noise()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="RNADE_laplace"))

    exp.hyper_param_search = GridSearch([
        Categorical([1, 16, 32, 64, 128], name='km'),
        Categorical([1, 16, 32, 64, 128], name='sh'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 4
0
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/mv_nonlinear')

    conf.num_workers = 4
    conf.visible_device_list = [0,1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.mv_nonlinear()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_MADE"))

    exp.hyper_param_search = GridSearch([
        Categorical([64, 128,256], name='x_sh'),
        Categorical([1, 2, 3], name='x_nh'),

        Categorical([64, 128,256], name='hxy_sh'),
        Categorical([1, 2, 3], name='hxy_nh'),

        Categorical([128], name='bs'),
        Categorical([1], name='rs'),

        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4,1e-3,1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 5
0
from experiment.early_stop import EarlyStop
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/mv_nonlinear')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.mv_nonlinear()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MDN"))

    exp.hyper_param_search = GridSearch([
        Categorical([16, 64, 128], name='nm'),
        Categorical([128, 256, 512], name='sh'),
        Categorical([1, 2, 3], name='nh'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 6
0
    exp.data_loader = fx(x_slice=slice(None, -3),
                         y_slice=slice(-3, None),
                         ar_terms=1,
                         start='2018-01-01',
                         end='2018-03-31',
                         symbols=symbols,
                         predicted_idx=None,
                         resample="1min",
                         data_transforms={
                             'labels':
                             PercentileAnyGreaterLabelTransform(percentile=95)
                         })

    exp.model_factory = TfSimpleTrainEvalModelFactory(NNClassifier())

    exp.hyper_param_search = GridSearch([
        Categorical([2, 3, 5], name='nl'),
        Categorical([50, 100], name='sl'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical([3], name='bsi'),
        Categorical([20], name='bsip'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/inv_sin_t')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.inv_sin_t()

    exp.model_factory = TfTrainEvalModelFactory(
        Model(name="MONDE_copula_const_cov"))

    exp.hyper_param_search = GridSearch([
        Categorical([32, 64, 128], name='hxy_sh'),
        Categorical([1, 2, 3], name='hxy_nh'),
        Categorical([32, 64, 128], name='x_sh'),
        Categorical([1, 2, 3], name='x_nh'),
        Categorical([16, 32], name='hxy_x'),
        Categorical([0.05, 0.01], name='clr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 8
0
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/sin_normal')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.sin_normal_noise()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="MONDE_AR_MADE"))

    exp.hyper_param_search = GridSearch([
        Categorical(['sigm'], name='tr'),
        Categorical([32, 64, 128], name='sh'),
        Categorical([1, 2, 3], name='nh'),
        Categorical([16], name='xs'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 9
0
from experiment.experiment import Experiment
from experiment.hyper_param_opt import GridSearch
from models.tensorflow.model import Model
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/sin_normal')

    conf.num_workers = 4
    conf.visible_device_list = [0,1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.sin_normal_noise()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="RNADE_laplace"))

    exp.hyper_param_search = GridSearch([
        Categorical([1,20,50,100,150,200], name='km'),
        Categorical([20,60,100,140,200], name='sh'),

        Categorical([128], name='bs'),
        Categorical([1], name='rs'),

        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4,1e-3,1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 10
0
                         ar_terms=1,
                         start='2018-01-01',
                         end='2018-03-31',
                         symbols=symbols,
                         predicted_idx=None,
                         resample="1min")

    exp.model_factory = TfSimpleTrainEvalModelFactory(Pumonde2())

    exp.hyper_param_search = GridSearch([
        Categorical([3, 4], name='nl1'),
        Categorical([50, 100], name='sl1'),
        Categorical([3, 4], name='nl2'),
        Categorical([50, 100], name='sl2'),
        Categorical([30], name='sxl2'),
        Categorical([3, 4], name='nl3'),
        Categorical([50, 100], name='sl3'),
        Categorical(['square'], name='pt'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical([3], name='bsi'),
        Categorical([20], name='bsip'),

        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 11
0
from models.tensorflow.tf_train_eval import TfTrainEvalModelFactory

if __name__ == '__main__':
    exp = Experiment('density/synthetic/mv_nonlinear')

    conf.num_workers = 4
    conf.visible_device_list = [0, 1]
    conf.eval_batch_size = {'0': 10000, '1': 10000}

    exp.data_loader = registry.mv_nonlinear()

    exp.model_factory = TfTrainEvalModelFactory(Model(name="PumondePFor"))

    exp.hyper_param_search = GridSearch([
        Categorical([64, 128, 256], name='xs'),
        Categorical([1, 2, 3], name='xn'),
        Categorical([64, 128, 256], name='hxys'),
        Categorical([1, 2, 3], name='hxyn'),
        Categorical([0, 16], name='hxyxs'),
        Categorical([64, 128, 256], name='xycs'),
        Categorical([1, 2, 3], name='xycn'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-4, 1e-3, 1e-2], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()
Exemplo n.º 12
0
    ]

    exp.data_loader = registry.fx(x_slice=slice(None, -3),
                                  y_slice=slice(-3, None),
                                  ar_terms=1,
                                  start='2018-01-01',
                                  end='2018-03-31',
                                  symbols=symbols,
                                  predicted_idx=None,
                                  resample="1min")

    exp.model_factory = TfTrainEvalModelFactory(
        Model(name="MONDE_copula_const_cov"))

    exp.hyper_param_search = GridSearch([
        Categorical([50, 100], name='hxy_sh'),
        Categorical([2, 4], name='hxy_nh'),
        Categorical([50, 100], name='x_sh'),
        Categorical([2, 4], name='x_nh'),
        Categorical([30], name='hxy_x'),
        Categorical([0.05], name='clr'),
        Categorical([128], name='bs'),
        Categorical([1], name='rs'),
        Categorical(['AdamOptimizer'], name='opt'),
        Categorical([1e-3], name='opt_lr'),
    ])

    exp.early_stopping = EarlyStop(monitor_every_epoch=1, patience=[30])

    exp.run()