n_dup_max | R Documentation |
The function to calculate the maximum round each sampling is repeated, if dup_size is given as 0 then, it calculates the maximum round the number of positive instances to be duplicated to nearly match the number of negative instances
n_dup_max(size_input, size_P, size_N, dup_size = 0)
size_input |
The size of overall dataset |
size_P |
The number of positive instances |
size_N |
The number of negative instances |
dup_size |
A number or vector of the number of times to be duplicated. The default is zero which means duplicating until nearly balanced. |
If dup_size is zero or contains zero, the number of rounds to duplicate positive to nearly equal to the number of negative instances If dup_size is not zero or contains no zero, the maximum value in dup_size
Wacharasak Siriseriwan <wacharasak.s@gmail.com>
data_example = sample_generator(10000,ratio = 0.80)
P = data_example[data_example[,3]=="p",-3]
N = data_example[data_example[,3]=="n",-3]
D = rbind(P,N)
max_round =n_dup_max(nrow(D),nrow(P),nrow(N),dup_size= 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.