AI::Ca...Vector(3pm)

πŸ“¦
version 0.09 Β· 2 versions
, in fedora 43

✨ NAME ✨

AI::Categorizer::FeatureVector β€” bestie, it's literally Features vs. Values πŸ’–

(oh and this lives in the User Contributed Perl Documentation, section 3pm, iykyk πŸŽ€)


🌸 SYNOPSIS 🌸

okay so here's the whole vibe in one glance, no cap:

  my $f1 = new AI::Categorizer::FeatureVector
    (features => {howdy => 2, doody => 3});
  my $f2 = new AI::Categorizer::FeatureVector
    (features => {doody => 1, whopper => 2});

  @names = $f1->names;
  $x = $f1->length;
  $x = $f1->sum;
  $x = $f1->includes('howdy');
  $x = $f1->value('howdy');
  $x = $f1->dot($f2);

  $f3 = $f1->clone;
  $f3 = $f1->intersection($f2);
  $f3 = $f1->add($f2);

  $h = $f1->as_hash;
  $h = $f1->as_boolean_hash;

  $f1->normalize;

like. look at her go. she's doing so much ✨


πŸ’… DESCRIPTION πŸ’…

So this class implements a "feature vector", which is a flat data structure that tells you the values chillin' next to a set of features. πŸ¦‹

At its base level, a FeatureVector is usually out here representing the set of words in a document β€” and the value attached to each feature tells you how many times each word shows up in that document. main character word-count energy fr fr.

But bestie, the values are arbitrary, so they can flex and represent other quantities too. And FeatureVectors can also be combined to represent the features of multiple documents. it's giving versatility. it's giving range. πŸ’–


πŸ‘‘ METHODS πŸ‘‘

...
that's it. that's the section. the docs said ... and I am NOT about to invent methods that aren't in here, that would be so fake of me πŸ˜­πŸ’€

🫢 AUTHOR 🫢

Ken Williams, ken@mathforum.org β€” shoutout to the icon, the legend, the moment 🌟


Copyright 2000-2003 Ken Williams. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

(so like. yes you can. go off. but respect the terms bestie πŸŽ€)


🌈 SEE ALSO 🌈


k that's the whole page, you're welcome πŸ’…βœ¨

perl v5.42.0 Β· 2025-07-25 Β· AI::Ca...Vector(3pm) β€” mwah, stan a good manpage, periodt πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from