@@ -13,14 +13,9 @@ struct AsymptoticBlockSKCETest{K<:Kernel,E,S,Z} <: HypothesisTests.ZTest
1313 z:: Z
1414end
1515
16- function AsymptoticBlockSKCETest (skce:: BlockUnbiasedSKCE , data... )
17- return AsymptoticBlockSKCETest (skce. kernel, skce. blocksize, data... )
18- end
19-
20- function AsymptoticBlockSKCETest (kernel:: Kernel , blocksize:: Int , data... )
21- # obtain predictions and targets
22- predictions, targets = CalibrationErrors. predictions_targets (data... )
23-
16+ function AsymptoticBlockSKCETest (
17+ kernel:: Kernel , blocksize:: Int , predictions:: AbstractVector , targets:: AbstractVector
18+ )
2419 # obtain number of samples
2520 nsamples = length (predictions)
2621 nsamples ≥ blocksize || error (" there must be at least " , blocksize, " samples" )
@@ -32,9 +27,7 @@ function AsymptoticBlockSKCETest(kernel::Kernel, blocksize::Int, data...)
3227 # evaluate U-statistic of the first block
3328 istart = 1
3429 iend = blocksize
35- x = CalibrationErrors. unbiasedskce (
36- kernel, view (predictions, istart: iend), view (targets, istart: iend)
37- )
30+ x = UnbiasedSKCE (kernel)(view (predictions, istart: iend), view (targets, istart: iend))
3831
3932 # initialize the estimate and the sum of squares
4033 estimate = x / 1
@@ -45,9 +38,7 @@ function AsymptoticBlockSKCETest(kernel::Kernel, blocksize::Int, data...)
4538 # evaluate U-statistic
4639 istart += blocksize
4740 iend += blocksize
48- x = CalibrationErrors. unbiasedskce (
49- kernel, view (predictions, istart: iend), view (targets, istart: iend)
50- )
41+ x = UnbiasedSKCE (kernel)(view (predictions, istart: iend), view (targets, istart: iend))
5142
5243 # update the estimate
5344 Δestimate = x - estimate
0 commit comments