BAT::Map::Classify - Map Classification for BAT


Back to top ^


NAME

BAT::Map::Classify - Map Classification for BAT

Back to top ^


SYNOPSIS

  require BAT::Map::Classify;
  @classes = BAT::Map::Classify::classify(%params);
  @classes = BAT::Map::Classify->linear(%params);
  @classes = BAT::Map::Classify->quantile(%params);

Back to top ^


DESCRIPTION

Methods for classifying scores in the analysis_scores table.

Back to top ^


PARAMETERS

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.

Back to top ^


FUNCTIONS

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']
                );

Back to top ^


METHODS

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.

Back to top ^


SEE ALSO

BAT::Map, Math::Gradient

Back to top ^


AUTHOR

  Bryn Honeyman 2005

Back to top ^

 BAT::Map::Classify - Map Classification for BAT