Chaining

Impute.ChainType
Chain{T<:Tuple{Vararg{Transform}}} <: Function

Runs multiple Validators, Filter or Imputors on the same data in the order they're provided.

Fields

  • transforms::Vector{Union{Validator, Filter, Imputor}}
source
Impute.ChainMethod
(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 (ex dims=:cols)

Returns

  • our imputed data
source
Impute.ChainMethod
Chain(transforms::Union{Validator, Filter, Imputor}...) -> Chain

Creates a Chain using the transforms provided (ordering matters).

source
Base.:∘Method

Compose 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
source