edu.cmu.minorthird.classify.transform
Class MaskedInstance

java.lang.Object
  extended by edu.cmu.minorthird.classify.AbstractInstance
      extended by edu.cmu.minorthird.classify.transform.MaskedInstance
All Implemented Interfaces:
HasSubpopulationId, Instance, Visible

public class MaskedInstance
extends AbstractInstance

Author:
Edoardo Airoldi Date: Dec 5, 2003

Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.AbstractInstance
source, subpopulationId
 
Constructor Summary
MaskedInstance(Instance instance, java.util.Set<Feature> availableFeatures)
           
MaskedInstance(Instance instance, java.util.SortedMap<Feature,?> availableFeatures)
           
 
Method Summary
 java.util.Iterator<Feature> binaryFeatureIterator()
          Return an iterator over binary features
 java.util.Iterator<Feature> featureIterator()
          Return an iterator over all available features
 java.lang.Object getSource()
          Return the underlying object being represented.
 java.lang.String getSubpopulationId()
          Return the subpopulation from which the source was drawn.
 double getWeight(Feature f)
          Get the weight assigned to a feature in this instance.
 java.util.Iterator<Feature> numericFeatureIterator()
          Return an iterator over numeric features
 int numFeatures()
          Return the number of all the features
 Viewer toGUI()
          Retrieve Viewer for the instance
 java.lang.String toString()
          Debugging view of an instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MaskedInstance

public MaskedInstance(Instance instance,
                      java.util.Set<Feature> availableFeatures)

MaskedInstance

public MaskedInstance(Instance instance,
                      java.util.SortedMap<Feature,?> availableFeatures)
Method Detail

getSource

public final java.lang.Object getSource()
Description copied from class: AbstractInstance
Return the underlying object being represented.

Specified by:
getSource in interface Instance
Overrides:
getSource in class AbstractInstance

getSubpopulationId

public final java.lang.String getSubpopulationId()
Description copied from class: AbstractInstance
Return the subpopulation from which the source was drawn.

Specified by:
getSubpopulationId in interface HasSubpopulationId
Specified by:
getSubpopulationId in interface Instance
Overrides:
getSubpopulationId in class AbstractInstance

toGUI

public Viewer toGUI()
Description copied from class: AbstractInstance
Retrieve Viewer for the instance

Specified by:
toGUI in interface Visible
Overrides:
toGUI in class AbstractInstance

getWeight

public double getWeight(Feature f)
Description copied from interface: Instance
Get the weight assigned to a feature in this instance.


featureIterator

public java.util.Iterator<Feature> featureIterator()
Return an iterator over all available features


numericFeatureIterator

public final java.util.Iterator<Feature> numericFeatureIterator()
Return an iterator over numeric features


binaryFeatureIterator

public final java.util.Iterator<Feature> binaryFeatureIterator()
Return an iterator over binary features


numFeatures

public final int numFeatures()
Description copied from interface: Instance
Return the number of all the features


toString

public java.lang.String toString()
Description copied from class: AbstractInstance
Debugging view of an instance.

Overrides:
toString in class AbstractInstance