<p>It looks like <strong>causalnex</strong> doesn't directly support setting the CPD's manually, but you can look at the underlying code and see that it's using the <strong>pgmpy</strong> BayesianModel to simultaneously represent the structure and CPD's within a <strong>causalnex</strong> BayesianNetwork.</p>
<p>With that, you could add the CPD's you know via <a href="https://pgmpy.org/models.html#pgmpy.models.BayesianModel.BayesianModel.add_cpds" rel="nofollow noreferrer">add_cpds</a> instead of fitting them.  To get at the <code>BayesianModel</code> object it would be: <code>bn._model</code>, where <code>bn</code> is your <code>causalnex.BayesianNetwork</code> object.</p>
<p>I'm not sure if this would make you just want to use <strong>pgmpy</strong> instead of <strong>causalnex</strong> or not!!  It seems like the big benefit from <strong>causalnex</strong> is its use of the <a href="https://arxiv.org/abs/1803.01422" rel="nofollow noreferrer">NOTEARS</a> algorithm, which helps you build the Weighted Adjacency Matrix for your Directed Graph.  Then again, it also coordinates some plotting for you.</p>
<p>Also, an important note from the <a href="https://causalnex.readthedocs.io/en/latest/03_tutorial/03_tutorial.html#Fitting-the-Conditional-Distribution-of-the-Bayesian-Network" rel="nofollow noreferrer">docs</a> to remind you that it's not <em>really</em> continuous, but discretised/binned:</p>
<blockquote>
<p>Bayesian Networks in CausalNex support only discrete distributions.
Any continuous features, or features with a large number of
categories, should be discretised prior to fitting the Bayesian
Network. Models containing variables with many possible values will
typically be badly fit, and exhibit poor performance.</p>
</blockquote>
constructing an expertise based bayesian network in causalnex
<p>Up to now, in causalnex package, I only encountered Bayesian networks that were constucted from
data. I want to know how to create my own network with my node parameters and CPDs from expertise. Anybody has some reference to it or an example?</p>