Branch Coverage

blib/lib/Algorithm/Classifier/IsolationForest/App/Command/stream.pm
Criterion Covered Total %
branch 81 122 66.3


line true false branch
116 0 10 if (not defined $opt->{'i'}) { }
0 10 elsif (not -f $opt->{'i'}) { }
0 10 elsif (not -r $opt->{'i'}) { }
124 0 10 if (-e $opt->{'m'} and not -r $opt->{'m'})
128 0 1 if ($opt->{'learn_only'} and $opt->{'score_only'})
132 0 1 if (defined $opt->{'o'} and not $opt->{'w'} and -e $opt->{'o'})
136 0 0 if (defined $opt->{'threshold'} and $opt->{'threshold'} <= 0 || $opt->{'threshold'} >= 1)
140 0 10 if (defined $opt->{'growth'} and not $opt->{'growth'} =~ /\A(?:adaptive|fixed)\z/)
144 1 9 if (defined $opt->{'mungers'})
145 0 1 if (not -f $opt->{'mungers'}) { }
0 1 elsif (not -r $opt->{'mungers'}) { }
0 1 elsif (not defined $opt->{'t'}) { }
154 3 7 if (defined $opt->{'prototype'})
155 0 3 if (not -f $opt->{'prototype'}) { }
0 3 elsif (not -r $opt->{'prototype'}) { }
160 0 3 if (defined $opt->{'t'} or defined $opt->{'mungers'})
176 6 4 if (-f $opt->{'m'})
178 1 5 unless ref $oif eq "Algorithm::Classifier::IsolationForest::Online"
187 2 7 if (not $oif and defined $opt->{'prototype'})
191 0 2 if $@
193 1 1 unless $proto->{'class'} eq "online"
196 0 1 if defined $opt->{'n'}
197 0 1 if defined $opt->{'window'}
198 0 1 if defined $opt->{'eta'}
199 0 1 if defined $opt->{'growth'}
200 0 1 if defined $opt->{'subsample'}
201 1 0 if defined $opt->{'s'}
202 0 1 if defined $opt->{'c'}
205 0 1 if $@
212 1 7 if (not $oif and defined $opt->{'mungers'})
215 0 1 if $@
216 0 1 unless ref $mungers eq "HASH"
222 1 5 ref $oif->{'mungers'} eq 'HASH' && %{$oif->{'mungers'};} ? :
1 1 $mungers ? :
6 2 $oif ? :
232 0 752 if $line =~ /^\s*$/
236 8 744 if (not defined $expected_cols) { }
0 744 elsif (scalar @fields != $expected_cols) { }
238 0 8 if $expected_cols < 1
250 590 162 unless ($has_mungers)
255 0 1770 unless &looks_like_number($field)
272 1 7 if ($from_proto)
274 1 0 defined $expected_cols ? :
275 0 1 unless $n_tags == $n_features
284 2 6 unless ($oif)
285 1 1 if (defined $opt->{'t'})
287 1 0 defined $expected_cols ? :
288 0 1 unless $n_tags == $n_features
308 2 6 if ($has_mungers)
314 0 0 defined $munged->[$i][$col] ? :
0 486 unless &looks_like_number($munged->[$i][$col])
327 1 7 if ($opt->{'learn_only'}) { }
331 1 6 if ($opt->{'score_only'}) { }
338 0 7 defined $oif->decision_threshold ? :
0 7 defined $opt->{'threshold'} ? :
343 51 580 $scores->[$i] >= $threshold ? :
344 0 631 if ($opt->{'d'}) { }
354 0 7 if (not $opt->{'score_only'} and defined $oif->{'contamination'} and $oif->window_count)
358 7 1 if ($opt->{'save'} and not $opt->{'score_only'})
362 7 1 if (length $results_string)
363 6 1 if (not defined $opt->{'o'}) { }