You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 21, 2022. It is now read-only.
Would be nice to have a new data iterator that samples the given data in such a way, that each iteration a batch is returned that contains an equal amount of observations from each class (no matter the class distribution)
X =rand(2, 6) # some features
y = [:a, :a, :a, :a, :b, :b]
for (xbatch, ybatch) inBalancedBatches((X, y), size =2, count =10)
# ybatch is always either [:a, :b] or [:b, :a]end
Would be nice to have a new data iterator that samples the given data in such a way, that each iteration a batch is returned that contains an equal amount of observations from each class (no matter the class distribution)
RandomBatches
for an example of a batch iterator https://github.com/JuliaML/MLDataPattern.jl/blob/master/src/dataiterator.jlstratifiedobs
for an example of how to compute the indices of the observations that belong to each class (look howlabelmap
is used)The text was updated successfully, but these errors were encountered: