# How to observe variables, set_evidence() on large network and update_beliefs()
I want to observe several variables and update_belifes() and then check the posterior probability of the outcome variable of interest.
I am write code as follows
```
net.set_evidence(node_name, val)
net.update ...
Search found 25 matches
- Tue Jul 14, 2026 8:24 pm
- Forum: SMILE
- Topic: How to observe variables in large size network, using set_evidence() and update_beliefs()
- Replies: 2
- Views: 57
- Thu Jun 11, 2026 6:13 pm
- Forum: SMILE
- Topic: How to estimate conditional interventional effect using SMILE on a categorical graph?
- Replies: 1
- Views: 378
How to estimate conditional interventional effect using SMILE on a categorical graph?
I have a causal graph with the following edges : W -> X, X -> T, W -> T, A -> T, B -> T, B -> A. All of the node, W, X, A, B, T are binary categorical variable with value 0 and 1. I have simulated the dataset in the following way:
def simulate_dataset(N, seed):
"""
N: Sample size
"""
np ...
def simulate_dataset(N, seed):
"""
N: Sample size
"""
np ...
- Wed May 06, 2026 6:50 pm
- Forum: SMILE
- Topic: SMILE cannot create a network, error -42
- Replies: 3
- Views: 33267
Re: SMILE cannot create a network, error -42
Is this a hard limit, OR is it possible to extend this limit somehow?"In SMILE, the single CPT can have 2^31 elements - with all binary nodes this would be a node with 30 parents."
- Thu Apr 30, 2026 5:51 pm
- Forum: SMILE
- Topic: SMILE cannot create a network, error -42
- Replies: 3
- Views: 33267
SMILE cannot create a network, error -42
I got an error when creating a network using the code below:
from functools import partial
import pysmile
import pysmile_license
def create_cpt_node(net, id, name, outcomes, x_pos, y_pos):
handle = net.add_node(pysmile.NodeType.CPT, id)
net.set_node_name(handle, name)
net.set_node ...
from functools import partial
import pysmile
import pysmile_license
def create_cpt_node(net, id, name, outcomes, x_pos, y_pos):
handle = net.add_node(pysmile.NodeType.CPT, id)
net.set_node_name(handle, name)
net.set_node ...
- Tue Apr 14, 2026 10:02 pm
- Forum: SMILE
- Topic: How to create SMILE DataSet from a pandas dataframe?
- Replies: 3
- Views: 8003
How to create SMILE DataSet from a pandas dataframe?
I want to use this method
read_pandas_dataframe(self: pysmile.learning.DataSet, *args, **kwargs) -> None
to create DataSet object directly from a pandas dataframe.
Could you please tell me how can I fix this issue? Thanks.
The sample code is below:
# %%
import pandas as pd
import pysmile
import ...
read_pandas_dataframe(self: pysmile.learning.DataSet, *args, **kwargs) -> None
to create DataSet object directly from a pandas dataframe.
Could you please tell me how can I fix this issue? Thanks.
The sample code is below:
# %%
import pandas as pd
import pysmile
import ...
- Tue Aug 12, 2025 6:47 pm
- Forum: SMILE
- Topic: Is there confidence interval for the parameter estimation?
- Replies: 3
- Views: 519414
Re: Is there confidence interval for the parameter estimation?
Thank you for your information for setting seed using network properties.
Before, I was setting seed using the following code, which does not work.
```
random.seed(seed)
np.random.seed(seed)
```
I tried just now using method `pysmile.Network.set_rand_seed`
```
model.set_rand_seed(seed)
```
I ...
Before, I was setting seed using the following code, which does not work.
```
random.seed(seed)
np.random.seed(seed)
```
I tried just now using method `pysmile.Network.set_rand_seed`
```
model.set_rand_seed(seed)
```
I ...
- Thu Aug 07, 2025 8:29 pm
- Forum: SMILE
- Topic: Is there confidence interval for the parameter estimation?
- Replies: 3
- Views: 519414
Is there confidence interval for the parameter estimation?
Dear Community,
I am following the PDF version of the tutorial for SMILE wrappers, specifically for python language.
I am try SMILE package on our real-world dataset.
Since the real world dataset is too big. I have to use "pysmile.BayesianAlgorithmType.EPIS_SAMPLING" to produce inference ...
I am following the PDF version of the tutorial for SMILE wrappers, specifically for python language.
I am try SMILE package on our real-world dataset.
Since the real world dataset is too big. I have to use "pysmile.BayesianAlgorithmType.EPIS_SAMPLING" to produce inference ...
- Wed Jul 02, 2025 4:15 pm
- Forum: SMILE
- Topic: Network size limitation of SMILE package
- Replies: 3
- Views: 1746586
Re: Network size limitation of SMILE package
Hi,
"set explicit targets in the network if you're only interested in the subset of node probabilities"
print_posteriors() function is like below:
def print_posteriors(net, node_handle):
node_id = net.get_node_id(node_handle)
if net.is_evidence(node_handle):
print(f"{node_id} has evidence ...
"set explicit targets in the network if you're only interested in the subset of node probabilities"
print_posteriors() function is like below:
def print_posteriors(net, node_handle):
node_id = net.get_node_id(node_handle)
if net.is_evidence(node_handle):
print(f"{node_id} has evidence ...
- Tue Jul 01, 2025 8:01 pm
- Forum: SMILE
- Topic: Network size limitation of SMILE package
- Replies: 3
- Views: 1746586
Network size limitation of SMILE package
Dear Community,
I am following the PDF version of the tutorial for SMILE wrappers, specifically for python language.
I am trying SMILE package on our real-world dataset.
Our dataset has 1654 nodes, 2965 edges.
Among the 1654 nodes, there are 605 continuous variables and 1049 categorical ...
I am following the PDF version of the tutorial for SMILE wrappers, specifically for python language.
I am trying SMILE package on our real-world dataset.
Our dataset has 1654 nodes, 2965 edges.
Among the 1654 nodes, there are 605 continuous variables and 1049 categorical ...
- Tue Jul 01, 2025 4:36 pm
- Forum: SMILE
- Topic: Does SMILE support hybrid/mixed network (with both discrete and continuous variables) parameter learning/estimation?
- Replies: 3
- Views: 510333
Re: Does SMILE support hybrid/mixed network (with both discrete and continuous variables) parameter learning/estimation?
Hi, I have a following up question:
Does SMILE support inference on hybrid network?
Suppose we learn the parameter in some other way. Can we encode the learned parameter in the hybrid network and then we do inference or manipulation of variables on it?
For instance, there is a case a discrete ...
Does SMILE support inference on hybrid network?
Suppose we learn the parameter in some other way. Can we encode the learned parameter in the hybrid network and then we do inference or manipulation of variables on it?
For instance, there is a case a discrete ...
- Mon Jun 30, 2025 7:42 pm
- Forum: SMILE
- Topic: How to do manipulation of a variable in the network
- Replies: 3
- Views: 516686
Re: How to do manipulation of a variable in the network
Thanks, I have read "GeNIe manual, chapter 'Controlling values'". it is clear to me now.
Can I ask a further question?
I search both GeNIe manual and Wrapper manual.
I did not find the document to introduce how to use the function `Network.set_controlled_value`.
Could you please instruct me ...
Can I ask a further question?
I search both GeNIe manual and Wrapper manual.
I did not find the document to introduce how to use the function `Network.set_controlled_value`.
Could you please instruct me ...
- Thu Jun 26, 2025 8:58 pm
- Forum: SMILE
- Topic: How to do manipulation of a variable in the network
- Replies: 3
- Views: 516686
How to do manipulation of a variable in the network
We want to use SMILE to do manipulation for a variable, and see how the manipulation can affect the target variable.
Here is a brief explanation of the difference between "observing" and "manipulation/intervening".
Given a graph B -> A, A -> T, B -> T.
In Tutorial 2, if we use function `change ...
Here is a brief explanation of the difference between "observing" and "manipulation/intervening".
Given a graph B -> A, A -> T, B -> T.
In Tutorial 2, if we use function `change ...
- Tue Jun 24, 2025 9:31 pm
- Forum: SMILE
- Topic: is there a way to output goodness-of-fit metric such as BIC, log likelihood score?
- Replies: 3
- Views: 603361
is there a way to output goodness-of-fit metric such as BIC, log likelihood score?
Dear Support team,
I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.
Is there a way to output goodness-of-fit metric such as BIC, log likelihood score, given a predefined network structure and a dataset?
BIC score (Bayesian Information ...
I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.
Is there a way to output goodness-of-fit metric such as BIC, log likelihood score, given a predefined network structure and a dataset?
BIC score (Bayesian Information ...
- Thu Jun 19, 2025 7:08 pm
- Forum: SMILE
- Topic: Does SMILE support hybrid/mixed network (with both discrete and continuous variables) parameter learning/estimation?
- Replies: 3
- Views: 510333
Does SMILE support hybrid/mixed network (with both discrete and continuous variables) parameter learning/estimation?
Dear Support team,
I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.
I tried to simulate a hybrid network (with both discrete and continuous variables).
I first predefined a network structure and then simulated a dataset. I tried to use ...
I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.
I tried to simulate a hybrid network (with both discrete and continuous variables).
I first predefined a network structure and then simulated a dataset. I tried to use ...
- Tue Jun 17, 2025 10:21 pm
- Forum: SMILE
- Topic: Help needed for my example of simulating hybrid model (with categorical and continuous model) and parameter learning
- Replies: 0
- Views: 320114
Help needed for my example of simulating hybrid model (with categorical and continuous model) and parameter learning
Dear Community,
I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.
To simulate a dataset from a hybrid Bayesian network with both categorical and continuous variables, we need to:
Define the conditional probability tables (CPTs) for ...
I am following the PDF version of the tutorial for SMILE wrappers, specifically for the Python language.
To simulate a dataset from a hybrid Bayesian network with both categorical and continuous variables, we need to:
Define the conditional probability tables (CPTs) for ...