MachineLearning – base class for MachineLearning objects
use base ("MachineLearning");
This module provides a base class for MachineLearning objects.
In addition to the class name passed in automatically when you
use the $class->SUPER::new($args)
syntax, the
constructor takes a reference to a hash containing the following
keys:
InputFieldNames OutputFieldNames
The value corresponding to each of these keys must be a reference to an array of field names. All field names (for input and output fields combined) must be unique. Field names must not contain commas or line-break characters. There must be at least two input field names and at least one output field name.
In addition to a base constructor, this super class provides the following fields and instance methods:
_success _message _input_field_names _output_field_names _parse_data_file() get_success() get_message()
This class also provides the following class methods:
get_mean() get_pop_std_dev() get_samp_std_dev()
In addition to the class name passed in automatically, each of
these class methods takes a reference to an array and returns the
appropriate value (mean, population standard deviation, or sample
standard deviation) for the set of numbers stored in the array.
When calling one of these functions, make sure that the array
contains at least one element and that each element is a number
(for example: 3.9
).
Benjamin Fitch, <blernflerkl@yahoo.com>
Copyright 2009 by Benjamin Fitch
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.