leibinghe / GAAL-based-outlier-detection

GAAL-based Outlier Detection
131 stars 58 forks source link

Why the noise sizes for sub-generators are not the same? #5

Open pancodia opened 2 years ago

pancodia commented 2 years ago

https://github.com/leibinghe/GAAL-based-outlier-detection/blob/090bcdf21f158e66d66dea8ac56e400ced82e254/MO-GAAL.py#L125-L135

Thanks for sharing the source code. I am wondering why the noise sizes are not the same for all sub-generators (see my code below)? Is this intentional? Maybe I missed something in the paper.

batch_size = 500
k = 10

for i in range(k): 
    start = int((((k + (k - i + 1)) * i) / 2) * (batch_size // block))
    if i < k-1:
        end = int((((k + (k - i)) * (i + 1)) / 2) * (batch_size // block))
    else:
        end = batch_size
    print(i, start, end, end-start+1)
0 0 90 91
1 90 171 82
2 171 243 73
3 243 306 64
4 306 360 55
5 360 405 46
6 405 441 37
7 441 468 28
8 468 486 19
9 486 500 15