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

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

[Octave-bug-tracker] [bug #65178] [octave forge] (statistics) pdist2 BIS


From: Rafael Laboissière
Subject: [Octave-bug-tracker] [bug #65178] [octave forge] (statistics) pdist2 BIST failures
Date: Wed, 17 Jan 2024 12:44:02 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?65178>

                 Summary: [octave forge] (statistics) pdist2 BIST failures
                   Group: GNU Octave
               Submitter: rlaboiss
               Submitted: Wed 17 Jan 2024 05:44:01 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: other
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 17 Jan 2024 05:44:01 PM UTC By: Rafael Laboissière <rlaboiss>
In version 1.6.1 of the statistics package, two of the BISTs in  the pdist2.m
file:


octave:1> pkg load statistics
octave:2> test pdist2 verbose
***** test
 d = [1.2247, 2.4495, 4.4159; 2.1213, 4.2426, 6.1237];
 i = [2, 2, 2; 1, 4, 4];
 [D, I] = pdist2 (y, x, "mahalanobis", "smallest", 2);
 assert ({D, I}, {d, i}, 1e-4);
!!!!! test failed
ASSERT errors for:  assert (cond {i},expected {i},tol)

  Location  |  Observed  |  Expected  |  Reason
   (2,2)          1            4         Abs err 3 exceeds tol 0.0001 by 3
shared variables     x =

       1   1   1
       2   2   2
       3   3   3

    y =

       0   0   0
       1   2   3
       0   2   4
       4   7   1

    xx =

       1   2   3
       4   5   6
       7   8   9
       3   2   1

***** test
 d = [3.2404, 4.8990, 6.8191; 2.7386, 4.2426, 6.3640];
 i = [3, 3, 3; 4, 1, 1];
 [D, I] = pdist2 (y, x, "mahalanobis", "largest", 2);
 assert ({D, I}, {d, i}, 1e-4);
!!!!! test failed
ASSERT errors for:  assert (cond {i},expected {i},tol)

  Location  |  Observed  |  Expected  |  Reason
   (2,2)          4            1         Abs err 3 exceeds tol 0.0001 by 3
shared variables     x =

       1   1   1
       2   2   2
       3   3   3

    y =

       0   0   0
       1   2   3
       0   2   4
       4   7   1

    xx =

       1   2   3
       4   5   6
       7   8   9
       3   2   1


Indeed, we have this:


octave:3> d = [1.2247, 2.4495, 4.4159; 2.1213, 4.2426, 6.1237];
octave:4> i = [2, 2, 2; 1, 4, 4];
octave:5> [D, I] = pdist2 (y, x, "mahalanobis", "smallest", 2);
octave:6> disp (I)
   2   2   2
   1   1   4
octave:7> disp (i)
   2   2   2
   1   4   4









    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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