PLN-team / PLNmodels

A collection of Poisson lognormal models for multivariate count data analysis
https://pln-team.github.io/PLNmodels
GNU General Public License v3.0
54 stars 18 forks source link

More questions. #94

Closed brgew closed 1 year ago

brgew commented 1 year ago

Hi,

I have two more questions.

  1. the PLNnetwork_param() function had a config_post parameter, which we used to select things like jackknife and bootstrap. It appears to have been dropped from the current version of PLNnetwork_param() and it's not apparent how we can enable jackknife, bootstrap, etc. without it. Is there a different way?

  2. this is a coding question that I've been unable to answer - I wonder if you might help me. We define an S4 class with a slot that takes a PLNfit class object, which works nicely. But when we attempt to assign a PLNfit_spherical or PLNfit_diagonal object to the slot, the S4 class initiator complains that it expects a PLNfit object, that is, it fails to recognize that PLNfit_spherical inherits PLNfit. I tried using setClassUnion('PLNfit_union', c('PLNfit', 'PLNfit_spherical', 'PLNfit_diagonal')) but on loading PLNmodels, R complains that PLNfit_spherical and PLNfit_diagonalare undefined. I wonder how we can placate the S4 initiator.

I appreciate your consideration and guidance.

Thank you.

jchiquet commented 1 year ago

Hi,

For your first question, we checked that the jackknife and bootstrap estimators were relevant for the basic PLN model. For the network version, the integration of the regularization is questionable and what was returned did not necessarily make sense so we preferred to disable it for the moment... But there is hope, and knowing that someone was using this feature will undoubtedly push us to make developments in this direction.

For the second question, I haven't used the S4 classes for a while and I lack expertise on this. Did you have a look on stackoverflow for example ? https://stackoverflow.com/questions/72559243/is-there-a-way-method-to-assign-a-r6-object-to-an-s4-object-slot

Best,

brgew commented 1 year ago

Hi,

I appreciate your clarifications. And I thank you for the help with the programming question!

Best Wishes,