qtile_plot: Ratio of target categories in binned numeric predictor

Description Usage Arguments Value Examples

View source: R/data_viz.R

Description

Plot the ratio of categories of target labels inside different bins created based on quantiles for numeric features

Usage

1
qtile_plot(data, x_feat, y_feat, quantile = 4)

Arguments

data

Name of the data frame object

x_feat

Name of the predictor of the interest

y_feat

Name of the target feature

quantile

Number of quantiles to be used to bin the numeric feature

Value

Returns three outputs:

  1. Quantile boundaries,

  2. Total records in each quantiles based bin,

  3. A line plot showing ratio in different bins. The output of the function can be passed to plotly to generate interactive plot

Examples

1
2
library(tidyverse)
qtile_plot(iris, Sepal.Length, Species, 4)

Curious-Joe/mixBag documentation built on Aug. 30, 2021, 6:48 p.m.