smotefamily (version 1.3.1)

gap: The function to provide a random number which is used as a location of synthetic instance

Description

The function to provide a random number which uses to identify the location of each synthetic instance. The interval of possible values depends from safe-level values of instances in a pair.

Usage

gap(sl_p = 1, sl_n = 1)

Value

A value between 0 to 1 which is used to identify the location of synthetic instance If sl_p >= sl_n, it gives the random number between 0 to sl_n/sl_p If sl_p < sl_n, it gives the random number between 1-sl_p/sl_n to 1

Arguments

sl_p

The safe-level value of the first instance

sl_n

The safe-level value of the second instance

Author

Wacharasak Siriseriwan <wacharasak.s@gmail.com>

Examples

Run this code

	r_num = gap()
	r_num_2 = gap(sl_p = 4, sl_n = 2)

Run the code above in your browser using DataLab