knnSURF.balanced: knnSURF.balanced

View source: R/utils.R

knnSURF.balancedR Documentation

knnSURF.balanced

Description

Theoretical value for the number of expected neighbors for SURF or multiSURF (fixed or adaptive radius) neighborhoods, but adjusted for imbalanced data. We use our theoretical formula with twice the size of the minority class as the input sample size.

Usage

knnSURF.balanced(class.vec, sd.frac = 0.5)

Arguments

class.vec

vector of class labels to determine the minimum class size.

sd.frac

fraction of the standard deviation from the mean of all pairwise distances, dead-band. The default value used by the SURF and multiSURF algorithms is 1/2.

Value

knn Theoretical number of neighbors.

Examples

k.surf.bal <- knnSURF.balanced(class.vec, .5)

insilico/glmSTIR documentation built on July 7, 2023, 12:29 a.m.