NAME
Algorithm::Classifier::IsolationForest::App::Command::csv2plot - Plot the CSV data used with iforest via gnuplot
DESCRIPTION
Renders a CSV through gnuplot. The plot types are
- auto :: 2heat for two columns, 3range for four or more
- 2heat :: columns 1 and 2 as a scatter plot over a heat map
- 3range :: columns 1 and 2 for x/y, the second-to-last column for the
score gradient
- 3binary :: columns 1 and 2 for x/y, the last column for the
normal/abnormal split
3range and 3binary expect the output of iforest predict -d. For data with more than two features, columns 1 and 2 are always the axes.
Run it as iforest csv2plot; iforest help csv2plot 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 csv2plot prints under the option list.
validate
Checks the parsed options before anything is read or written, so a mistake costs nothing.
Checks that -i is a readable file, that -o does not already exist unless -w was given, and that -p names one of the plot types above.
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
Writes the gnuplot input and runs it, leaving the image at -o.
Takes the parsed options hashref and the arrayref of remaining arguments, and returns 1.