Documentation of 'net.sourceforge.openforecast.tests.MovingAverageTest' Java class
MovingAverageTest
net.sourceforge.openforecast.tests

Class MovingAverageTest

  • All Implemented Interfaces:
    junit.framework.Test


    public class MovingAverageTest
    extends OpenForecastTestCase
    Tests the implementation of the Moving Average forecasting model.
    Since:
    0.3
    • Constructor Summary

      Constructors 
      Constructor and Description
      MovingAverageTest(java.lang.String name) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void _testForecaster()
      A test that the forecaster uses a moving average forecast for appropriate input data.
      void testConstantMovingAverage()
      A simple moving average test where the observed data is constant.
      void testMovingAverage()
      A somewhat more realistic test where the results are known (and were calculated independently of the model).
      • Methods inherited from class junit.framework.TestCase

        assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MovingAverageTest

        public MovingAverageTest(java.lang.String name)
    • Method Detail

      • testConstantMovingAverage

        public void testConstantMovingAverage()
        A simple moving average test where the observed data is constant. This should result in the same constant forecast.
      • testMovingAverage

        public void testMovingAverage()
        A somewhat more realistic test where the results are known (and were calculated independently of the model). Validates that the MovingAverageModel returns the expected set of results for the given inputs.
      • _testForecaster

        public void _testForecaster()
        A test that the forecaster uses a moving average forecast for appropriate input data. The validity of this test depends on the accuracy of other forecasting models. We, artificially, construct an input data set (to pass to init) that lends itself to a moving average forecast, more so than any of the other forecasting models.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.