We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to run this code:
std_normal_pdf = lambda x : np.exp(-xx/2) / (np.sqrt(2np.pi)) std_normal = ContinuousFactor(['x'],std_normal_pdf) std_normal.discretize(RoundingDiscretizer, low=-3, high=3, cardinality=12)
I obtain the following error:
AttributeError Traceback (most recent call last) in 1 std_normal_pdf = lambda x : np.exp(-xx/2) / (np.sqrt(2np.pi)) 2 std_normal = ContinuousFactor(['x'],std_normal_pdf) ----> 3 std_normal.discretize(RoundingDiscretizer, low=-3, high=3, cardinality=12)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pgmpy\factors\continuous\ContinuousFactor.py in discretize(self, method, *args, **kwargs) 178 # TODO: finish this 179 """ --> 180 return method(self, *args, **kwargs).get_discrete_values() 181 182 def reduce(self, values, inplace=True):
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pgmpy\factors\continuous\discretize.py in get_discrete_values(self) 131 132 # for x=[low] --> 133 discrete_values = [self.factor.cdf(self.low + step/2) - self.factor.cdf(self.low)] 134 135 # for x=[low+step, low+2*step, ........., high-step]
AttributeError: 'ContinuousFactor' object has no attribute 'cdf'
Thank you
The text was updated successfully, but these errors were encountered:
@HitosVilla Is this somewhere in the examples? Because we currently have very limited support for continuous variables.
Sorry, something went wrong.
No branches or pull requests
When I try to run this code:
std_normal_pdf = lambda x : np.exp(-xx/2) / (np.sqrt(2np.pi))
std_normal = ContinuousFactor(['x'],std_normal_pdf)
std_normal.discretize(RoundingDiscretizer, low=-3, high=3, cardinality=12)
I obtain the following error:
AttributeError Traceback (most recent call last)
in
1 std_normal_pdf = lambda x : np.exp(-xx/2) / (np.sqrt(2np.pi))
2 std_normal = ContinuousFactor(['x'],std_normal_pdf)
----> 3 std_normal.discretize(RoundingDiscretizer, low=-3, high=3, cardinality=12)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pgmpy\factors\continuous\ContinuousFactor.py in discretize(self, method, *args, **kwargs)
178 # TODO: finish this
179 """
--> 180 return method(self, *args, **kwargs).get_discrete_values()
181
182 def reduce(self, values, inplace=True):
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pgmpy\factors\continuous\discretize.py in get_discrete_values(self)
131
132 # for x=[low]
--> 133 discrete_values = [self.factor.cdf(self.low + step/2) - self.factor.cdf(self.low)]
134
135 # for x=[low+step, low+2*step, ........., high-step]
AttributeError: 'ContinuousFactor' object has no attribute 'cdf'
Thank you
The text was updated successfully, but these errors were encountered: