find_ (get_?) algorithm
Open
Nobody has claimed this yet.
Help us :eyes:
- Dominant language
- R
- Stars
- 442
- Forks
- 47
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 7
Description
Although the fitting algorithm plays an important role, it is often unreported/uncared about. Surprisingly, its access is not really straightforward.
What do you think about a function that does that?
Here's a draft:
#' @export
find_algorithm <- function(model, ...) {
UseMethod("find_algorithm")
}
#' @export
find_algorithm.merMod <- function(model) {
if(model@resp$REML == 0){
algorithm <- "ML"
} else{
algorithm <- "REML"
}
out <- list(
"algorithm" = algorithm,
"optimizer" = as.character(model@optinfo$optimizer)
)
return(out)
}
#' @export
find_algorithm.stanreg <- function(model) {
info <- model$stanfit@sim
out <- list(
"algorithm" = model$algorithm,
"chains" = info$chains,
"iterations" = info$iter,
"warmup" = info$warmup
)
return(out)
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the proposed find_algorithm generic and its merMod and stanreg methods in the issue body. Check how these model classes expose fitting and sampling details; done means a documented function consistently reports the requested algorithm information for the supported classes, with tests covering the results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100