pgmpy / pgmpy_notebook

Short Tutorial to Probabilistic Graphical Models(PGM) and pgmpy
http://pgmpy.org/
MIT License
369 stars 212 forks source link

TypeError in the HillClimbSearch (tutorial notebook 10) #53

Closed yuanjian24 closed 2 years ago

yuanjian24 commented 2 years ago

In the Notebook '10. Learning Bayesian Networks from Data`

I Encounte the Type error while implementing

hc = HillClimbSearch(data, scoring_method=BicScore(data))

image

If I remove scoring_method=BicScore(data), this function works well but the result is inconsistent with the given one.

Is there any update on this function? Thanks

ankurankan commented 2 years ago

@yuanjian24 The scoring_method argument has been moved to the estimate method from the init method so that you can try out different scoring methods without creating a new HillClimbSearch object. There were some other errors in the notebook because of it being old, I have fixed those as well and you should be able to run all the code.