public class RuleClassifier extends AbstractClassifier
Learning Decision RuleClassifications from Data Streams, IJCAI 2011, J. Gama, P. Kosina
Parameters:
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
RuleClassifier() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkBestAttrib(double n,
AutoExpandVector<AttributeClassObserver> observerss,
DoubleVector observedClassDistribution) |
double |
computeAnomalySupervised(RuleClassification rl,
int ruleIndex,
weka.core.Instance inst) |
double |
computeAnomalyUnsupervised(RuleClassification rl,
int ruleIndex,
weka.core.Instance inst) |
double |
ComputeHoeffdingBound(double range,
double confidence,
double n) |
double |
computeMean(double sum,
int size) |
double |
computeProbability(double mean,
double sd,
double value) |
double |
computeSD(double squaredVal,
double val,
int size) |
void |
createRule(weka.core.Instance inst) |
double |
entropy(DoubleVector ValorDistClassE) |
void |
expandeRule(RuleClassification rl,
weka.core.Instance inst,
int ruleIndex) |
void |
findBestValEntropy(BinaryTreeNumericAttributeClassObserver.Node node,
DoubleVector classCountL,
DoubleVector classCountR,
boolean status,
double minEntropy,
DoubleVector parentCCLeft) |
void |
findBestValEntropyNominalAtt(AutoExpandVector<DoubleVector> attrib,
int attNumValues) |
protected double[] |
firstHit(weka.core.Instance inst) |
protected double[] |
getBestSecondBestEntropy(DoubleVector entropy) |
int |
getCountNominalAttrib(ArrayList<Predicates> predicateSet) |
void |
getModelDescription(StringBuilder out,
int indent)
Returns a string representation of the model.
|
void |
getModelDescriptionNoAnomalyDetection(StringBuilder out,
int indent) |
protected Measurement[] |
getModelMeasurementsImpl()
Gets the current measurements of this classifier.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
String |
getPurposeString()
Gets the purpose of this object
|
protected double |
getRuleMajorityClassIndex(RuleClassification r) |
double[] |
getVotesForInstance(weka.core.Instance inst)
Predicts the class memberships for a given instance.
|
double |
getWeightSeen() |
void |
initializeRuleStatistics(RuleClassification rl,
Predicates pred,
weka.core.Instance inst) |
boolean |
isRandomizable()
Gets whether this classifier needs a random seed.
|
void |
mainFindBestValEntropy(BinaryTreeNumericAttributeClassObserver.Node root) |
void |
manageMemory(int currentByteSize,
int maxByteSize) |
protected AttributeClassObserver |
newNominalClassObserver() |
protected AttributeClassObserver |
newNumericClassObserver() |
protected AttributeClassObserver |
newNumericClassObserver2() |
protected double[] |
oberversDistribProb(weka.core.Instance inst,
DoubleVector classDistrib) |
void |
printAnomaliesSupervised(StringBuilder out,
int indent) |
void |
printAnomaliesUnsupervised(StringBuilder out,
int indent) |
void |
resetLearningImpl()
Resets this classifier.
|
protected BigDecimal |
round(double val) |
void |
theBestAttributes(weka.core.Instance instance,
AutoExpandVector<AttributeClassObserver> observersParameter) |
void |
trainOnInstanceImpl(weka.core.Instance inst)
Trains this classifier incrementally using the given instance.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
void |
updateRuleAttribStatistics(weka.core.Instance inst,
RuleClassification rl,
int ruleIndex) |
protected double[] |
weightedMax(weka.core.Instance inst) |
protected double[] |
weightedSum(weka.core.Instance inst) |
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModelContext, getModelMeasurements, getNominalValueString, getSubClassifiers, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
measureByteSize
protected weka.core.Instance instance
protected AutoExpandVector<AttributeClassObserver> attributeObservers
protected AutoExpandVector<AttributeClassObserver> attributeObserversGauss
protected DoubleVector observedClassDistribution
protected DoubleVector saveBestEntropy
protected DoubleVector saveBestEntropyNominalAttrib
protected DoubleVector ruleClassIndex
protected DoubleVector saveBestGlobalEntropy
protected ArrayList<RuleClassification> ruleSet
protected ArrayList<RuleClassification> ruleSetAnomalies
protected ArrayList<ArrayList<ArrayList<Double>>> ruleAttribAnomalyStatistics
protected ArrayList<RuleClassification> ruleSetAnomaliesSupervised
protected ArrayList<ArrayList<ArrayList<Double>>> ruleAttribAnomalyStatisticsSupervised
public FloatOption PminOption
public FloatOption splitConfidenceOption
public FloatOption tieThresholdOption
public FloatOption anomalyProbabilityThresholdOption
public FloatOption probabilityThresholdOption
public IntOption anomalyNumInstThresholdOption
public IntOption gracePeriodOption
public MultiChoiceOption predictionFunctionOption
public FlagOption orderedRulesOption
public FlagOption anomalyDetectionOption
public FlagOption Supervised
public FlagOption Unsupervised
public String getPurposeString()
OptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public double[] getVotesForInstance(weka.core.Instance inst)
Classifier
inst
- the instance to be classifiedprotected Measurement[] getModelMeasurementsImpl()
AbstractClassifier
getModelMeasurementsImpl
in class AbstractClassifier
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
public double getWeightSeen()
public void trainOnInstanceImpl(weka.core.Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to be used for trainingpublic void getModelDescription(StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class AbstractClassifier
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic void printAnomaliesUnsupervised(StringBuilder out, int indent)
public void printAnomaliesSupervised(StringBuilder out, int indent)
public void getModelDescriptionNoAnomalyDetection(StringBuilder out, int indent)
public boolean isRandomizable()
Classifier
public int getCountNominalAttrib(ArrayList<Predicates> predicateSet)
protected BigDecimal round(double val)
public void initializeRuleStatistics(RuleClassification rl, Predicates pred, weka.core.Instance inst)
public void updateRuleAttribStatistics(weka.core.Instance inst, RuleClassification rl, int ruleIndex)
public double computeAnomalyUnsupervised(RuleClassification rl, int ruleIndex, weka.core.Instance inst)
public double computeAnomalySupervised(RuleClassification rl, int ruleIndex, weka.core.Instance inst)
public double computeMean(double sum, int size)
public double computeSD(double squaredVal, double val, int size)
public double computeProbability(double mean, double sd, double value)
public void createRule(weka.core.Instance inst)
public void expandeRule(RuleClassification rl, weka.core.Instance inst, int ruleIndex)
public void theBestAttributes(weka.core.Instance instance, AutoExpandVector<AttributeClassObserver> observersParameter)
public double entropy(DoubleVector ValorDistClassE)
public void findBestValEntropy(BinaryTreeNumericAttributeClassObserver.Node node, DoubleVector classCountL, DoubleVector classCountR, boolean status, double minEntropy, DoubleVector parentCCLeft)
public void mainFindBestValEntropy(BinaryTreeNumericAttributeClassObserver.Node root)
public void findBestValEntropyNominalAtt(AutoExpandVector<DoubleVector> attrib, int attNumValues)
public double ComputeHoeffdingBound(double range, double confidence, double n)
public boolean checkBestAttrib(double n, AutoExpandVector<AttributeClassObserver> observerss, DoubleVector observedClassDistribution)
protected double[] getBestSecondBestEntropy(DoubleVector entropy)
protected double getRuleMajorityClassIndex(RuleClassification r)
protected double[] oberversDistribProb(weka.core.Instance inst, DoubleVector classDistrib)
protected double[] firstHit(weka.core.Instance inst)
protected double[] weightedMax(weka.core.Instance inst)
protected double[] weightedSum(weka.core.Instance inst)
protected AttributeClassObserver newNominalClassObserver()
protected AttributeClassObserver newNumericClassObserver()
protected AttributeClassObserver newNumericClassObserver2()
public void manageMemory(int currentByteSize, int maxByteSize)
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.