Class WekaClassifierModelReader

    • Field Detail

      • m_WarmUp

        protected boolean m_WarmUp
        whether to perform warm up.
      • m_Iterations

        protected int m_Iterations
        the number of warm up iterations to perform.
    • Constructor Detail

      • WekaClassifierModelReader

        public WekaClassifierModelReader()
        Default constructor.
      • WekaClassifierModelReader

        public WekaClassifierModelReader​(boolean warmUp)
        Convenience constructor for setting the warmup flag.
        Parameters:
        warmUp - whether to perform warmup
      • WekaClassifierModelReader

        public WekaClassifierModelReader​(boolean warmUp,
                                         int iterations)
        Convenience constructor for configuring the warmup.
        Parameters:
        warmUp - whether to perform warmup
        iterations - the number of iterations to perform
    • Method Detail

      • setWarmUp

        public void setWarmUp​(boolean value)
        Sets whether to warm up the model with a dummy instance after deserializing it.
        Parameters:
        value - true if to warm up
      • getWarmUp

        public boolean getWarmUp()
        Returns whether to warm up the model with a dummy instance after deserializing it.
        Returns:
        true if to warm up
      • warmUpTipText

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

        public void setIterations​(int value)
        Sets the number of warm up iterations to perform.
        Parameters:
        value - the number of iterations
      • getIterations

        public int getIterations()
        Returns the number of warm up iterations to perform.
        Returns:
        the number of iterations
      • iterationsTipText

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

        protected boolean performWarmUp​(weka.core.Instances header,
                                        weka.classifiers.Classifier cls)
        Creates a dummy instance based on the header and attempts to classify it in order to warm up the classifier.
        Parameters:
        header - the header to use
        cls - the classifier to warm up
        Returns:
        true if successfully warmed up
      • doRead

        protected Object doRead​(PlaceholderFile file)
        Performs the actual reading of the object file.
        Specified by:
        doRead in class AbstractObjectReader
        Parameters:
        file - the file to read
        Returns:
        the object, null if failed to read