weka.gui.boundaryvisualizer
Class RemoteBoundaryVisualizerSubTask

java.lang.Object
  extended byweka.gui.boundaryvisualizer.RemoteBoundaryVisualizerSubTask
All Implemented Interfaces:
java.io.Serializable, Task

public class RemoteBoundaryVisualizerSubTask
extends java.lang.Object
implements Task

Class that encapsulates a sub task for distributed boundary visualization. Produces probability distributions for each pixel in one row of the visualization.

Since:
1.0
Version:
$Revision: 1.2 $
Author:
Mark Hall
See Also:
Task, Serialized Form

Field Summary
private  boolean[] m_attsToWeightOn
           
private  Classifier m_classifier
           
private  DataGenerator m_dataGenerator
           
private  double[] m_dist
           
private  double m_maxX
           
private  double m_maxY
           
private  double m_minX
           
private  double m_minY
           
private  int m_numOfSamplesPerGenerator
           
private  int m_numOfSamplesPerRegion
           
private  int m_panelHeight
           
private  int m_panelWidth
           
private  double m_pixHeight
           
private  double m_pixWidth
           
private  Instance m_predInst
           
private  java.util.Random m_random
           
private  RemoteResult m_result
           
private  int m_rowNumber
           
private  double m_samplesBase
           
private  TaskStatusInfo m_status
           
private  Instances m_trainingData
           
private  double[] m_vals
           
private  double[] m_weightingAttsValues
           
private  int m_xAttribute
           
private  int m_yAttribute
           
 
Constructor Summary
RemoteBoundaryVisualizerSubTask()
           
 
Method Summary
private  double[] calculateRegionProbs(int j, int i)
           
 void execute()
          Perform the sub task
private  double getRandomX(int pix)
          Return a random x attribute value contained within the pix'th horizontal pixel
private  double getRandomY(int pix)
          Return a random y attribute value contained within the pix'th vertical pixel
 TaskStatusInfo getTaskStatus()
          Return status information for this sub task
 void setClassifier(Classifier dc)
          Set the classifier to use
 void setDataGenerator(DataGenerator dg)
          Set the density estimator to use
 void setGeneratorSamplesBase(double ksb)
          Set the base for computing the number of samples to obtain from each generator. number of samples = base ^ (# non fixed dimensions)
 void setInstances(Instances i)
          Set the training data
 void setMinMaxX(double minx, double maxx)
          Set the minimum and maximum values of the x axis fixed dimension
 void setMinMaxY(double miny, double maxy)
          Set the minimum and maximum values of the y axis fixed dimension
 void setNumSamplesPerRegion(int num)
          Set the number of points to uniformly sample from a region (fixed dimensions).
 void setPanelHeight(int ph)
          Set the height of the visualization
 void setPanelWidth(int pw)
          Set the width of the visualization
 void setPixHeight(double ph)
          Set the height of a pixel
 void setPixWidth(double pw)
          Set the width of a pixel
 void setRowNumber(int rn)
          Set the row number for this sub task
 void setXAttribute(int xatt)
          Set the x axis fixed dimension
 void setYAttribute(int yatt)
          Set the y axis fixed dimension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_status

private TaskStatusInfo m_status

m_result

private RemoteResult m_result

m_rowNumber

private int m_rowNumber

m_panelHeight

private int m_panelHeight

m_panelWidth

private int m_panelWidth

m_classifier

private Classifier m_classifier

m_dataGenerator

private DataGenerator m_dataGenerator

m_trainingData

private Instances m_trainingData

m_xAttribute

private int m_xAttribute

m_yAttribute

private int m_yAttribute

m_pixHeight

private double m_pixHeight

m_pixWidth

private double m_pixWidth

m_minX

private double m_minX

m_minY

private double m_minY

m_maxX

private double m_maxX

m_maxY

private double m_maxY

m_numOfSamplesPerRegion

private int m_numOfSamplesPerRegion

m_numOfSamplesPerGenerator

private int m_numOfSamplesPerGenerator

m_samplesBase

private double m_samplesBase

m_random

private java.util.Random m_random

m_weightingAttsValues

private double[] m_weightingAttsValues

m_attsToWeightOn

private boolean[] m_attsToWeightOn

m_vals

private double[] m_vals

m_dist

private double[] m_dist

m_predInst

private Instance m_predInst
Constructor Detail

RemoteBoundaryVisualizerSubTask

public RemoteBoundaryVisualizerSubTask()
Method Detail

setRowNumber

public void setRowNumber(int rn)
Set the row number for this sub task

Parameters:
rn - the row number

setPanelWidth

public void setPanelWidth(int pw)
Set the width of the visualization


setPanelHeight

public void setPanelHeight(int ph)
Set the height of the visualization

Parameters:
ph - the height

setPixHeight

public void setPixHeight(double ph)
Set the height of a pixel

Parameters:
ph - the height of a pixel

setPixWidth

public void setPixWidth(double pw)
Set the width of a pixel

Parameters:
pw - the width of a pixel

setClassifier

public void setClassifier(Classifier dc)
Set the classifier to use

Parameters:
dc - the classifier

setDataGenerator

public void setDataGenerator(DataGenerator dg)
Set the density estimator to use

Parameters:
dg - the density estimator

setInstances

public void setInstances(Instances i)
Set the training data

Parameters:
i - the training data

setMinMaxX

public void setMinMaxX(double minx,
                       double maxx)
Set the minimum and maximum values of the x axis fixed dimension

Parameters:
minx - a double value
maxx - a double value

setMinMaxY

public void setMinMaxY(double miny,
                       double maxy)
Set the minimum and maximum values of the y axis fixed dimension

Parameters:
miny - a double value
maxy - a double value

setXAttribute

public void setXAttribute(int xatt)
Set the x axis fixed dimension

Parameters:
xatt - an int value

setYAttribute

public void setYAttribute(int yatt)
Set the y axis fixed dimension

Parameters:
yatt - an int value

setNumSamplesPerRegion

public void setNumSamplesPerRegion(int num)
Set the number of points to uniformly sample from a region (fixed dimensions).

Parameters:
num - an int value

setGeneratorSamplesBase

public void setGeneratorSamplesBase(double ksb)
Set the base for computing the number of samples to obtain from each generator. number of samples = base ^ (# non fixed dimensions)

Parameters:
ksb - a double value

execute

public void execute()
Perform the sub task

Specified by:
execute in interface Task

calculateRegionProbs

private double[] calculateRegionProbs(int j,
                                      int i)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getRandomX

private double getRandomX(int pix)
Return a random x attribute value contained within the pix'th horizontal pixel

Parameters:
pix - the horizontal pixel number
Returns:
a value in attribute space

getRandomY

private double getRandomY(int pix)
Return a random y attribute value contained within the pix'th vertical pixel

Parameters:
pix - the vertical pixel number
Returns:
a value in attribute space

getTaskStatus

public TaskStatusInfo getTaskStatus()
Return status information for this sub task

Specified by:
getTaskStatus in interface Task
Returns:
a TaskStatusInfo value