# Exponential smoothing

**URL:** <https://discourse.julialang.org/t/exponential-smoothing/41020>\
**Category:** Statistics\
**Tags:** question\
**Created:** [June 8, 2020, 10:46pm UTC](https://discourse.julialang.org/t/exponential-smoothing/41020 "2020-06-08T22:46:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![joshday](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshday/32/368_2.png) [@joshday](https://discourse.julialang.org/u/joshday)\
**Post date:** [September 15, 2020, 4:30pm UTC](https://discourse.julialang.org/t/exponential-smoothing/41020/5 "2020-09-15T16:30:15Z")

</div>

OnlineStats does this: [Weights · OnlineStats Docs](https://joshday.github.io/OnlineStats.jl/stable/weights/#OnlineStatsBase.ExponentialWeight)

e.g.

```julia
julia> using OnlineStats

julia> x = randn(100);

julia> o = Mean(weight=ExponentialWeight(.1))
Mean: n=0 | value=0.0

julia> exp_smooth = [value(fit!(o, xi)) for xi in x]

```

---

_[View the full topic](https://discourse.julialang.org/t/exponential-smoothing/41020)._
