Math::CMA - Central Moving Average noise removal
use Math::CMA 'central_moving_averages'; my @averaged = central_moving_averages(2, [1, 2, 3, 4, 5]); # returns (2, 2.5, 3, 3.5, 4)
central_moving_averages function takes a smoothing distance and an array reference and returns a list that averages all values in the input over the distance value, in other words, it returns for each value in the input the arithmetic mean of that value plus $distance many values before and $distance many values after it. A practical application would be smoothing time series data.
central_moving_averages on request, none by default.
AUTHOR / COPYRIGHT / LICENSE
Copyright (c) 2012 Bjoern Hoehrmann <email@example.com>. This module is licensed under the same terms as Perl itself.