Skip to content

Commit 3cf454f

Browse files
committed
script update
1 parent af317a7 commit 3cf454f

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

results/class_statistics.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
for i = 1:length(strats)
6363
rows{i+1} = strats{i}{2};
6464
end
65-
count_ = num2cell(count);
65+
count_ = num2cell(round(count));
6666
count_ = [cols;count_];
6767
count_ = [rows',count_];
6868
count_ = cell2table(count_);
@@ -73,8 +73,9 @@
7373
% Export the tables
7474
writetable(count_,fullfile(rpath,'numeric.csv'),'WriteVariableNames',0);
7575
writetable(percentage_per_classifier_,fullfile(rpath,'percentage.csv'),'WriteVariableNames',0);
76-
77-
error = 0;
7876
delete(h);
77+
78+
error = 0;
79+
7980
end
8081

File renamed without changes.

unused/test_scripts/test_sigma.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
segmentation_path = 'C:\Users\Avgoustinos\Desktop\MWMGEN\tiago_original\segmentation\segmentation_configs_29476_250_09.mat';
2-
classification_folder = 'C:\Users\Avgoustinos\Desktop\MWMGEN\tiago_original\Mclassification\class_1664_29476_250_09_10_10_mr0';
3-
animals_trajectories_map_file = 'C:\Users\Avgoustinos\Desktop\MWMGEN\animals_trajectories_map.mat';
1+
segmentation_path = 'C:\Users\Avgoustinos\Desktop\tiago_original\segmentation\segmentation_configs_29476_250_09.mat';
2+
classification_folder = 'C:\Users\Avgoustinos\Desktop\tiago_original\Mclassification\class_2322_29476_250_09_10_10_mr0-correct2';
3+
animals_trajectories_map_file = 'C:\Users\Avgoustinos\Desktop\traj_map.mat';
44

55
% Output Folder
66
output_folder = char(getSpecialFolder('Desktop'));

unused/test_scripts/test_sigma_distr_strat.m

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
sigma = 4;
1212
discard_undefined = 0;
1313
%w = 'defined';
14-
w = 'defined';
15-
tiny_num = 1e-6;
16-
% data smoothing
14+
w = 'computed';
15+
norm_method = 'off';
16+
hard_bounds = 'on';
17+
%tiny_num = 1e-6;
18+
tiny_num = realmin;
1719
min_seg = 1;
1820

19-
sig = 1:50;
21+
sig = 0.05:0.05:10;
2022
h = waitbar(0,'Generating distr_strats');
2123
for ss = 1:length(sig)
2224
sigma = sig(ss);
@@ -65,7 +67,30 @@
6567
end
6668
case 'computed'
6769
class_w = computed_weights(segmentation_configs, classification_configs);
68-
end
70+
end
71+
72+
%weights normalization
73+
if ~isequal(norm_method,'off') && ~isequal(norm_method,'OFF') && ~isequal(norm_method,0)
74+
class_w = normalizations(class_w,norm_method);
75+
end
76+
%hard bounds
77+
if ~isequal(hard_bounds,'off') && ~isequal(hard_bounds,'OFF') && ~isequal(hard_bounds,0);
78+
avg_w = max(class_w)/2;
79+
avg_w = avg_w-1;
80+
avg_w = avg_w/2;
81+
for i = 1:length(class_w)
82+
if class_w(i) < avg_w
83+
class_w(i) = 1;
84+
else
85+
class_w(i) = max(class_w);
86+
end
87+
% if class_w(i) < 5
88+
% class_w(i) = 1;
89+
% else
90+
% class_w(i) = 10;
91+
% end
92+
end
93+
end
6994

7095
%strategies distribution
7196
class_distr_traj = [];

0 commit comments

Comments
 (0)