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 booleanFlag indicating whether voting rules are to be created (always true).protected KnowledgeUser's knowledge.protected InductionParametersIndication parameters.protected intRule 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.intgetType()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.
-