invenia / Impute.jl

Imputation methods for missing data in julia
https://invenia.github.io/Impute.jl/latest/
Other
77 stars 11 forks source link

feat: add hot deck imputation #36

Closed paulstey closed 5 years ago

paulstey commented 5 years ago

I've added the ability to use hot-deck imputation. This allows for the imputation of missing values while preserving the univariate-distributional properties of the variables being imputed.

I've written it to behave like the existing imputation methods. I've also written a few test, all of which are passing.

I'd also be interested in working on multiple imputation using chained equations—assuming there would be interest in that.

codecov[bot] commented 5 years ago

Codecov Report

Merging #36 into master will decrease coverage by 1.12%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   97.81%   96.68%   -1.13%     
==========================================
  Files          10       11       +1     
  Lines         183      181       -2     
==========================================
- Hits          179      175       -4     
- Misses          4        6       +2
Impacted Files Coverage Δ
src/Impute.jl 87.5% <ø> (-2.5%) :arrow_down:
src/imputors.jl 93.75% <ø> (-6.25%) :arrow_down:
src/imputors/hotdeck.jl 100% <100%> (ø)
src/context.jl 96.87% <0%> (-3.13%) :arrow_down:
src/imputors/interp.jl 100% <0%> (ø) :arrow_up:
src/deprecated.jl 100% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b436833...ba08ad0. Read the comment docs.

paulstey commented 5 years ago

@rofinn, I think this should be all set now. Thanks for the comments!

rofinn commented 5 years ago

@paulstey Do you mind if I just fix up you branch and merge it?

paulstey commented 5 years ago

@rofinn Sorry for the delay, I've been traveling. And yes, that would be perfect!

Also, I like the idea of renaming to SRS!

paulstey commented 5 years ago

This is all set; thank you!