Class AbstractLinearRegressionBased<T extends DataContainer>

    • Field Detail

      • m_Ridge

        protected double m_Ridge
        the ridge.
      • m_GenerateLine

        protected boolean m_GenerateLine
        whether to return the line as fake data or the corrected data.
    • Constructor Detail

      • AbstractLinearRegressionBased

        public AbstractLinearRegressionBased()
    • Method Detail

      • setRidge

        public void setRidge​(double value)
        Sets the ridge parameter.
        Parameters:
        value - the ridge
      • getRidge

        public double getRidge()
        Returns the ridge parameter.
        Returns:
        the ridge
      • ridgeTipText

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

        public void setGenerateLine​(boolean value)
        Sets whether to return the line as fake data or the corrected data.
        Parameters:
        value - true if debug output should be printed
      • getGenerateLine

        public boolean getGenerateLine()
        Returns whether to return the line as fake data or the corrected data.
        Returns:
        true if debugging output is on
      • generateLineTipText

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

        protected abstract weka.core.Instances getInstances​(T data)
        Returns a dataset containing the x and y values.
        Parameters:
        data - the original data
        Returns:
        the dataset for LinearRegression
      • correctData

        protected abstract T correctData​(T data,
                                         double[] coeff)
        Corrects the data with the given coefficients.
        Parameters:
        data - the original data
        coeff - the coefficients to use for correcting the data, the last element is the offset
        Returns:
        the baseline corrected data
      • generateLine

        protected abstract T generateLine​(T data,
                                          double[] coeff)
        Generates fake data for the plotting the line.
        Parameters:
        data - the original data
        coeff - the coefficients to use for generating the line data, the last element is the offset
        Returns:
        the fake data for the line