patchGNU Octave - Patches: patch #10050, [octave forge] (statistics) Add...

 
 

patch #10050: [octave forge] (statistics) Add function datasample

Submitter:  None
Submitted:  Sun 28 Mar 2021 05:33:33 PM UTC
   
 
Category:  Forge : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  philipnienhuis Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 23 Nov 2021 08:31:01 PM UTC, comment #3: 

been a few months, assuming we can close this now.

Nicholas Jankowski <nrjank>
Group Member
Sat 24 Jul 2021 04:39:47 PM UTC, comment #2: 

Pushed here:
http://hg.code.sf.net/p/octave/statistics/rev/32e99b257f0e
with a few edits:

  • Capitalize argument DIM in error message so that it matches the texinfo help
  • added two simple tests to check if basic sampling works at all
  • added a test to check if 'k' is numeric in the first place
  • added randsample to the seealso macro (that's quite like datasample).


Trying examples from Matlab's online docs I saw they also support two instead of one input array. I didn't dive into it, datasample.m as it stand works fine, maybe something for later.

Thanks Stefano for this contribution as well!

Setting status to 'Ready for test' for a while.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 26 Apr 2021 04:34:40 PM UTC, comment #1: 

I just added a new patch with an improved algorithm for the weighted sampling.

(file #51322)

Anonymous
Sun 28 Mar 2021 05:33:33 PM UTC, original submission:  

This patch adds the "datasample" function to extract some random data from a dataset.

It cannot use random number streams, but otherwise mimics its MATLAB counterpart fairly well.


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51322:  datasample.2.diff added by None (8KiB - text/x-patch - improved algorithm)
file #51153:  datasample.diff added by None (8KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -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 logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-23 nrjank StatusReady For Test Done
        Open/ClosedOpen Closed
    2021-07-24 philipnienhuis Carbon-Copy- Added philipnienhuis
    2021-07-24 philipnienhuis StatusIn Progress Ready For Test
    2021-07-21 philipnienhuis StatusNone In Progress
        Assigned toNone philipnienhuis
    2021-04-26 None Attached File- Added datasample.2.diff, #51322
    2021-03-28 None Attached File- Added datasample.diff, #51153

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code