bugGNU Octave - Bugs: bug #58334, [octave forge] (statistics) pdist2...

 
 

bug #58334: [octave forge] (statistics) pdist2 giving wrong distances

Submitter:  None
Submitted:  Fri 08 May 2020 11:50:12 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.2.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 09 May 2020 09:42:14 PM UTC, comment #8: 

I have an Ubuntu 18.04 VM, and this is not reproducible there with Octave 5.2, installed with either flatpak or snap. There doesn't seem to be any bug here.

Is there anything more you can provide to show how to get the incorrect result that you demonstrate?

Mike Miller <mtmiller>
Group Member
Sat 09 May 2020 10:18:29 AM UTC, comment #7: 

Its Ubuntu 18.04.

Anonymous
Sat 09 May 2020 03:36:58 AM UTC, comment #6: 

What Linux distribution is it that shows the problem?  Is this possibly another case of the Ubunutu OpenBlas bug?

John W. Eaton <jwe>
Group administrator
Fri 08 May 2020 10:05:16 PM UTC, comment #5: 

This is unreproducible for me as well.

With Octave 5.2.0 installed and run with flatpak, I can install the statistics package from Octave Forge, and the results are the same as others have shown here:


>> D = pdist2 (X, Y)
D =

   0.63649   0.49140   0.59289   0.93847   0.82215
   0.38066   0.72654   0.56541   0.49836   0.45694
   0.50706   0.50520   0.56328   0.80671   0.69727
   0.48875   0.75901   0.49864   0.56990   0.65202
   0.55085   0.59581   0.84476   0.92942   0.81441
   0.45935   1.06444   0.91609   0.23522   0.19367
   0.42756   0.51380   0.41566   0.71744   0.76093
   0.75305   0.96547   0.62915   0.70314   0.75532
   0.28851   0.63726   0.73136   0.66992   0.67032
   0.37947   0.81131   0.61019   0.43168   0.52686


Mike Miller <mtmiller>
Group Member
Fri 08 May 2020 09:55:40 PM UTC, comment #4: 

I removed the flatpak and installed the snap package instead. Now octave is giving me the correct result.

Btw, in both variants (flatpak and snap) I couldn't install packages with pkg install ...

"error: pkg: failed to read package 'statistics': Couldn't resolve host name"

Instead, I installed the statistics package with pkg install statistics-1.4.2.tar.gz

Anonymous
Fri 08 May 2020 06:08:28 PM UTC, comment #3: 

In linux:


ctave:17> D = pdist2(X, Y)
D =

   0.63649   0.49140   0.59289   0.93847   0.82215
   0.38066   0.72654   0.56541   0.49836   0.45694
   0.50706   0.50520   0.56328   0.80671   0.69727
   0.48875   0.75901   0.49864   0.56990   0.65202
   0.55085   0.59581   0.84476   0.92942   0.81441
   0.45935   1.06444   0.91609   0.23522   0.19367
   0.42756   0.51380   0.41566   0.71744   0.76093
   0.75305   0.96547   0.62915   0.70314   0.75532
   0.28851   0.63726   0.73136   0.66992   0.67032
   0.37947   0.81131   0.61019   0.43168   0.52686

octave:18> version
ans = 5.2.0
octave:19> pkg list io
Package Name  | Version | Installation directory
--------------+---------+-----------------------
          io *|   2.6.1 | /home/jade/octave/io-2.6.1
octave:20> pkg list statistics
Package Name  | Version | Installation directory
--------------+---------+-----------------------
  statistics *|   1.4.2 | /home/jade/octave/statistics-1.4.2
octave:21>


John Donoghue <lostbard>
Group Member
Fri 08 May 2020 05:39:01 PM UTC, comment #2: 

Me too:


>> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
       image  |  2.12.0 | /home/philipp/octave/image-2.12.0
          io *|   2.6.1 | /home/philipp/octave/io-2.6.1
  statistics *|   1.4.2 | /home/philipp/octave/statistics-1.4.2


and

+verbatim

>> version

ans = 5.2.0
-verbatim-

I installed Octave as flatpak.

See also attached screenshot.


Anonymous
Fri 08 May 2020 05:22:48 PM UTC, comment #1: 

Which version of statistics are you using?

On my windows machine using statistics 1.4.2


D =

   0.6365   0.4914   0.5929   0.9385   0.8221
   0.3807   0.7265   0.5654   0.4984   0.4569
   0.5071   0.5052   0.5633   0.8067   0.6973
   0.4888   0.7590   0.4986   0.5699   0.6520
   0.5509   0.5958   0.8448   0.9294   0.8144
   0.4594   1.0644   0.9161   0.2352   0.1937
   0.4276   0.5138   0.4157   0.7174   0.7609
   0.7531   0.9655   0.6292   0.7031   0.7553
   0.2885   0.6373   0.7314   0.6699   0.6703
   0.3795   0.8113   0.6102   0.4317   0.5269


John Donoghue <lostbard>
Group Member
Fri 08 May 2020 11:50:12 AM UTC, original submission:  

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


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-24 mtmiller Open/ClosedOpen Closed
    2020-05-08 mtmiller StatusNeed Info Works For Me
    2020-05-08 lostbard StatusNone Need Info
    2020-05-08 siko1056 CategoryNone Octave Package
        Summarypdist2 giving wrong distances [octave forge] (statistics) pdist2 giving wrong distances

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code