Skip to content

Commit

Permalink
Use the same test for AlizadehArghami as for the remaining estimators
Browse files Browse the repository at this point in the history
  • Loading branch information
kahaaga committed Aug 20, 2023
1 parent 401fb2e commit e837681
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/infomeasures/estimators/alizadeharghami.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e837681

Please sign in to comment.