- SEE ALSO
- COPYRIGHT & LICENSE
AI::CBR::Retrieval - retrieve similar cases from a case-base
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(); ...
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.
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.
Use one of these methods to get the similar cases you are interested into.
Returns the most similar candidate. No parameters.
Returns the n most similar candidates. n is the only parameter.
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 AI::CBR for an overview of the framework.
<dobradovic at gmx.de>
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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
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.