Class ClassificationExpertFinder
java.lang.Object
adaa.analytics.rules.logic.induction.AbstractFinder
adaa.analytics.rules.logic.induction.ClassificationFinder
adaa.analytics.rules.logic.induction.ClassificationExpertFinder
- All Implemented Interfaces:
IExpertFinder,AutoCloseable
Class for growing and pruning classification rules with user's knowledge.
-
Field Summary
FieldsFields inherited from class adaa.analytics.rules.logic.induction.ClassificationFinder
precalculatedCoverings, precalculatedCoveringsComplementFields inherited from class adaa.analytics.rules.logic.induction.AbstractFinder
attributeValuesOrder, modifier, params, pool, threadCount -
Constructor Summary
ConstructorsConstructorDescriptionClassificationExpertFinder(InductionParameters params, Knowledge knowledge) Invokes base class constructor and initializes knowledge object. -
Method Summary
Modifier and TypeMethodDescriptionvoidadjust(Rule rule, IExampleSet dataset, Set<Integer> uncoveredPositives) Adjusts expert rule.protected booleancheckCandidate(ElementaryCondition cnd, double classId, double p, double n, double new_p, double P, double uncoveredSize, int ruleOrderNum) Checks if candidate condition fulfills coverage requirement and is not in conflict with forbidden knowledge.intgrow(Rule rule, IExampleSet dataset, Set<Integer> uncoveredPositives) Adds elementary conditions to the classification rule premise until termination conditions are fulfilled.voidsetKnowledge(Knowledge knowledge) Sets users knowledge.Methods inherited from class adaa.analytics.rules.logic.induction.ClassificationFinder
induceCondition, postprocess, preprocess, prune, tryAddConditionMethods inherited from class adaa.analytics.rules.logic.induction.AbstractFinder
addObserver, clearObservers, close, names2attributes, notifyConditionAdded, notifyConditionRemoved, notifyGrowingFinished, notifyGrowingStarted, notifyRuleReady
-
Field Details
-
knowledge
User's knowledge.
-
-
Constructor Details
-
ClassificationExpertFinder
Invokes base class constructor and initializes knowledge object.- Parameters:
params- Induction parameters.knowledge- Expert knowledge.
-
-
Method Details
-
setKnowledge
Sets users knowledge.- Parameters:
knowledge- User's knowledge to be set.
-
adjust
Adjusts expert rule. The procedure specifies value sets of adjustable conditions, i.e., those in the form:- attribute ~= Any,
- attribute ~= SomeSet (non-empty intersection of determined value set with SomeSet is required).
- Specified by:
adjustin interfaceIExpertFinder- Parameters:
rule- Rule to be adjusted.dataset- Training dataset.uncoveredPositives- Set of positive examples not covered by the model.
-
grow
Adds elementary conditions to the classification rule premise until termination conditions are fulfilled. The method uses expert knowledge.- Overrides:
growin classClassificationFinder- Parameters:
rule- Rule to be grown.dataset- Training set.uncoveredPositives- Set of positive examples yet uncovered by the model.- Returns:
- Number of conditions added.
-
checkCandidate
protected boolean checkCandidate(ElementaryCondition cnd, double classId, double p, double n, double new_p, double P, double uncoveredSize, int ruleOrderNum) Checks if candidate condition fulfills coverage requirement and is not in conflict with forbidden knowledge.- Overrides:
checkCandidatein classClassificationFinder- Parameters:
cnd- Candidate condition.classId- Class identifier.- Returns:
-