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

 
 

patch #9925: [octave forge] (statistics) bootstrp, bootci and ibootci

Submitter:  Andrew Penn <acp29>
Submitted:  Wed 22 Apr 2020 04:28:56 PM UTC
   
 
Category:  Forge : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 27 Dec 2021 04:46:04 PM UTC, comment #11: 

👍🏼

Closing as done.

Markus Mützel <mmuetzel>
Group administrator
Mon 27 Dec 2021 02:51:33 AM UTC, comment #10: 

Wonderful! I also linked to your package from the Octave Wiki https://wiki.octave.org/Statistics_package

Nir Krakauer <nir_krakauer>
Sun 26 Dec 2021 11:16:31 PM UTC, comment #9: 

Hi all, in case you hadn't noticed this is now live and exists as the statistics-bootstrap package at https://gnu-octave.github.io/packages/

Thanks Nir for sign posting me there. We can consider this patch done 😊

Andrew Penn <acp29>
Mon 29 Nov 2021 06:51:11 PM UTC, comment #8: 

Yes, making your own package will very likely be quicker and easier, since you can do it without depending on the Statistics package and its maintainers. Then you can add it to our list so that it will be easier for users to discover it:
https://gnu-octave.github.io/packages/

Nir Krakauer <nir_krakauer>
Thu 25 Nov 2021 08:26:47 PM UTC, comment #7: 

Hi Nir,

Thanks for your reply. Ironically, ibootci and ibootp were single function files before bringing them to the octave forum but I had to break away many of the supporting functions (from inside ibootci.m and iboot.m) into separate files to make use of octaves parallel support (which is quite different from matlab), so it turned into something that looks more like a package in itself. I hadn't considered making a standalone octave package but if you think that's a good idea then I'll look into it. I'll take a look at the link and get back to you soon.

Though there are arguments to say it doesn't make much sense to make it a separate package (in some respect). Many of the functions (in the private and helper folders) are not supposed to be implemented by users and if it is possible to put them back at the bottom of the main function files and still use the parallel support then I'm all ears.

But if making it a package is easier and quicker then I'd rather do that. I think it would reach more users if it is integrated in octave than it just sitting in me github repo.
 
Best

Andy

Andrew Penn <acp29>
Thu 25 Nov 2021 12:49:13 AM UTC, comment #6: 

These functions would fit in the Statistics package thematically. However, since you are actively developing them as a suite, have you thought of offering them as your own package? Making an Octave package is not very complicated:
https://octave.org/doc/v6.4.0/Creating-Packages

Then, any Octave user can download and install your latest version with something like `pkg install url/to/package.tar.gz`
https://octave.org/doc/v6.4.0/Installing-and-Removing-Packages.html

Nir Krakauer <nir_krakauer>
Wed 02 Sep 2020 04:19:43 PM UTC, comment #5: 

Sorry for the delayed reply. The parallel implementation is an conditional dependency allowing users to switch parallel on to speed up  calculations of bootci if they so wish. Regarding your last point Philip, I added an ErrorHandler to the call to parcellfun to more gracefully exit the if there is a problem implementing parallel in Octave. In anycase parallel does work so long as the /iboot folder and the /iboot/helper folder are saved to octaverc (not just added temporarily to the session using addpath as I have just found out). I added a comment in the readme to this effect. These changes are all in the development version on GitHub.

Andrew Penn <acp29>
Sat 30 May 2020 05:08:15 PM UTC, comment #4: 

There is no statistics package maintainer other than "The Octave-Forge Community". Which is a bit of a vague concept.
So the advice would be to post in the maintainers ML to ask one of the devs there to review your contributions.

The functions now make use of the parallel package. Is that an unconditional dependency (or can they also run w/o the parallel package)? If yes (unconditiona), do they gracefully catch the missing parallel package?
I'm asking because a.o., on Windows the parallel package has some limitations; I don't know if your functions would be affected.

Philip Nienhuis <philipnienhuis>
Group Member
Fri 29 May 2020 05:52:58 PM UTC, comment #3: 

You can try contacting the statistics package maintainer or posting to the maintainers mailing list to get attention on this patch report. Many patches sit here and are forgotten for months or years unfortunately, it may take patience and persistence from both you and the package maintainer to get these functions added to the package.

