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

decomposition + parametrization #6

Open
cranmer opened this issue Mar 4, 2016 · 3 comments
Open

decomposition + parametrization #6

cranmer opened this issue Mar 4, 2016 · 3 comments

Comments

@cranmer
Copy link
Member

cranmer commented Mar 4, 2016

I'm working on example now that looks like
amp_Gaus(x | mu, sigma) + (1-amp)_Uniform(x)

true_amp, true_mass, true_width = .2, 0., 0.3

amp = theano.shared(true_amp) 
mass = theano.shared(true_mass) 
width = theano.shared(true_width)

components = [
    Normal(mu=mass, sigma=width, random_state=0),   # c0
    Uniform(low=-5,high=5),
]

p0 = Mixture(components=components, weights=[amp, 1-amp], random_state=10)
p1 = Mixture(components=components[1:], weights=[1], random_state=11)

It is parametrized by amp, mu, sigma. I'd like to use a 2-d parametrized classifier in mu,sigma to classify Gaus vs. Uniform and then use the decomposition on top of that.

Also, it would need to be able to deal with Gaus(x | mu, sigma) vs. Gaus(x | mu' , sigma')

Not sure if this is possible.

@glouppe
Copy link
Contributor

glouppe commented Mar 4, 2016

Also, it would need to be able to deal with Gaus(x | mu, sigma) vs. Gaus(x | mu' , sigma')

Unless I am misunderstanding, in this case you need to define mu and mu' using distinct theano variables. If you use the same python object, then the parameter will be shared across distributions, and this may not be what you want to do. Similarly, you should think if you really want to share the same components objects.

@glouppe
Copy link
Contributor

glouppe commented Mar 4, 2016

(Maybe it would be best to move that issue to carl instead)

@glouppe
Copy link
Contributor

glouppe commented Mar 4, 2016

It is parametrized by amp, mu, sigma. I'd like to use a 2-d parametrized classifier in mu,sigma to classify Gaus vs. Uniform and then use the decomposition on top of that.

Unfortunately, it is not yet possible to combine the decomposition with a prefit classifier. Not sure how to best do that easily, since you would need in this case to provide all pairwise classifiers. I'll think about it, but suggestions are welcome!

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