Comments (2)
additional thoughts on this...
I don't see in ranger
's code anywhere how they handle missing in predictor, I guess they don't, but for the genomic example using GWAS data
they say (line 70 in ranger::ranger
):
Note that missing values are treated as an extra category while splitting
That might be an adequate solution ?
from missranger.
Thanks for your comments, which are always very welcome. The rangers are still evaluating the best method to allow for missing values in predictors, I am waiting for this already quite a bit ;). No panic about the completed
columns in missRanger
: It might be empty at the beginning of the iterative procedure and is then built up step by step in the first iteration.
Let me demonstrate with a data set without any complete row:
# input
mydat <- data.frame(x = c(NA, NA, 1), y = c(NA, 2, NA))
mydat
missRanger(mydat)
# output
x y
1 1 2
2 1 2
3 1 2
Personally, I use missRanger
usually after logical imputations. So for instance if I have a column with only "x" and a lot of NA (as we typically have with tickbox data), then I manually replace the NA by "Not ticked" (or just use a dummy being 1 if "x" and 0 else). In certain applications, it makes sense to replace all categorical variables by a new category like "none", but not always. At the moment I am evaluating different ways how to further develop missRanger
. An idea would be to add an option minPropForNone = 1
, which would replace all missing values in categorical factors with more than minPropForNone
missings by "none". In a next step, we could add similar rules for highly discrete numeric columns.
from missranger.
Related Issues (20)
- 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
- Stack Overflow Error HOT 5
- Undefined Columns Selected Error if Strange Variable Names Present HOT 2
- Possibility to access Ranger object for Shap values HOT 8
- Allow out-of-sample application HOT 1
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.