pgmpy_notebook
pgmpy_notebook copied to clipboard
Short Tutorial to Probabilistic Graphical Models(PGM) and pgmpy
This tutorial help me a lot in my research at hand. Thanks very much for your efforts. However, the chaper 4 and 5 seems incomplete, when will you update it?
Depending on the random train/test split this code can give a key error: ``` for i in X_test_features: predicted_values.append(joint_prob[i[0], i[1]].idxmax()) ``` Here's a possible alternative: ``` for i in X_test_features:...
## Problem Similar changes required to PR #1476 in pgmpy/pgmpy repo. ## Suggested solution Need to remove spaces between "$" characters and latex expressions for nbsphinx to interpret correctly when...
This is not related to a bug in the code, but instead to an idea of a functionality of models. Say we have a model that was already created from...
`cpd_covid = TabularCPD(variable='Covid', variable_card=2, values=[[0.01, 0.15], [0.99, 0.85]], evidence=["Follow_rule"], evidence_card=[2], state_names={'Covid': ['Positive', 'Negative'], 'Follow_rule': ['Yes', 'No']}) cpd_influence = TabularCPD(variable='Influence', variable_card=2, values=[[0.01, 0.09], [0.99, 0.91]], evidence=["Follow_rule"], evidence_card=[2], state_names={'Influence': ['Positive', 'Negative'], 'Follow_rule':...
I've read through the documentation and notebooks for Continuous Factors several times, but there is still a big gap between what is written there and what I need to know...
ImportError: cannot import name 'DiscreteFactor' from 'pgmpy.factors'
When I try to run this code: std_normal_pdf = lambda x : np.exp(-x*x/2) / (np.sqrt(2*np.pi)) std_normal = ContinuousFactor(['x'],std_normal_pdf) std_normal.discretize(RoundingDiscretizer, low=-3, high=3, cardinality=12) I obtain the following error: --------------------------------------------------------------------------- AttributeError Traceback...
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...
most of the work here is very light - pgmpy isn't available in anaconda - so I included a small bit of code - ``` import sys sys.path.append('/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/') ``` that...