Skip to content

Real-time smoothing/de-noising via exponential moving average and variable smoothing factor

License

Notifications You must be signed in to change notification settings

kkartavenka/AdaptiveEMA

Repository files navigation

AdaptiveEMA

THe aim was to reduce the lag of exponential moving average via assesing r squared of polynomial fit.

Usage:

double[] someArray = new doublep[] {...}; 
var filter = new AdaptiveEMA.RSquaredAdaptiveEma(smoothingFactorMin: 0, smoothingFactorMax: 0.5, windowSize: 20);
var weightedValue = filter.GetLastValue(someArray);
double[] someArray = new doublep[] {...}; 
var filter = new AdaptiveEMA.RSquaredAdaptiveEma(smoothingFactorMin: 0, smoothingFactorMax: 0.5, windowSize: 20);
filter.UseConfirmationWindowSize(confirmationWindowSize: 10, significanceRatio: 2);

var weightedValue = filter.GetLastValue(someArray);

Results

image

image

image

License

AdaptiveEMA is licensed under the MIT license.

About

Real-time smoothing/de-noising via exponential moving average and variable smoothing factor

Topics

Resources

License

Stars

Watchers

Forks

Languages