Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatically extract learner param description from help page #1661

Closed
berndbischl opened this issue Mar 10, 2017 · 4 comments
Closed

automatically extract learner param description from help page #1661

berndbischl opened this issue Mar 10, 2017 · 4 comments

Comments

@berndbischl
Copy link
Member

No description provided.

@giuseppec
Copy link
Contributor

This might be helpful openml/openml-r#276

@giuseppec
Copy link
Contributor

Does anyone know something better than this:

library(XML)

getLearnerParamHelp = function(fun) {
  # the R package containing 'fun' must be loaded
  html = capture.output(tools:::Rd2HTML(utils:::.getHelpFile(help(fun))))
  html = htmlParse(html)
  tab = getNodeSet(html, "//table[@summary='R argblock']")
  XML::readHTMLTable(tab[[1]], header = FALSE)
}

library(ranger)
getLearnerParamHelp("ranger")

@mb706
Copy link
Contributor

mb706 commented Mar 11, 2017

Very nice! I'll try to add it to the learnerHelp pr later.

@mb706
Copy link
Contributor

mb706 commented Mar 24, 2017

Closed by #1657

@mb706 mb706 closed this as completed Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants