Learn R Programming

filtro (version 0.2.0)

show_best_score_dual: Show best score, based on number or proportion of predictors with optional cutoff value (singular)

Description

Show best score, based on number or proportion of predictors with optional cutoff value (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.

prop_terms

A numeric value specifying the proportion of predictors to consider.

num_terms

An integer value specifying the number of predictors to consider.

cutoff

A numeric value specifying the cutoff value.

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_dual(prop_terms = 0.5)
ames_aov_pval_res |> show_best_score_dual(prop_terms = 0.5, cutoff = 130)

ames_aov_pval_res |> show_best_score_dual(num_terms = 2)
ames_aov_pval_res |> show_best_score_dual(num_terms = 2, cutoff = 130)

Run the code above in your browser using DataLab