weka.classifiers.misc
Class HyperPipes.HyperPipe

java.lang.Object
  extended byweka.classifiers.misc.HyperPipes.HyperPipe
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
HyperPipes

class HyperPipes.HyperPipe
extends java.lang.Object
implements java.io.Serializable

Represents an n-dimensional structure that bounds all instances passed to it (generally all of a given class value).


Field Summary
protected  boolean[][] m_NominalBounds
          Contains the nominal bounds of all instances in the HyperPipe
protected  double[][] m_NumericBounds
          Contains the numeric bounds of all instances in the HyperPipe
 
Constructor Summary
HyperPipes.HyperPipe(Instances instances)
          Creates the HyperPipe as the n-dimensional parallel-piped with minimum volume containing all the points in pointSet.
 
Method Summary
 void addInstance(Instance instance)
          Updates the bounds arrays with a single instance.
 double partialContains(Instance instance)
          Returns the fraction of the dimensions of a given instance with values lying within the corresponding bounds of the HyperPipe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_NumericBounds

protected double[][] m_NumericBounds
Contains the numeric bounds of all instances in the HyperPipe


m_NominalBounds

protected boolean[][] m_NominalBounds
Contains the nominal bounds of all instances in the HyperPipe

Constructor Detail

HyperPipes.HyperPipe

public HyperPipes.HyperPipe(Instances instances)
                     throws java.lang.Exception
Creates the HyperPipe as the n-dimensional parallel-piped with minimum volume containing all the points in pointSet.

Parameters:
instances - all instances belonging to the same class
Throws:
java.lang.Exception - if missing values are found
Method Detail

addInstance

public void addInstance(Instance instance)
                 throws java.lang.Exception
Updates the bounds arrays with a single instance. Missing values are ignored (i.e. they don't change the bounds for that attribute)

Parameters:
instance - the instance
Throws:
java.lang.Exception - if any missing values are encountered

partialContains

public double partialContains(Instance instance)
                       throws java.lang.Exception
Returns the fraction of the dimensions of a given instance with values lying within the corresponding bounds of the HyperPipe.

Parameters:
instance - the instance
Throws:
java.lang.Exception - if any missing values are encountered