Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    AI::MaxEntropy 0.20

    Download button

    No screenshots available
    Downloads: 413  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.1/5)
    7 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Laye Suen | More programs
    MIT/X Consortium Lic... / FREE
    July 22nd, 2008, 01:52 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    AI::MaxEntropy description

    AI::MaxEntropy is a Perl extension for learning Maximum Entropy Models.

    AI::MaxEntropy is a Perl extension for learning Maximum Entropy Models.

    SYNOPSIS

    use AI::MaxEntropy;

    # create a maximum entropy learner
    my $me = AI::MaxEntropy->new;

    # the learner see 2 red round smooth apples
    $me->see(['round', 'smooth', 'red'] => 'apple' => 2);

    # the learner see 3 yellow long smooth bananas
    $me->see(['long', 'smooth', 'yellow'] => 'banana' => 3);

    # and more

    # samples needn't have the same numbers of active features
    $me->see(['rough', 'big'] => 'pomelo');

    # the order of active features is not concerned, too
    $me->see(['big', 'rough'] => 'pomelo');

    # ...

    # and, let it learn
    my $model = $me->learn;

    # then, we can make predictions on unseen data

    # ask what a red thing is most likely to be
    print $model->predict(['red'])."n";
    # the answer is apple, because all red things the learner have ever seen
    # are apples

    # ask what a smooth thing is most likely to be
    print $model->predict(['smooth'])."n";
    # the answer is banana, because the learner have seen more smooth bananas
    # (weighted 3) than smooth apples (weighted 2)

    # ask what a red, long thing is most likely to be
    print $model->predict(['red', 'long'])."n";
    # the answer is banana, because the learner have seen more long bananas
    # (weighted 3) than red apples (weighted 2)

    # print out scores of all possible answers to the feature round and red
    for ($model->all_labels) {
    my $s = $model->score(['round', 'red'] => $_);
    print "$_: $sn";
    }

    # save the model
    $model->save('model_file');

    # load the model
    $model->load('model_file');

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Maximum Entropy | MEM learning | Perl module | Maximum | Entropy | learning

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM