Condition Coverage

blib/lib/Algorithm/Classifier/IsolationForest.pm
Criterion Covered Total %
condition 132 177 74.5


and 3 conditions

line !l l&&!r l&&r condition
1959 54 1 60 $args{'use_c'} && $HAS_C
1963 1 2 2 $args{'use_openmp'} && $HAS_OPENMP
1970 0 0 9 $args{'use_openmp_fit'} && $HAS_OPENMP && $use_c
1997 153 5 1 defined $self->{'extension_level'} and $self->{'extension_level'} < 0
2000 2 1 5 $self->{'contamination'} > 0 && $self->{'contamination'} <= 0.5
150 5 3 defined $self->{'contamination'} and not $self->{'contamination'} > 0 && $self->{'contamination'} <= 0.5
2003 144 11 0 defined $self->{'parallel_fit'} and !($self->{'parallel_fit'} =~ /^\d+$/) || $self->{'parallel_fit'} < 1
2086 4 2 130 ref $data eq "ARRAY" and @$data
2089 2 2 126 ref $data->[0] eq "ARRAY" and @{$data->[0];}
2134 111 1 8 defined $workers and $workers > 1
112 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()
47 65 0 $self->{'_use_c'} and $self->{'_use_openmp_fit'}
2229 1 0 7505 $self->{'_use_c'} and $self->{'_c_nodes'}
2288 14 0 14991 $self->{'_use_c'} and $self->{'_c_nodes'}
0 0 14991 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0
0 1 14990 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0
1 2 14988 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0 and $threshold < 1
2370 0 0 0 defined $self->{'feature_names'} and ref $self->{'feature_names'} eq "ARRAY"
0 0 0 defined $self->{'feature_names'} and ref $self->{'feature_names'} eq "ARRAY" and @{$self->{'feature_names'};}
2425 55 3 14208 $self->{'_use_c'} and $self->{'_c_nodes'}
2518 2 0 5103 $self->{'_use_c'} and $self->{'_c_nodes'}
0 0 5103 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0
0 0 5103 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0
0 0 5103 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0 and $threshold < 1
2614 2 0 14112 $self->{'_use_c'} and $self->{'_c_nodes'}
0 0 14112 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0
0 0 14112 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0
0 0 14112 $self->{'_use_c'} and $self->{'_c_nodes'} and $self->{'c_psi'} > 0 and $threshold > 0 and $threshold < 1
2697 1 1 20 ref $payload eq "HASH" and defined $payload->{'format'}
2 0 20 ref $payload eq "HASH" and defined $payload->{'format'} and $payload->{'format'} eq "Algorithm::Classifier::IsolationForest"
2919 17339 110730 111298 defined $v and $v < $split
2975 26240 55685 57761 not $missing and $dot <= $b
3012 1703 2186 963 defined $v && $v < $node->[2]
3026 1920 562 552 !$missing && $dot <= $b
3117 0 3806 24985 defined $n_features and $num == $n_features
3166 0 9 56016 ref $self->{'trees'} eq "ARRAY" and @{$self->{'trees'};}
3614 0 0 9 ref $fill eq "ARRAY" and @$fill == $self->{'n_features'}

or 2 conditions

line l !l condition
1926 48 116 $args{'mode'} // "axis"
1939 29 134 $args{'missing'} // "die"
1943 8 154 $args{'impute_with'} // "mean"
1992 135 26 $args{'n_trees'} // 100
86 75 $args{'sample_size'} // 256
2699 19 1 $payload->{'params'} || {}
2703 20 0 $payload->{'trees'} || []
2704 19 1 $payload->{'version'} // 0
2728 19 1 $p->{'mode'} // "axis"
17 3 $p->{'missing'} // "zero"
17 3 $p->{'impute_with'} // "mean"
2809 42769 0 rand() || 1e-12
3014 2176485 102385 $$x[$node->[1]] // 0
3029 389639 5238 $$x[$idx->[$_]] // 0
3178 2 0 $Config::Config{'d_fork'} || ''
3306 12 46 $self->{'extension_level_used'} // 0
3347 5 2 $self->{'extension_level_used'} // 0
3477 0 0 ref $data || 'scalar'

or 3 conditions

line l !l&&r !l&&!r condition
1927 132 31 1 $mode eq "axis" or $mode eq "extended"
2003 2 0 9 !($self->{'parallel_fit'} =~ /^\d+$/) || $self->{'parallel_fit'} < 1
2846 87356 57707 148484 $depth >= $limit or $size <= 1
2864 47026 40418 611084 not defined $lo[$f] or $v < $lo[$f]
2865 47026 39500 612002 not defined $hi[$f] or $v > $hi[$f]
2872 284195 323677 6413849 not defined $lo[$f] or $v < $lo[$f]
2873 284195 321171 6416355 not defined $hi[$f] or $v > $hi[$f]
3279 0 0 26 $@ or ref $trees ne "ARRAY"
3615 3 6 0 $self->{'_fill_packed'} //= pack("d*", @$fill)