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

Class WeightedMovingAverageTest

  • All Implemented Interfaces:
    junit.framework.Test


    public class WeightedMovingAverageTest
    extends OpenForecastTestCase
    Implements a series of tests to test the WeightedMovingAverageModel class.
    Since:
    0.4
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void testConstantWeightedMovingAverage()
      A simple weighted moving average test where the observed data is constant.
      void testWeightedMovingAverage()
      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

      • WeightedMovingAverageTest

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

      • testConstantWeightedMovingAverage

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

        public void testWeightedMovingAverage()
        A somewhat more realistic test where the results are known (and were calculated independently of the model). Validates that the WeightedMovingAverageModel returns the expected set of results for the given inputs. This is still not a great test, since the weights are all equal - at 0.25 - so it is equivalent to a four period moving average. Could do with some better test data here.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.