Class RuleFactory
java.lang.Object
adaa.analytics.rules.logic.induction.RuleFactory
A factory class for creating instances of rules and rule sets of different types (classification/regression,/survival).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Flag indicating whether voting rules are to be created (always true).protected Knowledge
User's knowledge.protected InductionParameters
Indication parameters.protected int
Rule type (classification/regression/survival). -
Constructor Summary
ConstructorsConstructorDescriptionRuleFactory
(int type, InductionParameters params, Knowledge knowledge) Constructor of guided rules factory. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(IExampleSet set) Creates an empty rule set of appropriate type.create
(CompoundCondition premise, ElementaryCondition consequence) Creates a rule of appropriate type from a premise and a consequence.int
getType()
Gets rule type.
-
Field Details
-
type
protected int typeRule type (classification/regression/survival). -
isVoting
protected boolean isVotingFlag indicating whether voting rules are to be created (always true). -
knowledge
User's knowledge. -
params
Indication parameters.
-
-
Constructor Details
-
RuleFactory
Constructor of guided rules factory. Initializes with arguments members.- Parameters:
type
- Rule type (classification/regression/survival).params
- Induction parameters.knowledge
- User's knowledge.
-
-
Method Details
-
getType
public int getType()Gets rule type.- Returns:
- Rule type.
-
create
Creates a rule of appropriate type from a premise and a consequence.- Parameters:
premise
- Premise (compound condition).consequence
- Consequence (elementary condition).- Returns:
- A newly created rule.
-
create
Creates an empty rule set of appropriate type.- Parameters:
set
- Training set.- Returns:
- Empty rule set.
-