net.sourceforge.openforecast.tests
Class SimpleExponentialSmoothingTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- net.sourceforge.openforecast.tests.OpenForecastTestCase
-
- net.sourceforge.openforecast.tests.SimpleExponentialSmoothingTest
-
- All Implemented Interfaces:
- junit.framework.Test
public class SimpleExponentialSmoothingTest extends OpenForecastTestCase
Tests the implementation of the Simple Exponential Smoothing forecasting model.- Since:
- 0.4
-
-
Constructor Summary
Constructors Constructor and Description SimpleExponentialSmoothingTest(java.lang.String name)Constructor required by the JUnit framework.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidtestConstantSimpleExponentialSmoothing()A simple exponential smoothing test where the observed data is constant.voidtestMusicStoreExample()An example taken from "Business Statistics", 4th Edition by Daniel and Terrell, page 605.voidtestSimpleExponentialSmoothing()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
-
-
-
-
Constructor Detail
-
SimpleExponentialSmoothingTest
public SimpleExponentialSmoothingTest(java.lang.String name)
Constructor required by the JUnit framework.
-
-
Method Detail
-
testConstantSimpleExponentialSmoothing
public void testConstantSimpleExponentialSmoothing()
A simple exponential smoothing test where the observed data is constant. This should result in the same constant forecast for any value of the smoothing constant.
-
testSimpleExponentialSmoothing
public void testSimpleExponentialSmoothing()
A somewhat more realistic test where the results are known (and were calculated independently of the model). Validates that the SimpleExponentialSmoothingModel returns the expected set of results for the given inputs.
-
testMusicStoreExample
public void testMusicStoreExample()
An example taken from "Business Statistics", 4th Edition by Daniel and Terrell, page 605. This example tests the exponential smoothing formulation proposed by Roberts.Example 13.5.1. The sales of musical instruments by a local music store for the past 10 months are as follows: 74, 69, 80, 91, 76, 83, 79, 87, 89, and 92.
- See Also:
SimpleExponentialSmoothingModel
-
-
DataMelt 3.0 © DataMelt by jWork.ORG