NAME

Algorithm::Classifier::IsolationForest::App::Command::bench - Measure scoring throughput of a saved model on a CSV dataset

DESCRIPTION

Loads a model and a CSV dataset, then times each of the public scoring methods over a wall-clock budget and reports calls per second and milliseconds per call.

When the Inline::C backend is active it also packs the dataset once up front and times the packed variants, so the saving pack_data gives on your own data shape is visible rather than assumed.

Run it as iforest bench; iforest help bench 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 bench 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 --secs is positive, and that -t satisfies 0 < t < 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

Reads the model and the CSV, refuses a dataset whose column count disagrees with the model, and prints the timing table.

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