GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AI::CATEGORIZER::LEARNER::GUESSER (3)

.ds Aq ’

NAME

AI::Categorizer::Learner::Guesser - Simple guessing based on class probabilities

CONTENTS

SYNOPSIS



  use AI::Categorizer::Learner::Guesser;
 
  # Here $k is an AI::Categorizer::KnowledgeSet object
 
  my $l = new AI::Categorizer::Learner::Guesser;
  $l->train(knowledge_set => $k);
  $l->save_state(filename);
 
  ... time passes ...
 
  $l = AI::Categorizer::Learner->restore_state(filename);
  my $c = new AI::Categorizer::Collection::Files( path => ... );
  while (my $document = $c->next) {
    my $hypothesis = $l->categorize($document);
    print "Best assigned category: ", $hypothesis->best_category, "\n";
    print "All assigned categories: ", join(, , $hypothesis->categories), "\n";
  }



DESCRIPTION

This implements a simple category guesser that makes assignments based solely on the prior probabilities of categories. For instance, if 5% of the training documents belong to a certain category, then the probability of any test document being assigned to that category is 0.05. This can be useful for providing baseline scores to compare with other more sophisticated algorithms.

See AI::Categorizer for a complete description of the interface.

METHODS

This class inherits from the AI::Categorizer::Learner class, so all of its methods are available.

AUTHOR

Ken Williams (<ken@mathforum.org>)

COPYRIGHT

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.

SEE ALSO

AI::Categorizer(3)
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 AI::CATEGORIZER::LEARNER::GUESSER (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.