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

Adding partial derivative and partial log-derivative #347

Open
palmierieugenio opened this issue Oct 24, 2020 · 3 comments
Open

Adding partial derivative and partial log-derivative #347

palmierieugenio opened this issue Oct 24, 2020 · 3 comments
Labels
feature 💡 New feature or enhancement request long term 📆 TODO long term looking for help looking for help R 🐳 Related to R

Comments

@palmierieugenio
Copy link

I think it could useful a function to calculate numerically not just the partial plot of the predictor, like in the function variable_effect_partial_dependency , but also the partial derivative of the predictor for the additive effect:

\begin{equation*}
\frac{\partial f(X)}{\partial X_j}=\lim_{h \to 0} \frac{f(X_j+h| \ X_{-j}) - f(X)}{h} ,
\end{equation*}

and the logarithmic partial derivative for the multiplicative effect:

\begin{equation*}
\frac{\partial log(f(X))}{\partial X_j}=\lim_{h \to 0} \frac{log(f(X_j+h| \ X_{-j})) - log(f(X))}{h} ,
\end{equation*}

It could be possible to calculate it like tha partial response in the variable_effect_partial_dependency function: fixing all other covariates and changing just X_j.

@hbaniecki hbaniecki added the feature 💡 New feature or enhancement request label Oct 24, 2020
@maksymiuks maksymiuks added the R 🐳 Related to R label Oct 24, 2020
@maksymiuks maksymiuks self-assigned this Oct 29, 2020
@maksymiuks
Copy link
Member

Hi,

thank you so for your valuable ideas! We will try to implement them.

@pbiecek what do you think about adding derivative_partial type to model_profile and thus to aggregate_profiles in ingredients. IMO it fully complies with the definition of the Model Profile task. We could estimate the partial derivative of the predictor by setting a very dense grid of points to evaluate for standard profiles and then just dividing proper values to get the derivative.

@palmierieugenio
Copy link
Author

Hi,

thank you so for your valuable ideas! We will try to implement them.

@pbiecek what do you think about adding derivative_partial type to model_profile and thus to aggregate_profiles in ingredients. IMO it fully complies with the definition of the Model Profile task. We could estimate the partial derivative of the predictor by setting a very dense grid of points to evaluate for standard profiles and then just dividing proper values to get the derivative.

If you make some progress, please reply and tell me how you called the function (or if it was a failure and it doesn't work), I am curious to test it and understand if it gives interesting results.

@maksymiuks
Copy link
Member

@pbiecek are you continuing on this?

@hbaniecki hbaniecki added the long term 📆 TODO long term label Aug 11, 2021
@pbiecek pbiecek added the looking for help looking for help label Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 💡 New feature or enhancement request long term 📆 TODO long term looking for help looking for help R 🐳 Related to R
Projects
None yet
Development

No branches or pull requests

4 participants