Commit 322b3a4 1 parent cb96f0a commit 322b3a4 Copy full SHA for 322b3a4
File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 165
165
l_prob = l_hist(l_hist ~= 0 )/sum(l_hist(l_hist ~= 0 )); % get probability distribution from histogram
166
166
ent_Sum = (l_prob .* log(l_prob ));
167
167
if l_classes > 1
168
- y(5 ) = - nansum (ent_Sum )/log(N(1 ));
168
+ y(5 ) = - sum (ent_Sum(~isnan( ent_Sum )) )/log(N(1 ));
169
169
else
170
- y(5 ) = - nansum (ent_Sum );
170
+ y(5 ) = - sum (ent_Sum(~isnan( ent_Sum )) );
171
171
end
172
172
173
173
% histogram of vertical lines
244
244
rt_prob = rt_hist(rt_hist ~= 0 )/sum(rt_hist(rt_hist ~= 0 )); % get probability distribution from histogram
245
245
ent_Sum = (rt_prob .* log(rt_prob ));
246
246
if rt_classes > 1
247
- y(11 ) = - nansum (ent_Sum )/log(N(1 ));
247
+ y(11 ) = - sum (ent_Sum(~isnan( ent_Sum )) )/log(N(1 ));
248
248
else
249
- y(11 ) = - nansum (ent_Sum );
249
+ y(11 ) = - sum (ent_Sum(~isnan( ent_Sum )) );
250
250
end
251
251
252
252
if netw
253
253
% clustering
254
254
kv = sum(x_theiler ,1 ); % degree of nodes
255
- y(12 ) = nanmean(diag(x_theiler * x_theiler * x_theiler )' ./ (kv .* (kv - 1 )));
255
+ clustering_coeff = diag(x_theiler * x_theiler * x_theiler )' ./ (kv .* (kv - 1 ));
256
+ y(12 ) = mean(clustering_coeff(~isnan(clustering_coeff )));
256
257
257
258
% transitivity
258
259
denom = sum(sum(x_theiler * x_theiler ));
You can’t perform that action at this time.
0 commit comments