printModel: Print Model Information

View source: R/global.visu.R

printModelR Documentation

Print Model Information

Description

This function prints information about a given model, either in a short, long, or structured format. The function provides a summary of the model, including the model coefficients, intercept, evaluation score, learner, and language, depending on the selected format.

Usage

printModel(mod, method = "short", score = "fit_")

Arguments

mod

A model object. It can be any predomics model object.

method

A string specifying the format in which the model summary will be printed. Possible values are "short" (default), "long", and "str". "short" gives a compact summary, "long" provides a detailed summary, and "str" prints the structure of the model.

score

A string specifying the score attribute to be displayed. Default is "fit_".

Details

- The "short" method provides a brief overview of the model with information such as the coefficients, intercept, decision boundary, and evaluation score (if available). - The "long" method gives a more detailed version of the model summary, including the coefficients for both positive and negative terms, along with other model attributes such as learner type, language, and sparsity. - The "str" method prints the structure of the model using the 'str()' function.

If a SOTA (state-of-the-art) model is provided, the function adjusts the output accordingly, displaying the model's coefficients and attributes in a simplified format.

Value

A string representing the model summary in the chosen format.

Author(s)

Edi Prifti (IRD)

Examples

## Not run: 
# Assuming 'mod' is a trained model
printModel(mod, method = "short", score = "fit_")

## End(Not run)


predomics/predomicspkg documentation built on Dec. 11, 2024, 11:06 a.m.