Skip to content

Commit f3a04ac

Browse files
committed
using stratified splitobs in microtc
1 parent 3827b80 commit f3a04ac

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/utils.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ function microtc(
6464
)
6565

6666
(traincorpus, trainlabels), (testcorpus, testlabels) = if sample < 1.0
67-
obs = randobs((corpus, labels), ceil(Int, length(labels) * sample))
68-
splitobs(obs; at)
67+
splitobs(obs; at, shuffle=true, stratified=labels)
6968
else
7069
splitobs((corpus, labels); at, shuffle=true)
7170
end

0 commit comments

Comments
 (0)