Learn R Programming

filtro (version 0.2.0)

show_best_score_num: Show best score, based on number of predictors (singular)

Description

Show best score, based on number of predictors (singular)

Value

A tibble of score results.

Arguments

x

A score class object (e.g., score_cor_pearson).

...

Further arguments passed to or from other methods.

num_terms

An integer value specifying the number of predictors to consider.

Examples

Run this code

library(dplyr)

ames_subset <- modeldata::ames |>
  dplyr::select(
    Sale_Price,
    MS_SubClass,
    MS_Zoning,
    Lot_Frontage,
    Lot_Area,
    Street
  )
ames_subset <- ames_subset |>
  dplyr::mutate(Sale_Price = log10(Sale_Price))

ames_aov_pval_res <-
  score_aov_pval |>
  fit(Sale_Price ~ ., data = ames_subset)
ames_aov_pval_res@results

# Show best score
ames_aov_pval_res |> show_best_score_num(num_terms = 2)

Run the code above in your browser using DataLab