From e8376811a5201e32b16fc45d7c0dadead5f65852 Mon Sep 17 00:00:00 2001 From: Kristian Haaga Date: Sun, 20 Aug 2023 23:46:36 +0200 Subject: [PATCH] Use the same test for AlizadehArghami as for the remaining estimators --- test/infomeasures/estimators/alizadeharghami.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/infomeasures/estimators/alizadeharghami.jl b/test/infomeasures/estimators/alizadeharghami.jl index 444397725..a01779908 100644 --- a/test/infomeasures/estimators/alizadeharghami.jl +++ b/test/infomeasures/estimators/alizadeharghami.jl @@ -14,8 +14,10 @@ N = round(0.5*log(2π) + 0.5, digits = 2) N_base3 = ComplexityMeasures.convert_logunit(N, ℯ, 3) npts = 1000000 +ea = information(AlizadehArghami(m = 100), rand(npts)) +ea_n = information(AlizadehArghami(Shannon(base = ℯ), m = 100), randn(npts)) +ea_n3 = information(AlizadehArghami(Shannon(base = 3), m = 100), randn(npts)) -ea = information(AlizadehArghami(Shannon(), m = 100), rand(npts)) -ea_n3 = information(AlizadehArghami(m = 100, base = 3), randn(npts)) +@test U - max(0.02, U*0.03) ≤ ea ≤ U + max(0.01, U*0.03) +@test N * 0.96 ≤ ea_n ≤ N * 1.02 @test N_base3 * 0.96 ≤ ea_n3 ≤ N_base3 * 1.02 -@test U - max(0.01, U*0.03) ≤ ea ≤ U + max(0.01, U*0.03)