Class HTMLOutput

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable

    public class HTMLOutput
    extends AbstractOutputGenerator
    Generates a self-contained HTML file from actual vs predicted data using the specified processor.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.core.io.PlaceholderFile m_OutputFile
      the output file to generate.
      protected adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedHtmlProcessor m_Processor
      the HTML processor.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      HTMLOutput()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canGenerateOutput​(ResultItem item)
      Checks whether output can be generated from this item.
      protected ComponentContentPanel createOutput​(int index, ResultItem item, weka.classifiers.Evaluation eval, int[] originalIndices, adams.data.spreadsheet.SpreadSheet additionalAttributes, adams.core.MessageCollection errors)
      Generates a plot actor from the evaluation.
      JComponent createOutput​(ResultItem item, adams.core.MessageCollection errors)
      Generates output from the item.
      void defineOptions()
      Adds options to the internal list of options.
      adams.core.io.PlaceholderFile getOutputFile()
      Returns the output file to generate.
      adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedHtmlProcessor getProcessor()
      Returns the HTML processor to use.
      String getTitle()
      The title to use for the tab.
      String globalInfo()
      Returns a string describing the object.
      String outputFileTipText()
      Returns the tip text for this property.
      String processorTipText()
      Returns the tip text for this property.
      void setOutputFile​(adams.core.io.PlaceholderFile value)
      Sets the output file to generate.
      void setProcessor​(adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedHtmlProcessor value)
      Sets the HTML processor to use.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
      • Methods inherited from class adams.core.logging.CustomLoggingLevelObject

        setLoggingLevel
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Processor

        protected adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedHtmlProcessor m_Processor
        the HTML processor.
      • m_OutputFile

        protected adams.core.io.PlaceholderFile m_OutputFile
        the output file to generate.
    • Constructor Detail

      • HTMLOutput

        public HTMLOutput()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setProcessor

        public void setProcessor​(adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedHtmlProcessor value)
        Sets the HTML processor to use.
        Parameters:
        value - the processor
      • getProcessor

        public adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedHtmlProcessor getProcessor()
        Returns the HTML processor to use.
        Returns:
        the processor
      • processorTipText

        public String processorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setOutputFile

        public void setOutputFile​(adams.core.io.PlaceholderFile value)
        Sets the output file to generate.
        Parameters:
        value - the output, automatically generated if pointing to a dir
      • getOutputFile

        public adams.core.io.PlaceholderFile getOutputFile()
        Returns the output file to generate.
        Returns:
        the output, automatically generated if pointing to a dir
      • outputFileTipText

        public String outputFileTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • createOutput

        protected ComponentContentPanel createOutput​(int index,
                                                     ResultItem item,
                                                     weka.classifiers.Evaluation eval,
                                                     int[] originalIndices,
                                                     adams.data.spreadsheet.SpreadSheet additionalAttributes,
                                                     adams.core.MessageCollection errors)
        Generates a plot actor from the evaluation.
        Parameters:
        index - the 0-based fold index, -1 if not for fold
        eval - the evaluation to use
        originalIndices - the original indices, can be null
        additionalAttributes - the additional attribute to use, can be null
        errors - for collecting errors
        Returns:
        the generated panel, null if failed to generate
      • createOutput

        public JComponent createOutput​(ResultItem item,
                                       adams.core.MessageCollection errors)
        Generates output from the item.
        Specified by:
        createOutput in class AbstractOutputGenerator<ResultItem>
        Parameters:
        item - the item to generate output for
        errors - for collecting error messages
        Returns:
        the output component, null if failed to generate