This repository was archived by the owner on Mar 18, 2025. It is now read-only.
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
Parameterizing with Continuous Variables Code Error #25
Open

Description
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,
Metadata
Metadata
Assignees
Labels
No labels