|
| From: | anonymous |
| Subject: | [Octave-bug-tracker] [bug #58334] pdist2 giving wrong distances |
| Date: | Fri, 8 May 2020 07:50:14 -0400 (EDT) |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.132 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?58334>
Summary: pdist2 giving wrong distances
Project: GNU Octave
Submitted by: None
Submitted on: Fri 08 May 2020 11:50:12 AM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email: address@hidden
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
A small example:
X = [0.25016 0.40176 0.18690
0.48684 0.67867 0.55511
0.35095 0.43696 0.26798
0.48223 0.58751 0.90527
0.60076 0.11600 0.12838
0.78479 0.88859 0.55260
0.48078 0.27091 0.81413
0.30470 0.91434 0.88039
0.76428 0.14590 0.59941
0.62366 0.59127 0.85512]
Y = [0.774411 0.429394 0.546792
0.143279 0.040654 0.502580
0.076307 0.342643 0.750640
0.961380 0.782662 0.666286
0.922622 0.783488 0.466200]
D = pdist2(X, Y)
Correct result from Matlab:
D =
Columns 1 through 3
0.636494305254179 0.491401011188418
0.592893306504636
0.380663622297955 0.726538352653871
0.565405579843355
0.507062712315745 0.50519585298872
0.56328070225954
0.488750327571246 0.759011529054072
0.498641922142533
0.550853039186497 0.595811652350808
0.844763580096822
0.459350000458256 1.06444061535484
0.916092860848724
0.427558123137662 0.513797774457033
0.415662135776161
0.753052901223413 0.965465878183688
0.629154897269345
0.288513672329406 0.637255844553033
0.731358441311782
0.379467862883011 0.81131272405713
0.610185842295607
Columns 4 through 5
0.938472780106061 0.822149559038987
0.498359960911789 0.456943927356519
0.806710807749593 0.697267307973061
0.569896813344311 0.652023738101612
0.929423408076212 0.814406366372464
0.235221758942492 0.193672534521548
0.717442902146227 0.760930906159028
0.703141693330725 0.755316622409437
0.669915408107621 0.670324959111624
0.431675776040305 0.526863173288853
Wrong result from pdist2 (statistics package):
D =
0.00000 0.09657 0.00000 0.53190 0.40468
0.00000 0.62852 0.24792 0.00000 0.00000
0.18624 0.28602 0.18322 0.59750 0.50986
0.91063 0.95838 0.95890 1.09129 1.07915
0.99667 0.69867 0.85966 1.29805 1.20277
0.58019 1.06320 1.02563 0.61461 0.60706
0.71440 0.56953 0.45477 0.96065 0.98533
0.00000 0.87073 0.55589 0.00000 0.00000
0.28851 0.63726 0.73136 0.66992 0.67032
0.37947 0.81131 0.61019 0.43168 0.52686
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58334>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |