R/utils.R

Defines functions get_supported_models SupportedTransitionModels

Documented in get_supported_models SupportedTransitionModels

#' Get all object classes that are supported by Transition
#'
#' @description
#' Currently, these classes are supported in the `model` argument of the Transition's
#' constructor:
#' - [caret::train],
#' - [mlr::train]
#' - [stats::lm],
#' - [stats::glm],
#' - a numeric vector,
#' - a named `list`, and
#' - [data.table::data.table].
#'
#' @note See the 'Transition' section of the
#' [dymiumCore's introduction](https://core.dymium.org/articles/dymium-intro.html)
#' webpage for more detail.
#'
#' Also note that, all models that can return predicted probabilities estimated using
#' [caret::train] and [mlr::train] should work in `transition()` and `TransitionClassification`.
#' However, currently, regression models only work in `TransitionRegression`.
#'
#' @return a character vector
#' @export
SupportedTransitionModels <- function() {
  get_supported_models()
}

#' @rdname SupportedTransitionModels
#' @export
get_supported_models <- function() {
  return(c("train", "list", "data.table", "numeric", "glm", "lm", "WrappedModel", "mlogit"))
}
dymium-org/dymiumModel documentation built on June 23, 2020, 11:01 a.m.