Class SimpleLinearRegressionIntervalEstimator

  • All Implemented Interfaces:
    Serializable, Cloneable, weka.classifiers.Classifier, weka.classifiers.IntervalEstimator, weka.core.BatchPredictor, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler, weka.core.WeightedInstancesHandler

    public class SimpleLinearRegressionIntervalEstimator
    extends SimpleLinearRegressionWithAccess
    implements weka.classifiers.IntervalEstimator
    Learns a simple linear regression model. Picks the attribute that results in the lowest squared error. Can only deal with numeric attributes.
    Makes standard errors available.

    Provides confidence intervals as well. For more information see:
    http://stattrek.com/regression/slope-confidence-interval.aspx

    Valid options are:

     -additional-stats
      Output additional statistics.
     -output-debug-info
      If set, classifier is run in debug mode and
      may output additional info to the console
     -do-not-check-capabilities
      If set, classifier capabilities are not checked before classifier is built
      (use with caution).
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • SimpleLinearRegressionIntervalEstimator

        public SimpleLinearRegressionIntervalEstimator()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing this classifier
        Overrides:
        globalInfo in class SimpleLinearRegressionWithAccess
        Returns:
        a description of the classifier suitable for displaying in the explorer/experimenter gui
      • predictIntervals

        public double[][] predictIntervals​(weka.core.Instance inst,
                                           double confidenceLevel)
                                    throws Exception
        Returns an N * 2 array, where N is the number of prediction intervals. In each row, the first element contains the lower boundary of the corresponding prediction interval and the second element the upper boundary.
        Specified by:
        predictIntervals in interface weka.classifiers.IntervalEstimator
        Parameters:
        inst - the instance to make the prediction for.
        confidenceLevel - the percentage of cases that the interval should cover.
        Returns:
        an array of prediction intervals
        Throws:
        Exception - if the intervals can't be computed
      • main

        public static void main​(String[] argv)
        Generates a linear regression function predictor.
        Parameters:
        argv - the options