diff --git a/test/RandomFeature/runtests.jl b/test/RandomFeature/runtests.jl index b7e5c3d6..ad746fbe 100644 --- a/test/RandomFeature/runtests.jl +++ b/test/RandomFeature/runtests.jl @@ -118,6 +118,12 @@ rng = Random.MersenneTwister(seed) good_cov = shrinkage_cov(samples) @test (cond(good_cov) < 1.1) && ((good_cov[1] < 1.2) && (good_cov[1] > 0.8)) + # test NICE utility + samples = rand(MvNormal(zeros(100), I), 20) + # normal condition number should be huge around 10^18 + # nice cov will have improved conditioning, does not perform as well at this task as shrinking so has looser bounds + good_cov = nice_cov(samples) + @test (cond(good_cov) < 100) && ((good_cov[1] < 1.5) && (good_cov[1] > 0.5)) end