Ejemplo n.º 1
0
                                              responses[i])
        rt[i] = computeMeanRepresentativeSteps(step)[0]
    model.state = convertStimulus(np.array(model.state))
    model.action = np.array(model.action)
    model.responses = np.array(model.responses)
    model.reaction = np.array(model.reaction)


# -----------------------------------

# -----------------------------------
# HUMAN LEARNING
# -----------------------------------
human = HLearning(
    dict({
        'meg': ('../../PEPS_GoHaL/Beh_Model/', 48),
        'fmri': ('../../fMRI', 39)
    }))
# -----------------------------------

# -----------------------------------
# PARAMETERS + INITIALIZATION
# -----------------------------------
very_good_parameters = dict({
    'noise': 0.0001,
    'length': 10,
    'alpha': 0.8,
    'beta': 3.0,
    'gamma': 0.4,
    'threshold': 4.0,
    'gain': 2.0
Ejemplo n.º 2
0
# -----------------------------------                                                 
if not sys.argv[1:]:
   sys.stdout.write("Sorry: you must specify at least 1 argument")
   sys.stdout.write("More help avalaible with -h or --help option")
   sys.exit(0)
parser = OptionParser()
parser.add_option("-m", "--model", action="store", help="The name of the model to optimize", default=False)
parser.add_option("-t", "--time", action="store", help="Time of execution", default=False)
parser.add_option("-d", "--data", action="store", help="The data to fit", default=False)
parser.add_option("-o", "--output", action="store", help="Output directory", default=False)
(options, args) = parser.parse_args()
# -----------------------------------                                                 
# -----------------------------------                                                 
# HUMAN LEARNING                                                                      
# -----------------------------------                                                 
human = HLearning(dict({'meg':('Beh/MEG/Beh_Model/',48), 'fmri':('Beh/fMRI',39)}))
# -----------------------------------                                                 

# -----------------------------------                                                 
# POSSIBLE MODELS                                                                     
# -----------------------------------                                                 
models = dict({'bayesian':"BayesianWorkingMemory(['s1', 's2', 's3'], ['thumb', 'fore', 'midd', 'ring', 'little'], vars(options))",
               'qlearning':"QLearning(['s1', 's2', 's3'], ['thumb', 'fore', 'midd', 'ring', 'little'], vars(options))",
               'fusion':"FSelection(['s1', 's2', 's3'], ['thumb', 'fore', 'midd', 'ring', 'little'], vars(options))",
               'kalman':"KalmanQLearning(['s1', 's2', 's3'], ['thumb', 'fore', 'midd', 'ring', 'little'], vars(options))",
               'keramati':"KSelection(['s1', 's2', 's3'], ['thumb', 'fore', 'midd', 'ring', 'little'], vars(options))",
              })
# -----------------------------------

# ------------------------------------
# CREATE DIRECTORY RESULTS