Abstract
Modularity is an ongoing focus in genetic programming research. Enhanced modularity can accelerate solution convergence and increase human understanding and knowledge gained from evolved programs. Prior advances in modularity research have addressed programming language elements such as functions, modules, and recursion. This paper proposes improving modularity by considering non-language elements, specifically software design patterns. A new genetic programming technique implementing the template method pattern is described. This technique was tested and compared to existing genetic programming approaches in the prediction of nonlinear time series subject to abrupt changes in the underlying data generation process. Such series are often seen in areas such as finance and meteorology and have proved challenging for genetic programming to model and predict. Experimental results demonstrate the potential for incorporating additional software design patterns into genetic programming and applying these techniques to additional problem domains.
Similar content being viewed by others
Notes
[2] discusses dynamically determining ADF parameters and is a more detailed treatment of the subject.
Regime detection programs are also referred to as regime indicator groups.
The super parent approach described in Sect. 3.1.1 can facilitate rank-based selection.
The latter approach was used in the experiments in this paper. The choice of approaches is potentially domain specific, so no recommendation is given at this time.
N is typically between 2 and 4.
SINCOS is the only one of the three experimental series discussed that is not based on prior research.
These series are referred to as LG–OZ–LG and MG–HEN–MG in [19]. This paper uses the abbreviations LGOZLG and MGHENMG, as the two sets of series may not match exactly.
The population control features incorporated into DyFor GP are described in [12].
LGOZLG tests were run using values 1-100 for training. MGHENMG tests were run using values 31–130 as the training period as the values depend on up to 30 lagged values. It is not clear if the benchmark also adjusted the training range. It is unlikely the difference significantly affects the results either way.
The determined regime was analyzed only in the best performing runs. There is no way to average out regime determination over all sets of runs.
References
J.R. Koza, Genetic Programming: On the Programming of Computers by Means of Natural Selection, vol. 1 (MIT press, Cambridge, 1992)
J.R. Koza, Genetic Programming II: Automatic Discovery of Reusable Programs (MIT press, Cambridge, 1994)
P. Angeline, Genetic programming and emergent intelligence. Adv. Genet. Program. 1, 75–98 (1994)
T. Yu, C. Clack, Recursion, lambda-abstractions and genetic programming. Cogn. Sci. Res. Pap. Birm. 22, 26–30 (1998)
J.R. Woodward, Modularity in genetic programming, in Genetic Programming, No. Theorem 2, ed. by C. Ryan, T. Soule, M. Keijzer, E. Tsang, R. Poli, E. Costa (Springer, Berlin, 2003), pp. 254–263
E. Gamma, R. Helm, R. Johnson, J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley, Reading, 1995)
J.G. De Gooijer, R.J. Hyndman, 25 years of time series forecasting. Int. J. Forecast. 22(3), 443–473 (2006)
S. Li, R. Lund, Multiple changepoint detection via genetic algorithms. J. Clim. 25(2), 674–686 (2012)
M. Srinivas, L.M. Patnaik, Genetic algorithms: a survey. Computer (Long. Beach. Calif) 27(6), 17–26 (1994)
B. Mulloy, R. Riolo, R. Savit, Dynamics of genetic programming and chaotic time series prediction, in Proceedings of the First Annual Conference on Genetic Programming, pp. 166–174 (1996)
M. A. Kaboudan, A GP approach to distinguish chaotic from noisy signals, in Genetic Programming 1998: Proceedings of the Third Annual Conference, pp. 187–191 (1998)
N. Wagner, Z. Michalewicz, M. Khouja, R.R. McGregor, Time series forecasting for dynamic environments: the DyFor genetic program model. IEEE Trans. Evol. Comput. 11(4), 433–452 (2007)
M. O’Neill, L. Vanneschi, S. Gustafson, W. Banzhaf, Open issues in genetic programming. Genet. Program Evolvable Mach. 11(3–4), 339–363 (2010)
P. Angeline, J. Pollack, The evolutionary induction of subroutines, in Proceedings of the Fourteenth Annual Conference of the Cognitive Science Society, pp. 236–241 (1992)
L. Spector, Evolving control structures with automatically defined macros, in Working Notes of the AAAI Fall Symposium on Genetic Programming, The American Association for Artificial Intelligence, pp. 99–105 (1995)
D.C. Schmidt, M. Fayad, R.E. Johnson, Software patterns. Commun. ACM 39(10), 37–39 (1996)
C. Brooks, Introductory Econometrics for Finance [Kindle Version], Third Edit (Cambridge University Press, Cambridge, 2014)
N. Wagner, Time Series Forecasting for Non-static Environments: The DyFor Genetic Program Model, the University of North Carolina at Charlotte (2005)
N. Wagner, Z. Michalewicz, An analysis of adaptive windowing for time series forecasting in dynamic environments: further tests of the DyFor GP model, in Proceedings of the 10th Annual Conference on Genetic and Evolutionary Computation, pp. 1657–1664 (2008)
S.H. Chen, T.W. Kuo, K.M. Hoi, Genetic Programming and Financial Trading: How Much About ‘What We Know’, in Handbook of Financial Engineering (Springer, Berlin, 2008), pp. 99–154
R. Poli, W. B. Langdon, N. F. McPhee, J. R. Koza, A Field Guide to Genetic Programming. Lulu.com (2008)
J. Koza, M.A. Keane, M.J. Streeter, W. Mydlowec, J. Yu, G. Lanza, Genetic Programming IV: Routine Human-Competitive Machine Intelligence, vol. 5 (Springer, Berlin, 2006)
J.R. Koza, Human-competitive results produced by genetic programming. Genet. Program Evolvable Mach. 11(3–4), 251–284 (2010)
Author information
Authors and Affiliations
Corresponding author
Appendix
Appendix
Table 13 lists the random parameters used in the creation of the MGHENMG series.
The full data sets, executable binaries, and parameter files from the experiments described in this report are available at http://www.infoblazer.com/geneticprogramming. Source code is also provided in a GitHub repository.
Rights and permissions
About this article
Cite this article
Moskowitz, D. Implementing the template method pattern in genetic programming for improved time series prediction. Genet Program Evolvable Mach 19, 271–299 (2018). https://doi.org/10.1007/s10710-018-9320-9
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10710-018-9320-9