-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathC30_analysis.jl
72 lines (57 loc) · 2.03 KB
/
C30_analysis.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#just some notes on analysis of the C30 farm
# load relevant files
include("results_analysis.jl")
include("svd_cluster.jl")
include("parameter_analysis.jl")
# load (arbitrary first farm for list of parameter names "args")
f1 = load("MiniC30/farm_C30_Farms_C30_spock-brody01-01_0001.jld")
args = f1["args"];
# load results of entire farm run
##results = load("MiniC30_C30_results.jld")
# or just load the good farms
results = load_farm_cost_filter("C30", "MiniC30"; threshold = -0.00025)
# make a histogram of each parameter
HD = histo_params(f1["args"], results["params"], results["tcost"], results["cost"], results["files"]);
# scatter parameters
cluster_info = load("MiniC30_C30_clusters.jld");
cluster_ids = cluster_info["idx"];
scatter_by_arg(results, args, "hW_P", "hW_A"; cluster_ids = cluster_ids);
# histogram for each cluster
histo_params_by_cluster(results, args, cluster_ids, target_cluster)
# SVD of dynamics
SVD_interactive("C30"; farmdir="MiniC30", threshold=-0.00025, disp_encoding=false, color_clusters = true);
# check psychometric plots
# #takesforever
plot_psychometric(results, color_clusters=true, cluster_ids=cluster_ids, plot_only=Inf, hit_type="standard")
plot_psychometric(results, color_clusters=true, cluster_ids=cluster_ids, plot_only=Inf, hit_type="binarized")
# unilateral analysis
unilateral = load("MiniC30_C30_unilateral.jld","uni_results")
numfarms = size(unilateral["uni"],1)
#ipsi/contra x pro/anti x control/delay/target/full
uni = unilateral["uni"].*100;
#
figure()
for i=1:numfarms
plot(uni[i,1,1,1], uni[i,1,2,1], "rx")
plot(uni[i,2,1,4], uni[i,2,2,4], "bo")
end
xlabel("pro hit%")
ylabel("anti hit%")
# GO ipsi trials
figure()
for i=1:numfarms
plot(uni[i,1,1,1], uni[i,1,2,1], "rx")
plot(uni[i,1,1,4], uni[i,2,2,4], "bo")
end
xlabel("pro hit%")
ylabel("anti hit%")
title("go ipsi")
# GO contra trials
figure()
for i=1:numfarms
plot(uni[i,1,1,1], uni[i,1,2,1], "rx")
plot(uni[i,2,1,4], uni[i,1,2,4], "bo")
end
xlabel("pro hit%")
ylabel("anti hit%")
title("go contra")