com.rapidminer.operator.learner.igss.hypothesis
Class GSSModel

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.igss.hypothesis.GSSModel
All Implemented Interfaces:
IOObject, Model, ResultObject, Readable, Reportable, LoggingHandler, java.io.Serializable

public class GSSModel
extends PredictionModel

Wrapper class for rules found by the Iterating GSS algorithm. Needed because IGSS rules need to be small in order to keep many in main memory

Author:
Dirk Dach
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.rapidminer.operator.AbstractIOObject
AbstractIOObject.InputStreamProvider
 
Field Summary
protected  double[] confidences
          The confidence values for all predictions.
protected  boolean crisp
          crisp only crisp ...
protected  Hypothesis hypothesis
          The all hypothesis of the model.
protected static Attribute[] regularAttributes
          The regular attributes used by all rules.
 
Constructor Summary
GSSModel(ExampleSet exampleSet, Hypothesis hypothesis, double[] confidences)
          Creates a new GSSModel.
 
Method Summary
 boolean applicable(Example example)
          Returns true if the model is applicable to the current example.
 boolean equals(java.lang.Object o)
          Returns true if the hypothesis contained in the model are equal.
 Hypothesis getHypothesis()
          Returns the hypothesis stored in this model.
 int getPredictionIndex()
          Returns the most probable label index for this model.
 int hashCode()
           
 ExampleSet performPrediction(ExampleSet exampleSet, Attribute predictedLabel)
          Iterates over all examples and applies the model to them.
 java.lang.String toString()
          Returns a String representation of the hypothesis stored in this model.
 
Methods inherited from class com.rapidminer.operator.learner.PredictionModel
apply, checkCompatibility, copyPredictedLabel, createPredictedLabel, createPredictionAttributes, getLabel, removePredictedLabel, removePredictedLabel, supportsConfidences
 
Methods inherited from class com.rapidminer.operator.AbstractModel
getExtension, getFileDescription, getName, getTrainingHeader, isInTargetEncoding, isUpdatable, setParameter, updateModel
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getAnnotations, getResultIcon, log, log, logError, logNote, logWarning, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, initWriting, read, read, read, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.ResultObject
getActions, getResultIcon, toResultString
 
Methods inherited from interface com.rapidminer.operator.IOObject
appendOperatorToHistory, copy, getAnnotations, getLog, getProcessingHistory, getSource, setLoggingHandler, setSource, write
 

Field Detail

hypothesis

protected Hypothesis hypothesis
The all hypothesis of the model.


confidences

protected double[] confidences
The confidence values for all predictions.


regularAttributes

protected static Attribute[] regularAttributes
The regular attributes used by all rules.


crisp

protected boolean crisp
crisp only crisp ...

Constructor Detail

GSSModel

public GSSModel(ExampleSet exampleSet,
                Hypothesis hypothesis,
                double[] confidences)
Creates a new GSSModel.

Method Detail

equals

public boolean equals(java.lang.Object o)
Returns true if the hypothesis contained in the model are equal.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getPredictionIndex

public int getPredictionIndex()
Returns the most probable label index for this model.


performPrediction

public ExampleSet performPrediction(ExampleSet exampleSet,
                                    Attribute predictedLabel)
                             throws OperatorException
Iterates over all examples and applies the model to them.

Specified by:
performPrediction in class PredictionModel
Throws:
OperatorException

applicable

public boolean applicable(Example example)
Returns true if the model is applicable to the current example.


toString

public java.lang.String toString()
Returns a String representation of the hypothesis stored in this model.

Specified by:
toString in interface Readable
Overrides:
toString in class PredictionModel

getHypothesis

public Hypothesis getHypothesis()
Returns the hypothesis stored in this model.



Copyright © 2001-2009 by Rapid-I