=head1 NAME

heri-stat - calculates precision, recall, F1 and some other things

=head1 SYNOPSIS

B<heri-stat> [-R] [-mrca] [-u label] [-t threshold]
   I<outcomes_file> I<predictions_file>

B<heri-stat> -1 [-R] [-mrca] [-u label] [-t threshold]
   [I<files>...]

B<heri-stat> -g mode [-R] [-xy]  I<outcomes_file> I<predictions_file>

B<heri-stat> -1 -g mode [-R]  [I<files>...]

B<heri-stat> [-h]

=head1 DESCRIPTION

The first and second types of B<heri-stat> invocation takes
classification dataset and predictions on input, and calculate
precision, recall and F1. Unless option B<-1> was applied, B<heri-stat>
reads correct classes from I<outcomes_file> (one class per line) and
predicted classes from I<predictions_file> (one class per line).  It
is allowed for I<predictions_file> to contain two tokens per line. The
first one is a predicted class, the second one is a score,
e.g. probability.

The third and forth type of B<heri-stat> invocation takes regression
outcomes and predictions on input (one value per line) and calculate
mean absolute error (MAE),
mean squared error (MSE) and/or mean absolute error (MAE).

If B<-1> was applied, two or three tokens per line are expected on input:
correct value (or class for classification), predicted value (or class),
and optional score.

=head1 OPTIONS

=over 6

=item B<-h, --help>

Display help information.

=item B<-R, --raw>

Raw tab-separated output.

=item B<-m, --micro-avg>

Disable micro averaged P/R/F1 output.

=item B<-r, --macro-avg>

Disable macro averaged P/R/F1 output.

=item B<-c, --per-class>

Disable output of per-class statistics.

=item B<-a, --accuracy>

Disable output of accuracy.

=item B<-1, --single>

2 or 3 tokens per line are expected on input.

=item B<-u, --unclassified> I<label>

Set the label for "unclassified" object. If specified, micro-averaged
P/R/F1 is calculated instead of accuracy.
Also, statistics for this class is not calculated.

=item B<-t, --treshold> I<value>

Consider classes with score less than the specified I<value> as unclassified.

=item B<-g, --regression> I<mode>

Regression outcomes and predictions are expected on input. If I<mode> contains
symbol I<a>, MAE is output, I<s> -- MSE, and I<r> -- RMSE is output.

=back

=head1 HOME

L<http://github.com/cheusov/herisvm>

=head1 SEE ALSO

L<heri-eval(1)>
L<heri-split(1)>
