The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

AI::CBR::Retrieval - retrieve similar cases from a case-base

SYNOPSIS

Retrieve solutions for a case from a case-base

    use AI::CBR::Retrieval;

    my $r = AI::CBR::Retrieval->new($case, \@case_base);
    $r->compute_sims();
    my $solution = $r->most_similar_case();
    ...

METHODS

new

Creates a new object for retrieval. Pass your case specification object as the first parameter. Pass the reference of an array of hash references as the case-base. The hashes should contain all attributes of the specification. These will be called candidate cases internally.

compute_sims

If the case-specification is complete, you may call this method to compute the similarities of all candidate cases to this specification. After this step, each candidate of the case-base will have an additional attribute _sim indicating the similarity.

RETRIEVAL METHODS

Use one of these methods to get the similar cases you are interested into.

most_similar_candidate

Returns the most similar candidate. No parameters.

n_most_similar_candidates

Returns the n most similar candidates. n is the only parameter.

first_confirmed_candidate

Returns the first candidate that is confirmed by a later candidate. Confirmation is based on an attribute value whose key is passed as parameter. In case there is no confirmed candidate at all, simply returns the most similar one.

SEE ALSO

See AI::CBR for an overview of the framework.

AUTHOR

Darko Obradovic, <dobradovic at gmx.de>

BUGS

Please report any bugs or feature requests to bug-ai-cbr at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AI-CBR. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc AI::CBR::Retrieval

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009 Darko Obradovic, all rights reserved.

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