Example #1
0
def main():
    bots = [MyBot()]
    bots.extend(other_bots.get_bots(5, 2))
    # Plot a single run. Useful for debugging and visualizing your
    # bot's performance. Also prints the bot's final profit, but this
    # will be very noisy.
    #plot_simulation.run(bots, lmsr_b=250)

    # Calculate statistics over many runs. Provides the mean and
    # standard deviation of your bot's profit.
    run_experiments.run(bots, simulations=1000, lmsr_b=250)
Example #2
0
def main():
    bots = [MyBot()]
    bots.extend(other_bots.get_bots(5, 2))
    # Plot a single run. Useful for debugging and visualizing your
    # bot's performance. Also prints the bot's final profit, but this
    # will be very noisy.
    #plot_simulation.run(bots, lmsr_b=150, timesteps=100)

    # Calculate statistics over many runs. Provides the mean and
    # standard deviation of your bot's profit.
    run_experiments.run(bots, simulations=1000, lmsr_b=150, num_processes=2, timesteps=100)
Example #3
0
def main():
    bots = [MyBot()]
    # 5,2 to start
    num_fundamentals = 8
    num_technical = 2
    bots.extend(other_bots.get_bots(num_fundamentals, num_technical))
    # Plot a single run. Useful for debugging and visualizing your
    # bot's performance. Also prints the bot's final profit, but this
    # will be very noisy.
    plot_simulation.run(bots, lmsr_b=250)

    # Calculate statistics over many runs. Provides the mean and
    # standard deviation of your bot's profit.
    run_experiments.run(bots, num_processes=4, simulations=1000, lmsr_b=250)
def main():
    bots = [MyBot()]
    fundamental = 10
    technical = 1
    bots.extend(other_bots.get_bots(fundamental,technical))
    print ('Fundamental: {}, Technical: {}'.format(fundamental,technical))
    # Plot a single run. Useful for debugging and visualizing your
    # bot's performance. Also prints the bot's final profit, but this
    # will be very noisy.
    #plot_simulation.run(bots, 200, lmsr_b=250)
    
    # Calculate statistics over many runs. Provides the mean and
    # standard deviation of your bot's profit.
    run_experiments.run(bots, num_processes=4, simulations=2000, lmsr_b=250)
def run_simulationsHIDDEN(env,f_causal,f_common,f_hidden,methods,n_repeats):
    N = 200
    D = 10

    opts = {}
    if methods=='ALL':
        methods = ['CV_GPbase_LIN','CV_GPkronprod_LIN','CV_GPkronsum_LIN','CV_GPpool_LIN','CV_GPpool_LIN']
    
    opts['n_c'] = 1
    opts['n_sigma'] = 1
    opts['nfolds'] = 10
    opts['standardizedX'] = False
    opts['standardizedY'] = False
    opts['min_iter'] = 5
    opts['max_iter'] = 200
    opts['maf'] = None

    out_dir = os.path.join(env['out_dir'],'simulations_hidden')
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)
    fn_out = os.path.join(out_dir,'results_N%d_D%d_causal%02d_common%02d_hidden%02d.hdf5'%(N,D,10*f_causal,10*f_common,10*f_hidden))
    f = h5py.File(fn_out,'w')


    for rep_id in range(n_repeats):
        # load data
        data,RV = load_simulationsHIDDEN(env,N,D,f_causal,f_common,f_hidden,rep_id)
    
        # run experiments
        SP.random.seed(0)
        out = f.create_group('rep%d'%rep_id)
        
        try:
            run_experiments.run(methods,data,opts,out)
        except:
            print 'ouch, something is wrong...'
        
    f.close()