# computes the cosine similarity
my $r = $cs->similarity( 'label1', 'label2' );
# the result object
my $cosine = $r->cosine;
my $radian = $r->radian;
my $degree = $r->degree;
my ($label1, $label2) = $r->labels;
# computes all the cosine similarity between 'label1' and the others.
my @all = $cs->all_for_label('label1');
# computes all, and returns the best
my ($best_label, $r) = $cs->best_for_label('label2');
# computes all, and returns the worst
my ($worst_label, $r) = $cs->worst_for_label('label2');
DESCRIPTION
Compute the cosine similarities between a set of vectors.
$class->new( %opts )
If all the feature vectors are normed then the computation of the cosine
becomes just the dot product of the vectors. In this case, specify the
option normed => 1, the performance will be greatly improved.