| BAT::Map::Classify - Map Classification for BAT |
BAT::Map::Classify - Map Classification for BAT
require BAT::Map::Classify; @classes = BAT::Map::Classify::classify(%params); @classes = BAT::Map::Classify->linear(%params); @classes = BAT::Map::Classify->quantile(%params);
Methods for classifying scores in the analysis_scores table.
All functions and methods of BAT::Map::Classify accept the
following parameters:
type - 'quantile' or 'linear' or 'my_quantile' if you write
your own. Not required if you use the method-style
invocation.
session_id - session id for querying the analysis_scores table.
analysis_type - analysis type for querying the analysis_scores table.
num_of_classes - number of classes to produce.
colors - an array ref of colors of each class from lowest
score color to highest score color. Colors are RGB
strings of the form '<red>,<blue>,<green>' where
<red>, <blue>, and <green> are values from 0 to 255.
If you supply less colors than, the number of
classes, classify will apply a gradient between
the colors using Math::Gradient.
classify()
my @classes = BAT::Map::Classify::classify(
type => 'quantile',
session_id => $session_id,
analysis_type => 'Richness',
num_of_classes => 6,
colors => ['0,0,0','255,0,0']
);
linear()
my @classes = BAT::Map::Classify->linear(
session_id => $session_id,
analysis_type => 'Richness',
num_of_classes => 6,
colors => ['0,0,0','255,0,0']
);
Applies a linear classification to the scores for a given session and analysis type.
quantile()
my @classes = BAT::Map::Classify->quantile(
session_id => $session_id,
analysis_type => 'Richness',
num_of_classes => 6,
colors => ['0,0,0','255,0,0']
);
Applies a quantile classification to the scores for a given session and analysis type.
Bryn Honeyman 2005
| BAT::Map::Classify - Map Classification for BAT |