Closed adienes closed 6 months ago
Seems a bit niche to add to the package, but it's pretty easy to do yourself:
import OnlineStatsBase: OnlineStat, _fit!, nobs, value
struct NullStat <: OnlineStat{Any} end
value(::NullStat) = nothing
nobs(::NullStat) = 0
_fit!(::NullStat, x) = nothing
julia> using OnlineStats
julia> fit!(NullStat(), randn(100))
NullStat: n=0 | value=nothing
I have some use cases where I might pass in any arbitrary
OnlineStat
type; occasionally I want this to be a no-op but not change the signature of the functionany receptiveness to adding a
NullStat
wherefit!(::NullStat, x)
simply does nothing?just an idea