What is a stratified bootstrap?

I studied bootstrap and stratification. But what is a stratified bootstrap? And how does it work?

Suppose we have a data set of n instances (observations), and m is the number of classes. How should I split the data set, and what percentage for training and testing?

+6
source share
1 answer

You divided your data set into a class. After that, you take a sample from each subgroup independently. The number of copies that you select from one subgroup should be proportional to its share.

 data
 d(i) <- { x in data | class(x) =i }
 for each class
    for j = 0..samplesize*(size(d(i))/size(data))
       sample(i) <- draw element from d(i)
 sample <- U sample(i)

{'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b'}, , b .

+4

Source: https://habr.com/ru/post/1628220/


All Articles