Comments (2)
Hello Thierry
The algorithm tries to take into account all statistical associations between all variables. So, at least in theory, the answer will be positive. In practice, if you have e.g. too little data or if the values are not missing at random, then it does not work too well in general.
Let us see what happens to our iris data:
set.seed(398745)
# Replace some values by NA
iris2 <- iris
iris2$Sepal.Length[sample(150, 20)] <- NA
iris2$Sepal.Width[sample(150, 40)] <- NA
table(is.na(iris2$Sepal.Length), is.na(iris2$Sepal.Width))
# Output
FALSE TRUE
FALSE 94 36
TRUE 16 4
So there are 20 missing values in Sepal.Length
and 40 in Sepal.Width
.
Now let's fill those values again by running
iris3 <- missRanger(iris2, pmm = 3, seed = 3483)
and compare the joint distribution of the two variables stratified by Species (= color) in the original data set (left) and after imputation (right).
par(mfrow = 1:2)
plot(Sepal.Length ~ Sepal.Width, data = iris, col = Species, main = "original")
plot(Sepal.Length ~ Sepal.Width, data = iris3, col = Species, main = "imputed")
Of course, the pictures are not identical, but the structure seems to be retained.
from missranger.
Related to this, check out what this guy does for the iris dataset...
http://www.markvanderloo.eu/yaRb/2016/09/13/announcing-the-simputation-package-make-imputation-simple/
from missranger.
Related Issues (20)
- Current use of OOB prediction in pmm HOT 1
- Is there any parallelization option? HOT 1
- Return OOB accuracy HOT 5
- Interface to specify variables to use/impute/ignore. HOT 3
- question on missRanger HOT 3
- allow syntactically wrong colum names like "bad name"
- Initial matrix prior to iterating HOT 1
- Why get "out of bag" error over 1? HOT 3
- Allow 'mtry' HOT 2
- add unit tests
- Matrix columns in data frame generate error in missRanger HOT 1
- Adding out-of-bag errors and convergence monitoring HOT 2
- Multiple imputation via bootstrapping rather than predictive mean matching HOT 1
- Question on missRanger and BRMS HOT 8
- Parallel & progress bars HOT 2
- How to test the accuracy of predictions? HOT 1
- How to save the trained Random Forest model and use it to impute new data set? HOT 1
- missRanger as.character(formula) might fail with long formulas HOT 3
- More granular control over which cells get imputed HOT 3
- Consistent as.character(formula)==3L error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from missranger.