You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# I know I only ever want to impute with the mean
method = Impute.Fill(; value=mean);
# do some initial data stuff here...# notice after processing the data has observations in the columns# let's impute the missings!impute!(X, method; vardim=1)
julia>impute!(X, method; vardim=1)
ERROR: MethodError: no method matching impute!(::Array{Float64,2}, ::Fill{typeof(mean)}; vardim=1)
Closest candidates are:impute!(::AbstractArray{T,2}where T, ::Impute.Imputor) at /Users/nick/.julia/packages/Impute/OIgZp/src/imputors.jl:71 got unsupported keyword argument "vardim"
i.e. I want to specify my imputation method up front, but I don't know until call time how my data will be stored
But it turns out I need this
# know up front how data is stored
method = Impute.Fill(; value=mean, vardim=1);
# do inital data stuff and make the data the way round the `method` requires# now imputeimpute!(X, method)
Similar use case is: I want to allow users to specify how to impute the data in the middle of some long data processing pipeline, without requiring them to know the orientation the data happens to have at the time imputation is performed.
The text was updated successfully, but these errors were encountered:
The issue with this comes from the fact that our Impute.<method> functions need to both create the type using keywords and then call impute!. If we want to pass keywords to both then we'd need some way of figuring out which keywords should go to the type constructor and which should be passed to the impute! call. I suppose 1 option could be to use a default method that assumes keyword arguments to a type constructor match the field names and then pass the rest to the impute! method, but that seems hacky.
On
master
, I was recently burned by this:i.e. I want to specify my imputation method up front, but I don't know until call time how my data will be stored
But it turns out I need this
Similar use case is: I want to allow users to specify how to impute the data in the middle of some long data processing pipeline, without requiring them to know the orientation the data happens to have at the time imputation is performed.
The text was updated successfully, but these errors were encountered: