adjustCBRRulesForClassification
public static void adjustCBRRulesForClassification(RulesContainer rulesContainer,
PairSimilarity[] similarityFunctions,
Attribute[] testAttributes)
Takes rules container with decision rules induced by means of DRSA-CBR approach
(with SimilarityCondition
conditions) and adjust these rules
so they can be used to classify new examples from test memory container with given attributes.
This method tries to match learning attributes (from the similarity table
for which decision rules have been generated) and test attributes (from test memory container
to which decision rules will be applied). It assumes correspondence between consecutive active and condition
learning/test attributes. Thus, the number of active and condition attributes has to be the same for both
Attribute[]
tables.
- Parameters:
rulesContainer
- container with rules to adjust so they can be used to classify new examples
from test memory container with given attributes
similarityFunctions
- array with similarity functions for attributes from test memory container
(containing new examples to be tested)
testAttributes
- attributes from test memory container to which rules from given rules container will be applied
- Throws:
InvalidValueException
- when the number of active and condition attributes used to classify new examples
is different than the number of active and condition attributes used to generate rules
(i.e. present in the learning similarity table)
InvalidTypeException
- when types of any corresponding test and learning attributes do not match