Ejemplo n.º 1
0
    ag_tallies[j, :] = trial['ag_tallies']
    fd_tallies[j, :] = trial['fd_tallies']

samples = 5.0
van_tallies = van_tallies / samples
van_tallies[:, 2] = 1.0 - van_tallies[:, 0] - van_tallies[:, 1]
rand_tallies = rand_tallies / samples
rand_tallies[:, 2] = 1.0 - rand_tallies[:, 0] - rand_tallies[:, 1]
es_tallies = es_tallies / samples
es_tallies[:, 2] = 1.0 - es_tallies[:, 0] - es_tallies[:, 1]
ag_tallies = ag_tallies / samples
ag_tallies[:, 2] = 1.0 - ag_tallies[:, 0] - ag_tallies[:, 1]
fd_tallies = fd_tallies / samples
fd_tallies[:, 2] = 1.0 - fd_tallies[:, 0] - fd_tallies[:, 1]

van_means, van_sems = statistics.mean_sem(van_tallies)
rand_means, rand_sems = statistics.mean_sem(rand_tallies)
es_means, es_sems = statistics.mean_sem(es_tallies)
ag_means, ag_sems = statistics.mean_sem(ag_tallies)
fd_means, fd_sems = statistics.mean_sem(fd_tallies)

print "Van:      " + str(np.mean(van_tallies, axis=0))
print "Early:    " + str(np.mean(es_tallies, axis=0))
print "Rand:     " + str(np.mean(rand_tallies, axis=0))
print "AG:     " + str(np.mean(ag_tallies, axis=0))
print "FD:     " + str(np.mean(fd_tallies, axis=0))

print np.sum(fd_means), np.sum(ag_means), np.sum(es_means), np.sum(
    van_means), np.sum(rand_means)

plt.style.use('ggplot')
Ejemplo n.º 2
0
rec_scores = pickle.load(open(data_dir + 'multiple_trials/rec_scores.pkl', 'r'))
rec_cutoffs = pickle.load(open(data_dir + 'multiple_trials/rec_cutoffs.pkl', 'r'))
rec_mo_scores = pickle.load(open(data_dir + 'multiple_trials/rec_mo_scores.pkl', 'r'))
rec_mo_cutoffs = pickle.load(open(data_dir + 'multiple_trials/rec_mo_cutoffs.pkl', 'r'))

print "Averaging over " + str(len(all_trials)) + " trials"

rec_scores = rec_scores[:]
rec_cutoffs = rec_cutoffs[:]
rec_mo_scores = rec_mo_scores[:]
rec_mo_cutoffs = rec_mo_cutoffs[:]
els = 150

data = (np.array(rec_scores) / np.array(rec_cutoffs))[-100: -50]
data = np.clip(data, 0, 1)
mean, sem = statistics.mean_sem(data)

data_mo = (np.array(rec_mo_scores) / np.array(rec_mo_cutoffs))[-100:-50]
data_mo = np.clip(data_mo, 0, 1)
mean, sem = statistics.mean_sem(data_mo)

datas = [data[:, :]]
datas_mo = [data_mo[:, :]]
labels = ['DFO']
colors = ['blue']
mean = np.mean(data[:, :els], axis=0)
std = scipy.stats.sem(data[:, :els], axis=0)
mean_mo = np.mean(data_mo[:, :els], axis=0)
std_mo = scipy.stats.sem(data_mo[:, :els], axis=0)
print mean.shape
x = np.arange(mean.shape[0])
Ejemplo n.º 3
0
            es_samples.append(trial['es_tallies'])

        van_tallies.append(np.mean(van_samples, axis=0))
        rand_tallies.append(np.mean(rand_samples, axis=0))
        es_tallies.append(np.mean(es_samples, axis=0))

    samples = 1.0
    van_tallies = np.array(van_tallies) / samples
    rand_tallies = np.array(rand_tallies) / samples
    es_tallies = np.array(es_tallies) / samples

    van_tallies[:, -1] = 1 - van_tallies[:, 0] - van_tallies[:, 1]
    rand_tallies[:, -1] = 1 - rand_tallies[:, 0] - rand_tallies[:, 1]
    es_tallies[:, -1] = 1 - es_tallies[:, 0] - es_tallies[:, 1]

    van_means, van_sems = statistics.mean_sem(van_tallies)
    rand_means, rand_sems = statistics.mean_sem(rand_tallies)
    es_means, es_sems = statistics.mean_sem(es_tallies)

    # van_means, van_sems = van_means[::-1], van_sems[::-1]
    # rand_means, rand_sems = rand_means[::-1], rand_sems[::-1]
    # es_means, es_sems = es_means[::-1], es_sems[::-1]

    all_van_means.append(van_means)
    all_van_sems.append(van_sems)

    all_rand_means.append(rand_means)
    all_rand_sems.append(rand_sems)

    all_es_means.append(es_means)
    all_es_sems.append(es_sems)