Skip to content

Parameterizing with Continuous Variables Code Error #25

Open
@ghost

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions