imbalanceRatio: Compute imbalance ratio of a binary dataset

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Given a two-class dataset, it computes its imbalance ratio as {Size of minority class}/{Size of majority class}

Usage

1
imbalanceRatio(dataset, classAttr = "Class")

Arguments

dataset

A target data.frame to compute its imbalance ratio

classAttr

A character containing the class name attribute.

Value

A real number in [0,1] representing the imbalance ratio of dataset

Examples

1
2
3
data(glass0)

imbalanceRatio(glass0, classAttr = "Class")

imbalance documentation built on Feb. 19, 2018, 1:03 a.m.