Skip to contents

Dispatches to the appropriate table function based on model type and requested table type. Requires the gt package.

Usage

tl_table(model, type = "auto", ...)

Arguments

model

A tidylearn model object

type

Table type (default: "auto"). For supervised models: "metrics", "coefficients", "confusion", "importance". For unsupervised models: "variance", "loadings", "clusters". MDS models are not supported.

...

Additional arguments passed to the underlying table function

Value

A gt table object.

Examples

# \donttest{
model <- tl_model(mtcars, mpg ~ wt + hp, method = "linear")
tl_table(model)
Model Evaluation Metrics
Metric Value
Rmse 2.4689
Mae 1.9015
Rsq 0.8268
tidylearn | linear (regression) | mpg ~ wt + hp | n = 32
tl_table(model, type = "coefficients")
Linear Model Coefficients
Term Estimate Std. Error t value p
(Intercept) 37.2273 1.5988 23.2847 2.57 × 10−20 *
wt −3.8778 0.6327 −6.1287 1.12 × 10−6 *
hp −0.0318 0.0090 −3.5187 1.45 × 10−3 *
tidylearn | linear (regression) | mpg ~ wt + hp | n = 32
# }