def get_options():
    global options
    parser = lp.prediction_options()
    parser = lp.ga_options(parser)
    parser = lp.data_options(parser)
    parser.add_option("--model",
                      dest="model",
                      help="The model class that the genomes instantiate",
                      default=None)
    parser.add_option(
        "--test-set",
        dest="test_set",
        action="store_true",
        help=
        "Test the genomes on the test set, rather than on the training set",
        default=False)
    parser.add_option("--plot",
                      dest="plot",
                      action="store_true",
                      help="Make a plot (in combination with --test-set)",
                      default=False)
    (options, args) = parser.parse_args()
    lp.options = options
    if options.model is None:
        print >> sys.stderr, "Model argument is required."
        sys.exit(1)
def get_options():
    global options
    parser = lp.prediction_options()
    parser = lp.ga_options(parser)
    parser = lp.data_options(parser)
    parser.add_option("--model", dest="model", help="The model class that the genomes instantiate", default=None)
    parser.add_option("--test-set", dest="test_set", action="store_true",
                      help="Test the genomes on the test set, rather than on the training set", default=False)
    parser.add_option("--plot", dest="plot", action="store_true",
                      help="Make a plot (in combination with --test-set)", default=False)
    (options, args) = parser.parse_args()
    lp.options = options
    if options.model is None:
        print >>sys.stderr, "Model argument is required."
        sys.exit(1)
cmdline = cmdline_base + \
          ['--remove-holidays',
           '--data-seed=0',
           '--bc-data',
           '--standardize',
           '--difference=1',
           '--subtract-weekly-pattern']

cmdline = cmdline_base + \
          ['--data-seed=15',
           '--gef-data',
           '--subtract-weekly-pattern']

parser = lp.prediction_options()
parser = lp.ga_options(parser)
parser = lp.data_options(parser)
options, _ = parser.parse_args(cmdline)

lp.options = options

def reseed(seed=None):
    if seed is None:
        seed = options.seed
    random.seed(seed)
    np.random.seed(seed)

reseed()

def new_model():
    model_creator = model_creator_class(options)