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

Contribution of each smooth term #358

Open
AdamWhiteXAI opened this issue Aug 13, 2024 · 5 comments
Open

Contribution of each smooth term #358

AdamWhiteXAI opened this issue Aug 13, 2024 · 5 comments

Comments

@AdamWhiteXAI
Copy link

AdamWhiteXAI commented Aug 13, 2024

Is there anyway I can get the 'additional contribution' each smooth term makes to the final GAM score for a particular input? For example if my model is :
LinearGAM( terms=s(7) + s(13) + s(1) + s(15) + intercept)
then what contribution does s(7) make when 'variable 7' equals 10

Is it worth trying to hack into PyGam's code to get this?

@CodeCrux21
Copy link

what do you mean? it's the coefficient. it's an additive model.

@AdamWhiteXAI
Copy link
Author

There isn't a single coefficient for a dependent variable in a GAM, it's value varies based on the value of the dependent variable.

@CodeCrux21
Copy link

CodeCrux21 commented Dec 3, 2024

There isn't a single coefficient for a dependent variable in a GAM, it's value varies based on the value of the dependent variable.

yes. and? it's contribution is still it's coefficient at x.

@AdamWhiteXAI
Copy link
Author

AdamWhiteXAI commented Dec 3, 2024

But the point is that for a particular observation, you cannot get the single coefficient value that is being applied for to a specified independent variable. You can in R but not in PyGAM

@ouslan
Copy link

ouslan commented Dec 9, 2024

@AdamWhiteXAI What exactly is it that you want to implement? I imagine you are using the mgcv package from R. Could you link the documentation from R for the desired feature?

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

No branches or pull requests

3 participants