@KFStep(name="BoundaryPlotter", category="Visualization", toolTipText="Visualize class/cluster decision boundaries in a 2D plot", iconPath="weka/gui/knowledgeflow/icons/DefaultDataVisualizer.gif") public class BoundaryPlotter extends BaseStep implements DataCollector
| Modifier and Type | Class and Description |
|---|---|
static interface |
BoundaryPlotter.RenderingUpdateListener
Interface for something that wants to be informed of rendering progress
updates
|
| Modifier and Type | Field and Description |
|---|---|
static java.awt.Color[] |
DEFAULT_COLORS
default colours for classes
|
| Constructor and Description |
|---|
BoundaryPlotter()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBaseForSampling()
Get the base for sampling
|
int |
getComputeMaxRowsInParallel()
Get the maximum number of threads to use when computing image rows
|
java.awt.image.BufferedImage |
getCurrentImage()
Get the currently rendering image
|
java.lang.String |
getCustomEditorForStep()
Return the fully qualified name of a custom editor component (JComponent)
to use for editing the properties of the step.
|
int |
getImageHeight()
Get the image height (in pixels)
|
java.util.Map<java.lang.String,java.awt.image.BufferedImage> |
getImages()
Get the completed images
|
int |
getImageWidth()
Get the image width (in pixels)
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.util.Map<java.lang.String,java.lang.String> |
getInteractiveViewers()
When running in a graphical execution environment a step can make one or
more popup Viewer components available.
|
java.lang.String |
getKernelBandwidth()
Get the kernel bandwidth
|
java.lang.String |
getNumLocationsPerPixel()
Get the number of locations/samples per pixel
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
boolean |
getPlotTrainingData()
Get whether to superimpose the training data points on the plot or not
|
java.lang.String |
getXAttName()
Get the name/index of the X axis attribute
|
java.lang.String |
getYAttName()
Get the name/index of the Y axis attribute
|
void |
plotTrainingData(Instances trainingData) |
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
void |
removeRenderingListener(BoundaryPlotter.RenderingUpdateListener l)
Remove the rendering update listener
|
void |
restoreData(java.lang.Object data)
Set a map of images.
|
java.lang.Object |
retrieveData()
Get the map of completed images
|
void |
setBaseForSampling(java.lang.String base)
Set the base for sampling
|
void |
setComputeMaxRowsInParallel(int max)
Set the maximum number of threads to use when computing image rows
|
void |
setImageHeight(int height)
Set the image height (in pixels)
|
void |
setImageWidth(int width)
Set the image width (in pixels)
|
void |
setKernelBandwidth(java.lang.String band)
Set the kernel bandwidth
|
void |
setNumLocationsPerPixel(java.lang.String num)
Set the number of locations/samples per pixel
|
void |
setPlotTrainingData(boolean plot)
Set whether to superimpose the training data points on the plot or not
|
void |
setRenderingListener(BoundaryPlotter.RenderingUpdateListener l)
Set a listener to receive rendering updates
|
void |
setXAttName(java.lang.String xAttName)
Set the name/index of the X axis attribute
|
void |
setYAttName(java.lang.String attName)
Set the name/index of the Y axis attribute
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getDefaultSettings, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, start, stoppublic static final java.awt.Color[] DEFAULT_COLORS
@ProgrammaticProperty @OptionMetadata(displayName="X attribute", description="Attribute to visualize on the x-axis", displayOrder=1) public void setXAttName(java.lang.String xAttName)
xAttName - name/index of the X axis attributepublic java.lang.String getXAttName()
@ProgrammaticProperty @OptionMetadata(displayName="Y attribute", description="Attribute to visualize on the y-axis", displayOrder=2) public void setYAttName(java.lang.String attName)
attName - name/index of the Y axis attributepublic java.lang.String getYAttName()
@OptionMetadata(displayName="Base for sampling (r)", description="The base for sampling", displayOrder=3) public void setBaseForSampling(java.lang.String base)
base - the base to usepublic java.lang.String getBaseForSampling()
@OptionMetadata(displayName="Num. locations per pixel", description="Number of locations per pixel", displayOrder=4) public void setNumLocationsPerPixel(java.lang.String num)
num - the number of samples to usepublic java.lang.String getNumLocationsPerPixel()
@OptionMetadata(displayName="Kernel bandwidth (k)", description="Kernel bandwidth", displayOrder=4) public void setKernelBandwidth(java.lang.String band)
band - the bandwidthpublic java.lang.String getKernelBandwidth()
@OptionMetadata(displayName="Image width (pixels)", description="Image width in pixels", displayOrder=5) public void setImageWidth(int width)
width - the width to usepublic int getImageWidth()
@OptionMetadata(displayName="Image height (pixels)", description="Image height in pixels", displayOrder=6) public void setImageHeight(int height)
height - the height to usepublic int getImageHeight()
@OptionMetadata(displayName="Max image rows to compute in parallel", description="Use this many tasks for computing rows of the image", displayOrder=7) public void setComputeMaxRowsInParallel(int max)
max - maximum number of rows to compute in parallelpublic int getComputeMaxRowsInParallel()
@OptionMetadata(displayName="Plot training points", description="Superimpose the training data over the top of the plot", displayOrder=8) public void setPlotTrainingData(boolean plot)
plot - true to plot the training datapublic boolean getPlotTrainingData()
public void stepInit()
throws WekaException
stepInit in interface BaseStepExtenderstepInit in interface StepWekaException - if a problem occurs during initializationpublic void processIncoming(Data data) throws WekaException
BaseStepprocessIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the payload to processWekaException - if a problem occurspublic void plotTrainingData(Instances trainingData)
public java.util.List<java.lang.String> getIncomingConnectionTypes()
getIncomingConnectionTypes in interface BaseStepExtendergetIncomingConnectionTypes in interface Steppublic java.util.List<java.lang.String> getOutgoingConnectionTypes()
getOutgoingConnectionTypes in interface BaseStepExtendergetOutgoingConnectionTypes in interface Steppublic java.util.Map<java.lang.String,java.awt.image.BufferedImage> getImages()
public java.awt.image.BufferedImage getCurrentImage()
public void setRenderingListener(BoundaryPlotter.RenderingUpdateListener l)
l - the RenderingUpdateListener to addpublic void removeRenderingListener(BoundaryPlotter.RenderingUpdateListener l)
l - the RenderingUpdateListener to removepublic java.util.Map<java.lang.String,java.lang.String> getInteractiveViewers()
getInteractiveViewers in interface StepgetInteractiveViewers in class BaseSteppublic java.lang.String getCustomEditorForStep()
getCustomEditorForStep in interface StepgetCustomEditorForStep in class BaseSteppublic java.lang.Object retrieveData()
retrieveData in interface DataCollectorpublic void restoreData(java.lang.Object data)
throws WekaException
restoreData in interface DataCollectordata - the images to setWekaException - if a problem occurs