1AI::Categorizer::FeaturUesVeerctCoorn(t3r)ibuted Perl DoAcIu:m:eCnattaetgioornizer::FeatureVector(3)
2
3
4

NAME

6       AI::Categorizer::FeatureVector - Features vs. Values
7

SYNOPSIS

9         my $f1 = new AI::Categorizer::FeatureVector
10           (features => {howdy => 2, doody => 3});
11         my $f2 = new AI::Categorizer::FeatureVector
12           (features => {doody => 1, whopper => 2});
13
14         @names = $f1->names;
15         $x = $f1->length;
16         $x = $f1->sum;
17         $x = $f1->includes('howdy');
18         $x = $f1->value('howdy');
19         $x = $f1->dot($f2);
20
21         $f3 = $f1->clone;
22         $f3 = $f1->intersection($f2);
23         $f3 = $f1->add($f2);
24
25         $h = $f1->as_hash;
26         $h = $f1->as_boolean_hash;
27
28         $f1->normalize;
29

DESCRIPTION

31       This class implements a "feature vector", which is a flat data
32       structure indicating the values associated with a set of features.  At
33       its base level, a FeatureVector usually represents the set of words in
34       a document, with the value for each feature indicating the number of
35       times each word appears in the document.  However, the values are
36       arbitrary so they can represent other quantities as well, and
37       FeatureVectors may also be combined to represent the features of
38       multiple documents.
39

METHODS

41       ...
42

AUTHOR

44       Ken Williams, ken@mathforum.org
45
47       Copyright 2000-2003 Ken Williams.  All rights reserved.
48
49       This library is free software; you can redistribute it and/or modify it
50       under the same terms as Perl itself.
51

SEE ALSO

53       AI::Categorizer(3), Storable(3)
54
55
56
57perl v5.28.0                      2018-07-14 AI::Categorizer::FeatureVector(3)
Impressum