qcut: Compute the quantiles

Description Usage Arguments Value See Also Examples

View source: R/metrics.R

Description

Compute the quantiles.

Usage

1
qcut(data, prob = "prob", nb_quantiles = 20L)

Arguments

data

A dataframe with the probabilities for the positive class.

prob

A string (default = "prob"). The column's name of the predicted probabilities.

nb_quantiles

An integer (default = 20). The number of quantiles to compute.

Value

A dataframe with the quantiles computed.

See Also

compute_lift, draw_lift

Examples

1
2
3
4
5
6
7
data <- data.frame(
  obs = c(rep("Yes", 20), rep("No", 20)),
  prob = c(runif(n = 20, min = 0.3, max = 0.8),
           runif(n = 20, min = 0.1, max = 0.6))
)

quantiles <- qcut(data, prob = "prob")

thoera/metrics documentation built on Nov. 20, 2019, 2:01 p.m.