Git Product home page Git Product logo

Comments (2)

thierrygosselin avatar thierrygosselin commented on June 1, 2024

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.

mayer79 avatar mayer79 commented on June 1, 2024

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

grafik

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.