Skip to content
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

ValueError in HillClimbSearch().estimate() #1348

Closed
Kuril951 opened this issue Nov 11, 2020 · 1 comment · Fixed by #1349
Closed

ValueError in HillClimbSearch().estimate() #1348

Kuril951 opened this issue Nov 11, 2020 · 1 comment · Fixed by #1349

Comments

@Kuril951
Copy link

Kuril951 commented Nov 11, 2020

Subject of the issue

It raises ValueError when estimating the graph with the HillClimbSearch model.

Your environment

  • pgmpy version : 0.1.12
  • Python version : 3.7.7
  • Operating System : Ubuntu 18.04.2 LTS

Steps to reproduce

data = pd.DataFrame(
        [[1,0,0,1,0,0,1,1,0],
         [1,0,1,0,0,1,0,1,0],
         [1,0,0,0,0,1,0,1,1],
         [1,1,0,1,0,1,1,0,0],
         [0,0,1,0,0,1,1,0,0]],
        columns=list('ABCDEFGHI')
    )
est = HillClimbSearch(data)
best_model = est.estimate(
    fixed_edges=[('A','B'), ('B', 'C')],
    white_list=[('F','C')]
)

Expected behaviour

  1. return model with fixed edges
    or
  2. return model with fixed_edges and white_list edges

Actual behaviour

image

@ankurankan
Copy link
Member

@Kuril951 If you install the latest dev branch this should work now.

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

Successfully merging a pull request may close this issue.

2 participants