Hardhat, modifying blueprints

Hi, I'm new to RStudio community, and wanted to ask for assistance with a "tidy" modeling package. I'm attempting to follow the guidelines from the hardhat package, but have a sticking point.

I'm working a harmonic regression model that I would, at one point, like to publish to CRAN. I'd like to eventual have all the appropriate tidy methods to integrate it into my own workflow.

I'm stuck on how to use a modification of the blueprint functions. There is the standard outcome ~ predictor relationship, but there is a periodicity that is included in the modeling approach.


Temperature ~ hour of the day
Period = 24 hours on earth, but 32 hours on Mars

I'd like to have the blueprint include this novel element of periodicity.

Any suggestions? Currently I'm avoiding it by patching together the hardhat functions with additional, less tidy code.

It sounds like this periodicity idea should just be a separate argument? So maybe you could just have my_fn(y ~ x, periodicity = 24). This is somewhat similar to the idea of case weights, which we just decided could be done as a separate argument that would be passed down to your implementation function. A few notes about that are here https://github.com/tidymodels/hardhat/issues/15

I don't think you should need to modify the blueprint functions? If you still believe that you do, could you explain more about why you think that, and what specific modifications you'd be making?

That makes a lot of sense - the documentation for blueprints didn't go into it enough for me to implement, but your example with issues is a great walk through. Thanks for thinking about this and providing a reference.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.