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

Problem in ConditionalModel constructor #8

Open
tlarock opened this issue Aug 26, 2019 · 2 comments
Open

Problem in ConditionalModel constructor #8

tlarock opened this issue Aug 26, 2019 · 2 comments

Comments

@tlarock
Copy link

tlarock commented Aug 26, 2019

I think this is probably related to #5.

When I try to use the ConditionalModel class, I get TypeError: __init__() missing 2 required positional arguments: 'features' and 'samplespace' from the call super(ConditionalModel, self).__init__() in ConditonalModel.__init__().

Is this due to a current round of refactoring? Should it be necessary to pass feature functions and sample space in to ConditionalModel? It looks like it wasn't always necessary (e.g. this old python 2 example https://github.com/stefanv/scipy3/blob/master/scipy/maxentropy/examples/conditionalexample2.py).

If I comment out the call to super, then the fit function fails because model is not defined. Not sure if these things are directly related, or if this is a separate issue.

@tlarock
Copy link
Author

tlarock commented Aug 26, 2019

Update: I just realized there is an examples_scipy directory that shows the conditional examples are broken. I had only looked through the notebooks when I created the issue. Is there a current effort to get the conditional versions fixed or will it likely be a while?

@shuttle1987
Copy link
Contributor

shuttle1987 commented Sep 22, 2019

Thanks for opening this issue, it does look like something has broke here in the process of refactoring since the super call here is not passing over the needed arguments. The features seems easy enough to forward on but I'm not as sure about the samplespace otherwise I'd have opened a PR to fix this

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