Mike Miller <mtmiller>
Group Member
Thu 07 May 2020 08:13:40 AM UTC, comment #2: 

Hi all,

I have now added to ibootci a feature to calculate BCa type bootstrap confidence intervals and this is compatible with different dependence structures of the data and bootstrap iteration. This involved addition of two new private functions (BCa.m and jack.m). Minor fixes in other files too (including ibootci.m and BC.m) The up-to-date version is available at:

https://github.com/acp29/iboot/

I have been posting here info about this patch... but how does one actually go about adding it to the octave-forge package?

Best

Andy

Andrew Penn <acp29>
Thu 30 Apr 2020 12:01:09 PM UTC, comment #1: 

Hi all,

I just added Octave support for parallel computing to accelerate data resampling for the generation of bootstrap confidence intervals using the iboot functions (previously this was only supported using Matlab's 'parfor'). The parallel computing acceleration of bootci, ibootci and bootstrp in Octave depends on the parallel computing Octave Forge package. I hadn't anticipated the quirks of parallel computing using this package and found that I had to take subfunctions out of the ibootci code and make them separate helper function files for the client processors to see them. The updated bootci, ibootci and bootstrp files (along with required helper and private functions) can be found at:

https://github.com/acp29/iboot

(The three files posted orginally are now out-of-date)

Best

Andy Penn

Andrew Penn
Sussex Neuroscience
School of Life Sciences
University of Sussex
Brighton BN1 9QG
United Kingdom

Tel: +44 (0)1273 877049
E-mail: -email is unavailable-

http://www.sussex.ac.uk/lifesci/pennlab/

Andrew Penn <acp29>
Wed 22 Apr 2020 04:28:56 PM UTC, original submission:  

Hi there,

I noticed that the Octave Forge 'Statistics' package currently doesn't have Matlab's bootstrp and bootci functions for bootstrap resampling and calculating bootstrap confidence intervals.

https://wiki.octave.org/Statistics_package

I have written a bootstrap confidence interval function compatible with Octave/Matlab called ibootci.m, which is available on GitHub

https://github.com/acp29/iboot/blob/master/ibootci.m

From a user perspective it has much the same syntax as Matlab's bootci function but has extended capabilities (double bootstrap) and extra functionality (some support for complicated dependence structures and improved interval coverage by bootstrap iteration).

I can provide this for the statistics package along with wrapper functions named bootstrp and bootci - To users, these closely resemble the corresponding Matlab functions, bootstrp and bootci, but without the bugs and errors in their implementation of the bootstrap.

I have attached three files bootstrp.m, bootci.m and ibootci.m (The matlab-like bootci and bootstrp both require my ibootci).

Interested? This is my first time contributing so suggestions are much appreciated

I have also various other related functions but none are designed to be like any Matlab function. Let me know if any of these other functions would be of interest (e.g. for calculation of p-values and confidence intervals for bootstrap one-sample and two-sample tests etc.). They can be found at:

https://github.com/acp29/iboot

Apologies in advance that the syntax doesn't completely conform to the standard you folk have. (Although I did test them all in Octave too and they worked fine). I'm afraid I don't have time right now to go through to tweak the but if anyone else does have the time and inclination they are welcome.

Best

Andy Penn

Andrew Penn
Sussex Neuroscience
School of Life Sciences
University of Sussex
Brighton BN1 9QG
United Kingdom

Tel: +44 (0)1273 877049
E-mail: -email is unavailable-

http://www.sussex.ac.uk/lifesci/pennlab/

Andrew Penn <acp29>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #48901:  bootstrp.m added by acp29 (3KiB - application/octet-stream)
file #48902:  ibootci.m added by acp29 (57KiB - application/octet-stream)
file #48903:  bootci.m added by acp29 (11KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by nir_krakauer (Posted a comment)
  • -email is unavailable- added by acp29 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-27 mmuetzel StatusNone Done
        Open/ClosedOpen Closed
    2020-05-29 mtmiller Summary[octave-forge] statistics toolbox: bootstrp, bootci and ibootci [octave forge] (statistics) bootstrp, bootci and ibootci
    2020-04-22 acp29 Attached File- Added bootstrp.m, #48901
        Attached File- Added ibootci.m, #48902
        Attached File- Added bootci.m, #48903

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code