Class Example

java.lang.Object
  extended by Example
public class Example
extends java.lang.Object

Class for describing attribute-value examples

Version:
1.0
Author:
Fabien Torre

Constructor Summary
Example(ProblemDescription pb, java.lang.String line, java.lang.String name)
          Construction from a string
 
Method Summary
 float getContinuousValue(int attributeId)
           
 int getDiscreteValue(int attributeId)
           
 int getExampleClass()
           
 java.lang.String getExampleId()
           
 double getExampleWeight()
           
 java.lang.Boolean isMissingValue(int attributeId)
           
 void normalizeExampleWeight(double sum)
           
 void setExampleWeight(double w)
           
 java.lang.String toString()
          Transforms an example to String.
 void updateExampleWeight(double coef)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Example

public Example(ProblemDescription pb,
               java.lang.String line,
               java.lang.String name)
Construction from a string

Parameters:
pb - description of the learning problem
line - values of attributes
Method Detail

setExampleWeight

public void setExampleWeight(double w)

getExampleWeight

public double getExampleWeight()

updateExampleWeight

public void updateExampleWeight(double coef)

normalizeExampleWeight

public void normalizeExampleWeight(double sum)

getExampleId

public java.lang.String getExampleId()

getExampleClass

public int getExampleClass()

isMissingValue

public java.lang.Boolean isMissingValue(int attributeId)

getDiscreteValue

public int getDiscreteValue(int attributeId)

getContinuousValue

public float getContinuousValue(int attributeId)

toString

public java.lang.String toString()
Transforms an example to String.

Overrides:
toString in class java.lang.Object