Skip to contents

Similar as summary, this helper function obtains the coefficients from a given DistributionModel object.

Usage

# S3 method for class 'DistributionModel'
coef(object, ...)

Arguments

object

Any prepared object.

...

not used.

Note

For models trained with machine-learning approaches (e.g. engine_bart etc) this function will return variable importance estimates rather than linear coefficients. Similar can be said for trained non-linear models.

See also

Examples

model <- DistributionModel$new("Example model")
model$get_coefficients <- function() {
  data.frame(variable = "temperature", coefficient = 1)
}
coef(model)
#>      variable coefficient
#> 1 temperature           1