octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55100] [octave forge] (image) Unit test in no


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #55100] [octave forge] (image) Unit test in normxcorr2 fails randomly
Date: Wed, 28 Nov 2018 23:49:22 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Follow-up Comment #3, bug #55100 (project octave):

I thought also that factor of 4 will suffice, but using the following simple
script


Nm = 0;
cnt = 0;
for i=1:10000000
a = rand (10, 10);
c = normxcorr2 (a(5:7, 6:9), a);
f = abs(c(7,9)-1)/eps;
if (f > 20)
    cnt++;
    fprintf (" i = %d cnt = %d f = %g\n", i, cnt, f);
end    
if (f > Nm)
  Nm = f;
  fprintf (" i = %d Nm = %g\n", i, Nm);
end
end


shows that if I make 10,000,000 tests, the factor should be 42 (the answer
to...), and in 21 cases out of 10,000,000,  a factor of 20 will not suffice. 
The question is if we can allow a few random failures (21 out of 10,000,000 is
realy negligible), or we should use a factor that the test will never fail.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55100>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]