bugGNU Octave - Bugs: bug #66256, movmad uses 'mean absolute...

 
 

bug #66256: movmad uses 'mean absolute deviation', matlab uses 'median absolute deviation'

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Thu 26 Sep 2024 01:30:25 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Ready For Test Assigned to:  nrjank
Originator Name:  Open/Closed:  * Open
Release:  * 9.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Sep 2024 01:41:57 AM UTC, comment #1: 

pushed https://hg.savannah.gnu.org/hgweb/octave/rev/803e6fc006ed to default.  patch changes the default from mean to median.  it adds an optional mode input that allows the user to select median or mean. the option is stripped from varargin before passing the call to movfun, with fcn being either "@mad" or "@(x) mad (x, 1)". adds tests, doc notes, news note.

So this makes the code compatible, ands an extension to let octave continue calling a moving mean absolute deviation which matlab doesn't have. it's been 8 years, but if they add it later, this method of enabling the selection should be adaptable to whatever they later do.

marking as ready for test.

Nicholas Jankowski <nrjank>
Group Member
Thu 26 Sep 2024 01:30:25 AM UTC, original submission:  

while both matlab and octave's mad functions default to mean abs deviation and have an option to do median abs deviation,  the movfun versions do not have the option.  Just noticed when verifying other movfun bists that matlab uses median, while octave's was built to use mean.   working on a patch to switch to median, but might also add a flag to allow the user to choose. if it's too cumbersome, will just note the change in the news and help and direct people wanting the old incompatible behavior to use movfun directly.

Nicholas Jankowski <nrjank>
Group Member

 

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

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-09-27 nrjank StatusIn Progress Ready For Test

    Back to the top

    Powered by Savane 3.13-5884.
    Corresponding source code