-
Notifications
You must be signed in to change notification settings - Fork 214
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
Parameterizing with Continuous Variables Code Error #25
Comments
@RockLeeStudio |
@yashu-seth It's a grammatical problem,* not defined. I'm using Anaconda python 2 environment. |
@RockLeeStudio It would help if you can share the complete example along with the error you got. |
I run in to this issue, too! model = LinearGaussianBayesianNetwork([('x1', 'x2'), ('x2', 'x3')]) This is a hack due to a bug in pgmpy (LinearGaussianCPDdoesn't have
|
In the Linear Gaussian CPD chapter,when using LinearGaussianBayesianNetwork ,there have following codes:
cpd1.variables = [*cpd1.evidence, cpd1.variable]
cpd2.variables = [*cpd2.evidence, cpd2.variable]
cpd3.variables = [*cpd3.evidence, cpd3.variable]
However,it caused syntax error and can't run it . So I changed it to
cpd1.variables = ["".join(cpd1.evidence), cpd1.variable]
cpd2.variables = ["".join(cpd2.evidence), cpd2.variable]
cpd3.variables = ["".join(cpd3.evidence), cpd3.variable]
But "ValueError: ('CPD defined on variable not in the model', <pgmpy.factors.continuous.LinearGaussianCPD.LinearGaussianCPD object at 0x000000000AFECA58>)"
occured.I don't kown what to do .By the way, I‘m in Python2 Enviroment,
The text was updated successfully, but these errors were encountered: