summary.pps: Summarizing Predictive Power Score

View source: R/pps.R

summary.ppsR Documentation

Summarizing Predictive Power Score

Description

print and summary method for "pps" class.

Usage

## S3 method for class 'pps'
summary(object, ...)

Arguments

object

an object of class "pps", usually, a result of a call to pps().

...

further arguments passed to or from other methods.

Details

summary.pps compares the PPS by variables.

See Also

pps, plot.pps.

Examples


library(dplyr)

# pps type is generic ======================================
pps_generic <- pps(iris)
pps_generic

# summary pps class 
mat <- summary(pps_generic)
mat

# pps type is target_by =====================================
##-----------------------------------------------------------
# If the target variable is a categorical variable
# Using dplyr
pps_cat <- iris %>% 
  target_by(Species) %>% 
  pps()

pps_cat

# summary pps class 
tab <- summary(pps_cat)
tab

##-----------------------------------------------------------
# If the target variable is a numerical variable
num <- target_by(iris, Petal.Length)

pps_num <- pps(num)
pps_num

# summary pps class 
tab <- summary(pps_num)
tab



dlookr documentation built on July 9, 2023, 6:31 p.m.