Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Earth offset #379

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open

Earth offset #379

wants to merge 1 commit into from

Conversation

blind-contours
Copy link
Collaborator

Earth was not incorporating the offset when making predictions originally due to offset issues with do.call and glm predict. Here, I simply make earth create a formula which can include an offset to fix this problem.

@blind-contours blind-contours changed the base branch from master to devel February 9, 2022 01:32
@jeremyrcoyle
Copy link
Collaborator

Please avoid using formulas unless specified by the end user. The formula interface in R is inefficient, and so shouldn't be used for internal operations. Happy to help resolve the offset issue without appealing to the formula interface.

@blind-contours
Copy link
Collaborator Author

That would be great. I could use some help getting the offset working without using the formula. I don't know of another solution besides just adding the offset into the predictions. Thanks.

@rachaelvp
Copy link
Member

Just following up on this so we can get it merged and fixed. @jeremyrcoyle would the solution to avoid formula be to add the offset to the predictions?

@jeremyrcoyle
Copy link
Collaborator

Sorry I haven't had time to check in on this one. Just debug() the function that takes the formula, find out what function it calls with what argument to specify the offsets. Your suggestion is also good, you'd have to implement the link function and offsets yourself by changing the prediction type fed to the underlying learner, which is maybe something we should consider doing across the board. That would allow us to say we're in a glm framework which could be cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants