Condition Coverage

blib/lib/Algorithm/Classifier/IsolationForest.pm
Criterion Covered Total %
condition 156 214 72.9


and 3 conditions

line !l l&&!r l&&r condition
2223 56 1 62 $args{'use_c'} && $HAS_C
2227 1 2 2 $args{'use_openmp'} && $HAS_OPENMP
2234 0 0 9 $args{'use_openmp_fit'} && $HAS_OPENMP && $use_c
2262 178 5 1 defined $self->{'extension_level'} and $self->{'extension_level'} < 0
2265 2 1 12 $self->{'contamination'} > 0 && $self->{'contamination'} <= 0.5
168 12 3 defined $self->{'contamination'} and not $self->{'contamination'} > 0 && $self->{'contamination'} <= 0.5
2268 169 11 0 defined $self->{'parallel_fit'} and !($self->{'parallel_fit'} =~ /^\d+$/) || $self->{'parallel_fit'} < 1
2311 0 1 8 defined $voting and $voting =~ /\A(?:mean|majority)\z/
2321 0 1 6 ref $self->{'trees'} eq 'ARRAY' && @{$self->{'trees'};}
2322 1 2 4 $fitted && defined $self->{'contamination'}
2324 1 0 3 ref $data eq "ARRAY" and @$data
2405 4 2 153 ref $data eq "ARRAY" and @$data
2408 2 2 149 ref $data->[0] eq "ARRAY" and @{$data->[0];}
2453 134 1 8 defined $workers and $workers > 1
135 0 8 defined $workers and $workers > 1 and $self->{'n_trees'} > 1
1 0 8 defined $workers and $workers > 1 and $self->{'n_trees'} > 1 and _fork_supported()
49 86 0 $self->{'_use_c'} and $self->{'_use_openmp_fit'}
2548 1 0 6817 $self->{'_use_c'} and $self->{'_c_nodes'}
2618 2 0 16 $self->{'_use_c'} and $self->{'_c_nodes'}
2651 14 0 14196 $self->{'_use_c'} and $self->{'_c_nodes'}
0 0 14196 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0
0 1 14195 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0
1 2 14193 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0 and $threshold < 1
2733 4 0 44 defined $self->{'feature_names'} and ref $self->{'feature_names'} eq "ARRAY"
4 0 44 defined $self->{'feature_names'} and ref $self->{'feature_names'} eq "ARRAY" and @{$self->{'feature_names'};}
2801 2 0 7 $self->{'_use_c'} and $self->{'_c_nodes'}
2822 55 6 15723 $self->{'_use_c'} and $self->{'_c_nodes'}
2924 0 0 3 $self->{'_use_c'} and $self->{'_c_nodes'}
2946 2 0 5342 $self->{'_use_c'} and $self->{'_c_nodes'}
0 0 5342 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0
0 0 5342 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0
0 0 5342 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0 and $threshold < 1
3047 2 0 4 $self->{'_use_c'} and $self->{'_c_nodes'}
3072 2 0 13654 $self->{'_use_c'} and $self->{'_c_nodes'}
0 0 13654 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0
0 0 13654 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0
0 0 13654 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0 and $threshold < 1
3156 1 1 31 ref $payload eq "HASH" and defined $payload->{'format'}
2 0 31 ref $payload eq "HASH" and defined $payload->{'format'} and $payload->{'format'} eq "Algorithm::Classifier::IsolationForest"
3328 0 0 0 $i > 0 and $$desc[$i - 1] == $v
3330 0 0 0 $j < $n and $desc->[$j] == $v
3332 0 0 0 $i > 0 and $k - $i < $j - $k
3554 17339 110730 111298 defined $v and $v < $split
3620 26240 55685 57761 not $missing and $dot <= $b
3657 1703 2186 963 defined $v && $v < $node->[2]
3671 1920 562 552 !$missing && $dot <= $b
3762 0 3806 25903 defined $n_features and $num == $n_features
3811 0 9 55876 ref $self->{'trees'} eq "ARRAY" and @{$self->{'trees'};}
4270 0 0 9 ref $fill eq "ARRAY" and @$fill == $self->{'n_features'}

or 2 conditions

line l !l condition
2178 58 132 $args{'mode'} // "axis"
2191 29 160 $args{'missing'} // "die"
2195 8 180 $args{'impute_with'} // "mean"
2207 22 165 $args{'voting'} // "mean"
2257 158 28 $args{'n_trees'} // 100
107 79 $args{'sample_size'} // 256
3158 30 1 $payload->{'params'} || {}
3162 31 0 $payload->{'trees'} || []
3163 30 1 $payload->{'version'} // 0
3189 30 1 $p->{'mode'} // "axis"
28 3 $p->{'missing'} // "zero"
28 3 $p->{'impute_with'} // "mean"
29 2 $p->{'voting'} // "mean"
3427 43954 0 rand() || 1e-12
3659 2542910 102385 $$x[$node->[1]] // 0
3674 486017 5238 $$x[$idx->[$_]] // 0
3823 2 0 $Config::Config{'d_fork'} || ''
3951 14 65 $self->{'extension_level_used'} // 0
3992 5 2 $self->{'extension_level_used'} // 0
4122 0 0 ref $data || 'scalar'

or 3 conditions

line l !l&&r !l&&!r condition
2179 155 34 1 $mode eq "axis" or $mode eq "extended"
2268 2 0 9 !($self->{'parallel_fit'} =~ /^\d+$/) || $self->{'parallel_fit'} < 1
3472 87986 57977 149304 $depth >= $limit or $size <= 1
3490 47026 40418 611084 not defined $lo[$f] or $v < $lo[$f]
3491 47026 39500 612002 not defined $hi[$f] or $v > $hi[$f]
3498 286655 328482 6443277 not defined $lo[$f] or $v < $lo[$f]
3499 286655 326025 6445734 not defined $hi[$f] or $v > $hi[$f]
3924 0 0 26 $@ or ref $trees ne "ARRAY"
4271 3 6 0 $self->{'_fill_packed'} //= pack("d*", @$fill)