bugGNU Octave - Bugs: bug #66025, movfun: implement SamplePoints...

 
 

bug #66025: movfun: implement SamplePoints option

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Fri 26 Jul 2024 12:46:42 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 Operating System:  * Any
Fixed Release:  10.1.0 (current default) Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 25 Oct 2024 08:23:34 PM UTC, comment #6: 

Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Thu 26 Sep 2024 01:26:04 AM UTC, comment #5: 

after updating all of the movXYZ functions i noticed a few build in an "Endpoints", # option for efficiency vs 'using default shrink. This hits an error if non-uniform samplepoints are defined as the two aren't compatible. added a check to avoid that. pushed to default as

https://hg.savannah.gnu.org/hgweb/octave/rev/a70dacb39639

Nicholas Jankowski <nrjank>
Group Member
Tue 03 Sep 2024 04:02:28 PM UTC, comment #4: 

missed the isempty check on dim inputs to allow common syntax from var and std causing a few regressions.  quick fix, added a BIST for this case, passes make check now (no fails OR regressions). pushed as
https://hg.savannah.gnu.org/hgweb/octave/rev/ee5f9ce4375e

Nicholas Jankowski <nrjank>
Group Member
Tue 03 Sep 2024 01:31:18 AM UTC, comment #3: 

revision of movfun pushed as
https://hg.savannah.gnu.org/hgweb/octave/rev/8b0099858d35

that replaces the inputParser checks with manual input checking and error messages. previously i had added a fixme noting that the various inputparser elements were consuming ~25-30% of runtime. This is likely from inputParser being m-code as well as the input validation checks being done as anonymous functions, which are known to add nontrivial overhead.

Additionally, the input validation error messages from inputParser are rather uninformative. when choosing between:


>> movfun (@sum, 1:10, 3, "Endpoints", "foo")
error: movfun: failed validation of 'Endpoints'.  Checked with "@(x) any (strcmpi (x, valid_bc)) || (isnumeric (x) && isscalar (x))"

and

>> movfun (@sum, 1:10, 3, "Endpoints", "b")
error: movfun: ENDPOINTS must be a numeric scalar or a valid Endpoint method
error: called from
    movfun at line 227 column 13


I think the latter is preferable.  If there's a way to get better messaging directly from inputParser i haven't found it other than writing separate, individual, subfunctions to use for the checks, and at that point writing the faster parsing isn't much harder.

Nicholas Jankowski <nrjank>
Group Member
Sun 01 Sep 2024 07:33:16 AM UTC, comment #2: 

bug #66156 created to track nanflag work.

Nicholas Jankowski <nrjank>
Group Member
Sun 01 Sep 2024 07:22:15 AM UTC, comment #1: 

Samplepoints option implementation in movslice and movfun pushed to default as https://hg.savannah.gnu.org/hgweb/octave/rev/b541ead8c01c

The nanflag option would be best implemented by passing that option through to the underlying builtin functions. I believe all of the MATLAB base functions have that option, while they're still pending on many of ours.  I'm going to move that option to a separate report for tracking.

Marking this one as ready for test.

Nicholas Jankowski <nrjank>
Group Member
Fri 26 Jul 2024 12:46:42 AM UTC, original submission:  

creating this as a placeholder for implementing the two unimplemented options for the moving window functions:  SamplePoints which applies the window length against a non-uniform  grid, and nanflag, which allows it to include/exclude NaN elements. 

both have 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.  SamplePoints creates the possibility that each window may include a different number of points, and nanflag creates a possibility that each column includes a different number of points. so right away they create issues with efficient parallel operation.

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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-25 rik5 StatusReady For Test Fixed
    2024-10-25 rik5 Open/ClosedOpen Closed
    2024-10-25 rik5 Fixed ReleaseNone 10.1.0 (current default)
    2024-09-01 nrjank Summarymovfun: implement SamplePoints and option movfun: implement SamplePoints option
    2024-09-01 nrjank StatusNone Ready For Test
        Summarymovfun: implement SamplePoints and nanflag options movfun: implement SamplePoints and option

    Back to the top

    Powered by Savane 3.14-8e77.
    Corresponding source code