bugGNU Octave - Bugs: bug #66156, Implement nanflag option for...

 
 

bug #66156: Implement nanflag option for moving window functions

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Sun 01 Sep 2024 07:29:27 AM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 9.2.0 Release: 
Operating System:  * Any Fixed Release:  10.1.0
Planned Release:  10.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 25 Oct 2024 08:22:08 PM UTC, comment #3: 

This changeset looks good.  I made a few minor formatting tweaks in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/8ab9ad17d3ac) to more closely follow Octave core conventions.

Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Wed 25 Sep 2024 12:24:11 PM UTC, comment #2: 

pushed https://hg.savannah.gnu.org/hgweb/octave/rev/7240bee8836e
to default which implements a fully compatible nancond property.  omitnan properly ignores nan and na values.  includenan behavior has been updated to be compatible, now any nan or na in a window causes that window calculation to return NaN rather than passing it to the calculating function to decide.  Also set the defaults for movmin, movmax, movsum, and movprod to match omitnan compatible behavior. min and max now default to omitnan, and sum and prod return 0 and 1, respectively, instead of NaN for all-NaN windows. Added an optional `nanval` property to movfun to allow for that feature.   changes overhauled much of the movfun code. much redundant code moved to subfunctions, etc.  BISTs created and docs updated. passes a make check. 

marking as Ready for test.

Nicholas Jankowski <nrjank>
Group Member
Wed 04 Sep 2024 02:31:14 PM UTC, comment #1: 

minor compatibility change.  pushed

https://hg.savannah.gnu.org/hgweb/octave/rev/39a34a70c3ea

to default to enable omit/includemissing options as aliases for omit/includenan.  movfun had previously had the input validation updated to check for this, but this updates _pars_movargs_.m so that they are passed by movXYZ functions to movfun.

Nicholas Jankowski <nrjank>
Group Member
Sun 01 Sep 2024 07:29:27 AM UTC, original submission:  

creating this as a placeholder for implementing the nanflag options for the moving window functions that allows them to include/exclude NaN elements.

This has been implemented in the moving function options for `fillmissing` in the statistics package, but the base functions are rather different so it may not be straightforward to port into movfun. nanflag creates a possibility that each column includes a different number of points. so efficient operation is a challenge. Many of the base functions (sum, etc, etc) have nanflag options that movfun could just pass the flag to, but the option isn't implemented for all of them, and octave having a generic movfun means that would have to support nanflag internally. This might warrant separate codepaths for built in fns

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 rik5 (Posted a comment)
  • -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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-25 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 10.1.0
    2024-09-25 nrjank StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.15-64aa.
    Corresponding source code