NIEHS / targets_PrestoGP

0 stars 0 forks source link

Develop PrestoGP into Parsnip model #22

Open kyle-messier opened 4 months ago

sigmafelix commented 4 months ago

I looked into defining a parsnip model for PrestoGP here, but it doesn't look very promising as parsnip interface is friendly to S3.

kyle-messier commented 4 months ago

And not S4 friendly? PrestoGP is S4

sigmafelix commented 4 months ago

It looks like parsnip assumes that standard interface of fit and predict (S3 methods) are available in original models to be registered in parsnip. fit and predict takes x and y or formula and data unless certain model class has its own fit method. This is incompatible with S4 interface of PrestoGP (standardGeneric functions prestogp_fit and prestogp_predict operating at model objects (e.g., PrestoGPModel(), VecchiaModel(), etc.).

I tried changing the argument names of prestogp_* into x and y to check if the problem is related to the failure of matching argument names, and I found another error message that is not documented well.

matrix_ is unknown.

I will revisit this issue.