bugGNU Octave - Bugs: bug #66996, (tisean) pca.m test should use...

 
 

bug #66996: (tisean) pca.m test should use absolute tolerance when expected value is 0

Submitter:  Dmitri A. Sergatskov <dasergatskov>
Submitted:  Sun 06 Apr 2025 10:20:03 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Release: 
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 06 Apr 2025 10:20:03 PM UTC, original submission:  

The following test (in pca.m from tesean) is failing:

%!test
%! a = (1:10).';
%! b = [0; 0; 0; 1; 1; 0; 0; 1; 0; 0];
%! res = [1.000000e+00, -5.551115e-17; 2.000000e+00, -5.551115e-17; 3.000000e+00, -5.551115e-17; 4.000000e+00, 1.000000e+00; 5.000000e+00, 1.000000e+00; 6.000000e+00, -5.551115e-17; 7.000000e+00, -1.110223e-16; 8.000000e+00, 1.000000e+00; 9.000000e+00, -5.551115e-17; 1.000000e+01, -1.110223e-16];
%! [eval, evec, ts] = pca ([a,b], 'w');
%! assert (ts, res, -1e-6);


The tolerance in the last "assert" should be absolute (i.e. the last parameter should be positive) since the expected values are all near zero.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>

 

(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 dasergatskov (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-962f.
    Corresponding source code