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

Could you explain if bambi supports extra predefined function with extra hyperparameter to formulate in the model? and estimate posterior for those parameters? #580

Open
wenwenzws opened this issue Oct 21, 2022 · 1 comment

Comments

@wenwenzws
Copy link

Hi,

I am trying to have my own transformation functions with parameters to be estimated as posterior from bayes linear model.
For example,
def hill_core(x, k,s):

      #  transformed_hill=1 - half**s/(x**s + half**s)
        transformed_hill=x*k*s
        return transformed_hill

bmb_model=bmb.Model('gbv ~ hill_core(sem_nonbrand_click,k,s)',model_obj.df, priors_dic)

I want to have the posterior distribution of k and s as well. Is this possible in the current formulation?

@tomicapretto
Copy link
Collaborator

This issue has been raised in #448 as well.

The short answer is that Bambi supports generalized linear models now. The function you wrote above suggests a non-linear model, which is still not supported in Bambi.

We do plan to support it at some point in time, but I'm afraid it's not coming in the short term (few months from now).
See #544 for some ideas we have.

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

2 participants