Class BoundaryPlotter

    • Field Detail

      • DEFAULT_COLORS

        public static final java.awt.Color[] DEFAULT_COLORS
        default colours for classes
    • Constructor Detail

      • BoundaryPlotter

        public BoundaryPlotter()
        Constructor
    • Method Detail

      • getXAttName

        public java.lang.String getXAttName()
        Get the name/index of the X axis attribute
        Returns:
        the name/index of the X axis attribute
      • getYAttName

        public java.lang.String getYAttName()
        Get the name/index of the Y axis attribute
        Returns:
        the name/index of the Y axis attribute
      • setBaseForSampling

        @OptionMetadata(displayName="Base for sampling (r)",
                        description="The base for sampling",
                        displayOrder=3)
        public void setBaseForSampling​(java.lang.String base)
        Set the base for sampling
        Parameters:
        base - the base to use
      • getBaseForSampling

        public java.lang.String getBaseForSampling()
        Get the base for sampling
        Returns:
        the base to use
      • setNumLocationsPerPixel

        @OptionMetadata(displayName="Num. locations per pixel",
                        description="Number of locations per pixel",
                        displayOrder=4)
        public void setNumLocationsPerPixel​(java.lang.String num)
        Set the number of locations/samples per pixel
        Parameters:
        num - the number of samples to use
      • getNumLocationsPerPixel

        public java.lang.String getNumLocationsPerPixel()
        Get the number of locations/samples per pixel
        Returns:
        the number of samples to use
      • getKernelBandwidth

        public java.lang.String getKernelBandwidth()
        Get the kernel bandwidth
        Returns:
        the bandwidth
      • getImageWidth

        public int getImageWidth()
        Get the image width (in pixels)
        Returns:
        the width to use
      • getImageHeight

        public int getImageHeight()
        Get the image height (in pixels)
        Returns:
        the height to use
      • setComputeMaxRowsInParallel

        @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)
        Set the maximum number of threads to use when computing image rows
        Parameters:
        max - maximum number of rows to compute in parallel
      • getComputeMaxRowsInParallel

        public int getComputeMaxRowsInParallel()
        Get the maximum number of threads to use when computing image rows
        Returns:
        the maximum number of rows to compute in parallel
      • setPlotTrainingData

        @OptionMetadata(displayName="Plot training points",
                        description="Superimpose the training data over the top of the plot",
                        displayOrder=8)
        public void setPlotTrainingData​(boolean plot)
        Set whether to superimpose the training data points on the plot or not
        Parameters:
        plot - true to plot the training data
      • getPlotTrainingData

        public boolean getPlotTrainingData()
        Get whether to superimpose the training data points on the plot or not
        Returns:
        true if plotting the training data
      • plotTrainingData

        public void plotTrainingData​(Instances trainingData)
      • getIncomingConnectionTypes

        public java.util.List<java.lang.String> getIncomingConnectionTypes()
        Get 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:
        getIncomingConnectionTypes in interface BaseStepExtender
        Specified by:
        getIncomingConnectionTypes in interface Step
        Returns:
        a list of incoming connections that this step can accept given its current state
      • getOutgoingConnectionTypes

        public java.util.List<java.lang.String> getOutgoingConnectionTypes()
        Get 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:
        getOutgoingConnectionTypes in interface BaseStepExtender
        Specified by:
        getOutgoingConnectionTypes in interface Step
        Returns:
        a list of outgoing connections that this step can produce
      • getImages

        public java.util.Map<java.lang.String,​java.awt.image.BufferedImage> getImages()
        Get the completed images
        Returns:
        a map of completed images
      • getCurrentImage

        public java.awt.image.BufferedImage getCurrentImage()
        Get the currently rendering image
        Returns:
        the current image
      • setRenderingListener

        public void setRenderingListener​(BoundaryPlotter.RenderingUpdateListener l)
        Set a listener to receive rendering updates
        Parameters:
        l - the RenderingUpdateListener to add
      • removeRenderingListener

        public void removeRenderingListener​(BoundaryPlotter.RenderingUpdateListener l)
        Remove the rendering update listener
        Parameters:
        l - the RenderingUpdateListener to remove
      • getInteractiveViewers

        public 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. 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:
        getInteractiveViewers in interface Step
        Overrides:
        getInteractiveViewers in class BaseStep
        Returns:
        a map of viewer component names, or null if this step has no graphical views
      • getCustomEditorForStep

        public java.lang.String getCustomEditorForStep()
        Return 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:
        getCustomEditorForStep in interface Step
        Overrides:
        getCustomEditorForStep in class BaseStep
        Returns:
        the fully qualified name of a step editor component
      • retrieveData

        public java.lang.Object retrieveData()
        Get the map of completed images
        Specified by:
        retrieveData in interface DataCollector
        Returns:
        the map of completed images