com.rapidminer.operator.learner.bayes
Class DistributionModel

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.operator.AbstractModel
              extended by com.rapidminer.operator.learner.PredictionModel
                  extended by com.rapidminer.operator.learner.bayes.DistributionModel
All Implemented Interfaces:
IOObject, Model, ResultObject, Saveable, Readable, Reportable, LoggingHandler, java.io.Serializable
Direct Known Subclasses:
KernelDistributionModel, SimpleDistributionModel

public abstract class DistributionModel
extends PredictionModel

DistributionModel is a model for learners which estimate distributions of attribute values from example sets like NaiveBayes. Predictions are calculated as product of the conditional probabilities for all attributes times the class probability. The basic learning concept is to simply count occurances of classes and attribute values. This means no propabilities are calculated during the learning step. This is only done before output. Optionally, this calculation can apply a Laplace correction which means in particular that zero probabilities are avoided which would hide information in distributions of other attributes.

Author:
Tobias Malbrecht
See Also:
Serialized Form

Constructor Summary
DistributionModel(ExampleSet exampleSet)
           
 
Method Summary
abstract  java.lang.String[] getAttributeNames()
           
abstract  java.util.Collection<java.lang.Integer> getClassIndices()
           
abstract  java.lang.String getClassName(int index)
           
abstract  Distribution getDistribution(int classIndex, int attributeIndex)
           
abstract  double getLowerBound(int attributeIndex)
           
abstract  int getNumberOfAttributes()
           
abstract  int getNumberOfClasses()
           
abstract  double getUpperBound(int attributeIndex)
           
abstract  boolean isDiscrete(int attributeIndex)
           
abstract  ExampleSet performPrediction(ExampleSet exampleSet, Attribute predictedLabel)
          Subclasses should iterate through the given example set and set the prediction for each example.
 
Methods inherited from class com.rapidminer.operator.learner.PredictionModel
apply, checkCompatibility, copyPredictedLabel, createPredictedLabel, getLabel, removePredictedLabel, removePredictedLabel, toString
 
Methods inherited from class com.rapidminer.operator.AbstractModel
getExtension, getFileDescription, getName, getResultIcon, getTrainingHeader, isUpdatable, setParameter, updateModel
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getVisualizationComponent, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.ResultObject
getActions, getVisualizationComponent, toResultString
 
Methods inherited from interface com.rapidminer.operator.IOObject
copy, getLog, getSource, setLoggingHandler, setSource, write
 
Methods inherited from interface com.rapidminer.operator.Saveable
isSavable, save
 

Constructor Detail

DistributionModel

public DistributionModel(ExampleSet exampleSet)
Method Detail

getAttributeNames

public abstract java.lang.String[] getAttributeNames()

getNumberOfAttributes

public abstract int getNumberOfAttributes()

getLowerBound

public abstract double getLowerBound(int attributeIndex)

getUpperBound

public abstract double getUpperBound(int attributeIndex)

isDiscrete

public abstract boolean isDiscrete(int attributeIndex)

getClassIndices

public abstract java.util.Collection<java.lang.Integer> getClassIndices()

getNumberOfClasses

public abstract int getNumberOfClasses()

getClassName

public abstract java.lang.String getClassName(int index)

getDistribution

public abstract Distribution getDistribution(int classIndex,
                                             int attributeIndex)

performPrediction

public abstract ExampleSet performPrediction(ExampleSet exampleSet,
                                             Attribute predictedLabel)
Description copied from class: PredictionModel
Subclasses should iterate through the given example set and set the prediction for each example. The given predicted label attribute was already be added to the example set and should be used to set the predicted values.

Specified by:
performPrediction in class PredictionModel


Copyright © 2001-2009 by Rapid-I