R/gap.R

Defines functions gap

Documented in gap

gap <-
function(sl_p=1,sl_n=1)
{ 
    if(sl_n==0)
	{	 
		return(0)
	}
	else if(sl_p==sl_n)
		{
			return(runif(1,0,1))
		}
		else if(sl_p>sl_n)
			{
			    return(runif(1,0,sl_n/sl_p))
			}
			else
			{
				return(runif(1,1-(sl_p/sl_n),1))
			}
}

Try the smotefamily package in your browser

Any scripts or data that you put into this service are public.

smotefamily documentation built on May 30, 2019, 9:01 a.m.