NAME

Algorithm::Classifier::IsolationForest::App::Command::predict - Processes the data using the score_predict_samples using the specified model

DESCRIPTION

Scores every input row and labels it, printing one line per row:

$score,$predict

With -d the input feature columns are prepended, which is the form iforest csv2plot expects:

$feat1,...,$featN,$score,$predict

Input may be a CSV or a .iforest-packed binary from iforest pack, detected by its magic bytes; with a packed input the -d columns come from unpacking the stored doubles.

Run it as iforest predict; iforest help predict lists every option.

METHODS

App::Cmd calls these while dispatching the subcommand. Nothing else should.

opt_spec

Returns this command's option specifications, as the list of arrayrefs Getopt::Long::Descriptive expects.

abstract

Returns the one-line summary iforest commands prints beside the command name.

description

Returns the long help text iforest help predict prints under the option list.

validate

Checks the parsed options before anything is read or written, so a mistake costs nothing.

Checks that -i and -m name readable files, that -o may be written, and that -t lies in (0, 1).

Takes the parsed options hashref and the arrayref of remaining arguments. Calls usage_error, which prints the usage and exits, on the first problem it finds, and returns 1 when everything checks out.

execute

Loads the model, scores the input, and writes the result lines to STDOUT or to -o.

Takes the parsed options hashref and the arrayref of remaining arguments, and returns 1.