Can't instantiate priors
See original GitHub issueMany priors from ‘GPy.priors’ don’t work at all:
In [2]: GPy.priors.Uniform()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-157dba2fded5> in <module>()
----> 1 GPy.priors.Uniform()
/home/aplavin/anaconda3/lib/python3.6/site-packages/GPy/core/parameterization/priors.py in __new__(cls, lower, upper)
102 if instance().lower == lower and instance().upper == upper:
103 return instance()
--> 104 o = super(Prior, cls).__new__(cls, lower, upper)
105 cls._instances.append(weakref.ref(o))
106 return cls._instances[-1]()
TypeError: object() takes no parameters
In [3]: GPy.priors.Uniform(0, 1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-33389462e27b> in <module>()
----> 1 GPy.priors.Uniform(0, 1)
/home/aplavin/anaconda3/lib/python3.6/site-packages/GPy/core/parameterization/priors.py in __new__(cls, lower, upper)
102 if instance().lower == lower and instance().upper == upper:
103 return instance()
--> 104 o = super(Prior, cls).__new__(cls, lower, upper)
105 cls._instances.append(weakref.ref(o))
106 return cls._instances[-1]()
TypeError: object() takes no parameters
same issue with Exponential
. On the other hand, some priors do work:
In [5]: GPy.priors.Gamma(1, 2)
Out[5]: Ga(1, 2)
but only with explicitly specified parameters, otherwise:
In [3]: GPy.priors.Uniform(0, 1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-33389462e27b> in <module>()
----> 1 GPy.priors.Uniform(0, 1)
/home/aplavin/anaconda3/lib/python3.6/site-packages/GPy/core/parameterization/priors.py in __new__(cls, lower, upper)
102 if instance().lower == lower and instance().upper == upper:
103 return instance()
--> 104 o = super(Prior, cls).__new__(cls, lower, upper)
105 cls._instances.append(weakref.ref(o))
106 return cls._instances[-1]()
TypeError: object() takes no parameters
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Cannot instantiate class models.Customer. It must have a ...
When I am using play framework 2.3.5, I met this problem. It seems there is an overriding between the default constructor and the...
Read more >Cannot instantiate printer for default visualizer #2 - GitHub
When I try to debug CUDA, I get this message: image. Updating VSCode and reinstalling the extension did not solve the problem.
Read more >I want to understand clearly why can't we instantiate an object ...
It's because an abstract class isn't complete. One or more parts of its public interface are not implemented. You've said what they're going ......
Read more >Cannot create Azure domain - Microsoft Q&A
Cannot create Azure domain. I tried to add a custom domain to my Pay-As-You-Go Azure account, and it failed with the error:.
Read more >Bayesian Inference with Prior Information
Supplying prior distributions with some information allows us to fit models that cannot be fit with frequentist methods. (example- all binary outcomes are ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello,
Another bump for this issue, I am also experiencing it.
Did anyone solve this problem? I have the exactly same issue. I tried the above one, but it fixed nothing.