Coverage for causalspyne/edge_models.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-19 14:58 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-19 14:58 +0000
1import numpy as np
4class EdgeModelLinear():
5 def __init__(self, dag):
6 self._dag = dag
8 def run(self, ind_node, data_realization_parents):
9 """
10 data_realization_parents = data[:, list_parents_inds]
11 """
12 # Linear combination of parent nodes + Gaussian noise
13 weights = self._dag.get_weights_from_list_parents(ind_node)
14 bias = np.dot(data_realization_parents, weights)
15 return bias