user_span_cutpointr: Calculate bandwidth for LOESS smoothing of metric functions...

View source: R/optimize_metric.R

user_span_cutpointrR Documentation

Calculate bandwidth for LOESS smoothing of metric functions by rule of thumb

Description

This function implements a rule of thumb for selecting the bandwidth when smoothing a function of metric values per cutpoint value, particularly in maximize_loess_metric and minimize_loess_metric.

Usage

user_span_cutpointr(data, x)

Arguments

data

A data frame

x

The predictor variable

Details

The function used for calculating the bandwidth is 0.1 * xsd / sqrt(xn), where xsd is the standard deviation of the unique values of the predictor variable (i.e. all cutpoints) and xn is the number of unique predictor values.


cutpointr documentation built on April 14, 2022, 1:06 a.m.