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

How do I used it for binomial distribution? #63

Closed
junluodigitcompass opened this issue Mar 25, 2023 · 3 comments
Closed

How do I used it for binomial distribution? #63

junluodigitcompass opened this issue Mar 25, 2023 · 3 comments

Comments

@junluodigitcompass
Copy link

I am using dso for a response of 0 and 1, how do I set p to be Bernoulli distribution below?

Thank you!

image

@brendenpetersen
Copy link
Collaborator

Sorry, can you provide more details? Not sure what “response” means. Are you saying that you are searching over sequences where each token of the sequence is binary?

@junluodigitcompass
Copy link
Author

Sorry, can you provide more details? Not sure what “response” means. Are you saying that you are searching over sequences where each token of the sequence is binary?

response refers to y. it is like logistic regression model.
we have data X and Y. X are some variables and Y is the indicator of whether the event happens, for example, if the borrowers default, then it is 1 otherwise 0.
The underlying distribution of Y is binomial.

I noticed there is a parameter: "regressor": "dso_least_squares"
is there a way I can define customized cost function. In that case, do I also need provide gradient fun for minimization purposes?

Thanks.

@brendenpetersen
Copy link
Collaborator

Sounds like you are solving a symbolic regression (regression) task where your response variable takes on binary values.

You can use the standard regression config for this, though your expressions are free to output continuous values. An alternative would be to customize the dso.Task so that y = 0 if the expression takes on a value < 0 and y = 1 otherwise, for example. This should be a quick change.

Note the "distribution" your response variable takes on has nothing to do with the p in the equation above, which is the dso.Policy object that represents a parameterized distribution over symbolic expressions.

is there a way I can define customized cost function

DSO is a generic combinatorial optimization framework, so you can customize any search space or reward function you want.

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