Package weka.knowledgeflow.steps
Class DataVisualizer
java.lang.Object
weka.knowledgeflow.steps.BaseStep
weka.knowledgeflow.steps.DataVisualizer
- All Implemented Interfaces:
Serializable,BaseStepExtender,DataCollector,Step
@KFStep(name="DataVisualizer",
category="Visualization",
toolTipText="Visualize training/test sets in a 2D scatter plot.",
iconPath="weka/gui/knowledgeflow/icons/DefaultDataVisualizer.gif")
public class DataVisualizer
extends BaseStep
implements DataCollector
A step that provides a visualization based on
weka.gui.visualize.VisualizePanel
- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturn the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step.Get a list of incoming connection types that this step can accept.When running in a graphical execution environment a step can make one or more popup Viewer components available.Get the additional options for the offscreen rendererGet the height (in pixels) of the offscreen image to generateGet the name of the renderer to use for offscreen chart rendering operationsGet the width (in pixels) of the offscreen image to generate.Get the name of the attribute for the x-axis in offscreen plotsGet the name of the attribute for the y-axix of offscreen plots.Get a list of outgoing connection types that this step can produce.getPlots()voidprocessIncoming(Data data) Process an incoming data payload (if the step accepts incoming connections)voidrestoreData(Object data) Set the data for this collectorGet the data that this collector has collectedvoidsetOffscreenAdditionalOpts(String additional) Set the additional options for the offscreen renderervoidsetOffscreenHeight(String height) Set the height (in pixels) of the offscreen image to generatevoidsetOffscreenRendererName(String rendererName) Set the name of the renderer to use for offscreen chart rendering operationsvoidsetOffscreenWidth(String width) Set the width (in pixels) of the offscreen image to generate.voidsetOffscreenXAxis(String xAxis) Set the name of the attribute for the x-axis in offscreen plots.voidsetOffscreenYAxis(String yAxis) Set the name of the attribute for the y-axis in offscreen plots.voidstepInit()Initialize the step.Methods inherited from class weka.knowledgeflow.steps.BaseStep
environmentSubstitute, getDefaultSettings, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
-
Constructor Details
-
DataVisualizer
public DataVisualizer()
-
-
Method Details
-
setOffscreenXAxis
@OptionMetadata(displayName="X-axis attribute", description="Attribute name or /first, /last or /<index>", displayOrder=1) public void setOffscreenXAxis(String xAxis) Set the name of the attribute for the x-axis in offscreen plots. This defaults to "False Positive Rate" for threshold curves if not specified.- Parameters:
xAxis- the name of the xAxis
-
getOffscreenXAxis
Get the name of the attribute for the x-axis in offscreen plots- Returns:
- the name of the xAxis
-
setOffscreenYAxis
@OptionMetadata(displayName="Y-axis attribute", description="Attribute name or /first, /last or /<index>", displayOrder=2) public void setOffscreenYAxis(String yAxis) Set the name of the attribute for the y-axis in offscreen plots. This defaults to "True Positive Rate" for threshold curves if not specified.- Parameters:
yAxis- the name of the xAxis
-
getOffscreenYAxis
Get the name of the attribute for the y-axix of offscreen plots.- Returns:
- the name of the yAxis.
-
setOffscreenWidth
@OptionMetadata(displayName="Chart width (pixels)", description="Width of the rendered chart", displayOrder=3) public void setOffscreenWidth(String width) Set the width (in pixels) of the offscreen image to generate.- Parameters:
width- the width in pixels.
-
getOffscreenWidth
Get the width (in pixels) of the offscreen image to generate.- Returns:
- the width in pixels.
-
setOffscreenHeight
@OptionMetadata(displayName="Chart height (pixels)", description="Height of the rendered chart", displayOrder=4) public void setOffscreenHeight(String height) Set the height (in pixels) of the offscreen image to generate- Parameters:
height- the height in pixels
-
getOffscreenHeight
Get the height (in pixels) of the offscreen image to generate- Returns:
- the height in pixels
-
setOffscreenRendererName
Set the name of the renderer to use for offscreen chart rendering operations- Parameters:
rendererName- the name of the renderer to use
-
getOffscreenRendererName
Get the name of the renderer to use for offscreen chart rendering operations- Returns:
- the name of the renderer to use
-
setOffscreenAdditionalOpts
Set the additional options for the offscreen renderer- Parameters:
additional- additional options
-
getOffscreenAdditionalOpts
Get the additional options for the offscreen renderer- Returns:
- the additional options
-
stepInit
Description copied from interface:StepInitialize the step.- Specified by:
stepInitin interfaceBaseStepExtender- Specified by:
stepInitin interfaceStep- Throws:
WekaException- if a problem occurs during initialization
-
processIncoming
Description copied from class:BaseStepProcess an incoming data payload (if the step accepts incoming connections)- Specified by:
processIncomingin interfaceBaseStepExtender- Specified by:
processIncomingin interfaceStep- Overrides:
processIncomingin classBaseStep- Parameters:
data- the payload to process- Throws:
WekaException- if a problem occurs
-
getPlots
-
clearPlotData
public void clearPlotData() -
retrieveData
Description copied from interface:DataCollectorGet the data that this collector has collected- Specified by:
retrieveDatain interfaceDataCollector- Returns:
- the data collected by this collector
-
restoreData
Description copied from interface:DataCollectorSet the data for this collector- Specified by:
restoreDatain interfaceDataCollector- Parameters:
data- the data to set- Throws:
WekaException- if there is a problem restoring data
-
getIncomingConnectionTypes
Description copied from interface:StepGet a list of incoming connection types that this step can accept. Ideally (and if appropriate), this should take into account the state of the step and any existing incoming connections. E.g. a step might be able to accept one (and only one) incoming batch data connection.- Specified by:
getIncomingConnectionTypesin interfaceBaseStepExtender- Specified by:
getIncomingConnectionTypesin interfaceStep- Returns:
- a list of incoming connections that this step can accept given its current state
-
getOutgoingConnectionTypes
Description copied from interface:StepGet a list of outgoing connection types that this step can produce. Ideally (and if appropriate), this should take into account the state of the step and the incoming connections. E.g. depending on what incoming connection is present, a step might be able to produce a trainingSet output, a testSet output or neither, but not both.- Specified by:
getOutgoingConnectionTypesin interfaceBaseStepExtender- Specified by:
getOutgoingConnectionTypesin interfaceStep- Returns:
- a list of outgoing connections that this step can produce
-
getCustomEditorForStep
Description copied from class:BaseStepReturn the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step. This method can return null, in which case the system will dynamically generate an editor using the GenericObjectEditor- Specified by:
getCustomEditorForStepin interfaceStep- Overrides:
getCustomEditorForStepin classBaseStep- Returns:
- the fully qualified name of a step editor component
-
getInteractiveViewers
Description copied from class:BaseStepWhen running in a graphical execution environment a step can make one or more popup Viewer components available. These might be used to display results, graphics etc. Returning null indicates that the step has no such additional graphical views. The map returned by this method should be keyed by action name (e.g. "View results"), and values should be fully qualified names of the corresponding StepInteractiveView implementation. Furthermore, the contents of this map can (and should) be dependent on whether a particular viewer should be made available - i.e. if execution hasn't occurred yet, or if a particular incoming connection type is not present, then it might not be possible to view certain results. Viewers can implement StepInteractiveView directly (in which case they need to extends JPanel), or extends the AbstractInteractiveViewer class. The later extends JPanel, uses a BorderLayout, provides a "Close" button and a method to add additional buttons.- Specified by:
getInteractiveViewersin interfaceStep- Overrides:
getInteractiveViewersin classBaseStep- Returns:
- a map of viewer component names, or null if this step has no graphical views
-