Branch Coverage

blib/lib/AI/Perceptron/Simple.pm
Criterion Covered Total %
branch 85 96 88.5


line true false branch
234 2 6 unless my $stimuli = shift()
235 2 4 unless my(@shuffled_stimuli_names) = @_
247 12 0 if csv('in', \@aoa, 'out', $_, 'encoding', ':encoding(utf-8)')
301 9 4 unless exists $data{'learning_rate'}
302 9 4 unless exists $data{'threshold'}
309 4 22 unless exists $data{$_}
312 3 10 if @missing_keys
351 1 4203 if (@_) { }
368 1 1527 if (@_) { }
433 3 21 unless defined $display_stats
434 0 24 if ($display_stats and not defined $identifier)
439 0 24 unless open my $data_fh, '<:encoding(UTF-8)', $stimuli_train_csv
468 33 396 if ($output >= $self->threshold and $row->{$expected_output_header} eq 0) { }
276 120 elsif ($output < $self->threshold and $row->{$expected_output_header} eq 1) { }
48 72 elsif ($output < $self->threshold and $row->{$expected_output_header} eq 0) { }
72 0 elsif ($output >= $self->threshold and $row->{$expected_output_header} eq 1) { }
471 33 0 if ($display_stats)
482 276 0 if ($display_stats)
492 42 6 if ($display_stats)
503 63 9 if ($display_stats)
542 12402 21186 if ($stimuli_hash_ref->{$_})
585 1188 9936 if ($tuning_status == 0) { }
9936 0 elsif ($tuning_status == 1) { }
587 480 708 if ($stimuli_hash_ref->{$_})
594 3717 6219 if ($stimuli_hash_ref->{$_})
713 0 24 unless exists $data_hash_ref->{$_}
716 0 12 if @missing_keys
725 6 6 defined $data_hash_ref->{'results_write_to'} ? :
755 0 12 unless open my $data_fh, '<:encoding(UTF-8)', $stimuli_validate
768 36 54 if (_calculate_output($self, $data) >= $self->threshold) { }
860 2 4 defined $info->{'more_stats'} ? :
868 0 6 unless open my $data_fh, '<:encoding(UTF-8)', $file
882 10 34 if ($row->{$actual_header} == 1 and $row->{$predicted_header} == 1) { }
16 18 elsif ($row->{$actual_header} == 0 and $row->{$predicted_header} == 0) { }
12 6 elsif ($row->{$actual_header} == 1 and $row->{$predicted_header} == 0) { }
4 2 elsif ($row->{$actual_header} == 0 and $row->{$predicted_header} == 1) { }
918 2 2 if ($more_stats == 1)
1162 8 116 unless exists $labels->{$_}
1165 6 56 if @missing_keys
1233 38 18 if exists $c_matrix->{'precision'}
1234 38 18 if exists $c_matrix->{'specificity'}
1235 38 18 if exists $c_matrix->{'F1_Score'}
1236 38 18 if exists $c_matrix->{'negative_predicted_value'}
1237 38 18 if exists $c_matrix->{'false_negative_rate'}
1238 38 18 if exists $c_matrix->{'false_positive_rate'}
1239 38 18 if exists $c_matrix->{'false_discovery_rate'}
1240 38 18 if exists $c_matrix->{'false_omission_rate'}
1241 38 18 if exists $c_matrix->{'balanced_accuracy'}