Allow to the the smoothing window size other thatn the default 5%. -- Evan Miller emiller imvu.com git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1203 a5681a0c-68f1-0310-ab6d-d61299d08faa
There are two popular variants of the Holt-Winters forecasting method; RRDtool supports the "additive" method, which means that seasonal variation is simply added to the baseline. For our application, it would be more appropriate to use the "multiplicative" Holt-Winters method, where seasonal variation is a coefficient multiplied by the baseline. Quick example to illustrate the difference: if the average doubles season-over-season, the additive method would predict the delta between min and max to be constant, whereas the multiplicative method would predict the delta to double as well. Attached is a patch against trunk to support the multiplicative method. I've done this with a new consolidation function, MHWPREDICT, which is essentially interchangeable with HWPREDICT. There is a noticeable improvement in prediction deviations for certain types of functions; the attachments show HWPREDICT and MHWPREDICT predictions for a function with an x*sin(x) component. Because HWPREDICT and MHWPREDICT differ only in their equations, I've factored out their math into rrd_hw_math.c. The appropriate smoothing functions are passed to the update functions in a container of function pointers, which are called where appropriate. Thus the additive and multiplicative methods use the same update functions, and the right equations are evaluated without having flag checks everywhere. This approach, I think, makes the algorithms quite clear, with minimal duplicate code. I have moved update_hwpredict, update_seasonal, update_devpredict, update_devseasonal, and update_failures into a separate file, rrd_hw_update.c, with some slight refactoring related to rrd_hw_math.c. I ran some regression tests against trunk to make sure I didn't break anything with the existing HWPREDICT code. MHWPREDICT uses the same deviation smoothing and failure detection algorithms as HWPREDICT. Some helpful references on the multiplicative Holt-Winters method: http://www.it.iitb.ac.in/~praj/acads/seminar/04329008_ExponentialSmoothing.pdf (a student's quick overview of additive vs. multiplicative HW) http://ideas.repec.org/p/msh/ebswps/1999-1.html (paper on variations to the multiplicative Holt-Winters, including variance calculations; FYI, my implementation uses "Model 1") My employer and the owner of this patch (IMVU, Inc.) is happy to license it under the same terms as RRDtool, i.e. give it to the project. -- Evan Miller emiller imvu.com git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1125 a5681a0c-68f1-0310-ab6d-d61299d08faa
fix my mail address git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@812 a5681a0c-68f1-0310-ab6d-d61299d08faa
remove extra whitespace at the end of lines git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@589 a5681a0c-68f1-0310-ab6d-d61299d08faa
another batch of fixes from fritz git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@425 a5681a0c-68f1-0310-ab6d-d61299d08faa
src moved back to pod. this include thing was a neat idea but it just adds another twist to things which is not necessary. fixed some pod errors git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@414 a5681a0c-68f1-0310-ab6d-d61299d08faa
fixed many pod bugs while creating the new website git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@411 a5681a0c-68f1-0310-ab6d-d61299d08faa
big spell checking patch -- slif@bellsouth.net git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@255 a5681a0c-68f1-0310-ab6d-d61299d08faa
Changed intercept to slope for beta parameter in rrdtune doc. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@144 a5681a0c-68f1-0310-ab6d-d61299d08faa
Contents of this patch: (1) Adds/revises documentation for rrd tune in rrd_tool.c and pod files. (2) Moves some initialization code from rrd_create.c to rrd_hw.c. (3) Adds another pass to smoothing for SEASONAL and DEVSEASONAL RRAs. This pass computes the coefficients as deviations from an average; the average is added the baseline coefficient of HWPREDICT. Statistical texts suggest this to preserve algorithm stability. It will not invalidate RRD files created and smoothed with the old code. (4) Adds the aberrant-reset flag to rrd tune. This operation, which is specified for a single data source, causes the holt-winters algorithm to forget everthing it has learned and start over. (5) Fixes a few out-of-date code comments. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@52 a5681a0c-68f1-0310-ab6d-d61299d08faa
Support for COMPUTE data sources (CDEF data sources). Removes the RPN parser and calculator from rrd_graph and puts then in a new file, rrd_rpncalc.c. Changes to core files rrd_create and rrd_update. Some clean-up of aberrant behavior stuff, including a bug fix. Documentation update (rrdcreate.pod, rrdupdate.pod). Change xml format. -- Jake Brutlag <jakeb@corp.webtv.net> git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@31 a5681a0c-68f1-0310-ab6d-d61299d08faa
Aberrant Behavior Detection support. A brief overview added to rrdtool.pod. Major updates to rrd_update.c, rrd_create.c. Minor update to other core files. This is backwards compatible! But new files using the Aberrant stuff are not readable by old rrdtool versions. See http://cricket.sourceforge.net/aberrant/rrd_hw.htm -- Jake Brutlag <jakeb@corp.webtv.net> git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@26 a5681a0c-68f1-0310-ab6d-d61299d08faa
Initial revision git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@6 a5681a0c-68f1-0310-ab6d-d61299d08faa