net.sourceforge.openforecast.tests
Class MovingAverageTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- net.sourceforge.openforecast.tests.OpenForecastTestCase
-
- net.sourceforge.openforecast.tests.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.voidtestConstantMovingAverage()A simple moving average test where the observed data is constant.voidtestMovingAverage()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
-
-
-
-
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