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.
_sim
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.
Darko Obradovic, <dobradovic at gmx.de>
<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.
bug-ai-cbr at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc AI::CBR::Retrieval
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=AI-CBR
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/AI-CBR
CPAN Ratings
http://cpanratings.perl.org/d/AI-CBR
Search CPAN
http://search.cpan.org/dist/AI-CBR
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.
To install AI::CBR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AI::CBR
CPAN shell
perl -MCPAN -e shell install AI::CBR
For more information on module installation, please visit the detailed CPAN module installation guide.