Chaining
Impute.Chain — TypeChain{T<:Tuple{Vararg{Transform}}} <: FunctionRuns multiple Validators, Filter or Imputors on the same data in the order they're provided.
Fields
transforms::Vector{Union{Validator, Filter, Imputor}}
Impute.Chain — Method(C::Chain)(data; kwargs...)Runnable the "callable" chain C on the supplied data.
Arguments
data: our data to impute
Keyword Arguments
kwargs: Keyword arguments that should be applied to each transform (exdims=:cols)
Returns
- our imputed data
Impute.Chain — MethodChain(transforms::Union{Validator, Filter, Imputor}...) -> ChainCreates a Chain using the transforms provided (ordering matters).
Base.:∘ — MethodCompose new chains with the composition operator
Example
julia> using Impute: Impute, Interpolate, NOCB, LOCF
julia> M = [missing 2.0 missing missing 5.0; 1.1 2.2 missing 4.4 missing]
2×5 Matrix{Union{Missing, Float64}}:
missing 2.0 missing missing 5.0
1.1 2.2 missing 4.4 missing
julia> C = Interpolate() ∘ NOCB() ∘ LOCF();
julia> C(M; dims=:rows)
2×5 Matrix{Union{Missing, Float64}}:
2.0 2.0 3.0 4.0 5.0
1.1 2.2 3.3 4.4 4.4