@@ -125,41 +125,6 @@ def test_get_module_of_nonexistent_concept(self):
125125 module = model .get_module_of_concept ('B' )
126126 self .assertIsNone (module )
127127
128- def test_build_cpt_bernoulli (self ):
129- """Test build_cpt for Bernoulli variable."""
130- parent = Variable (concepts = ['parent' ], parents = [], distribution = Delta , size = 2 )
131- child = Variable (concepts = ['child' ], parents = [parent ], distribution = Bernoulli , size = 1 )
132-
133- parent_cpd = ParametricCPD (concepts = 'parent' , parametrization = nn .Identity ())
134- child_cpd = ParametricCPD (concepts = 'child' , parametrization = nn .Linear (2 , 1 ))
135-
136- model = ProbabilisticModel (
137- variables = [parent , child ],
138- parametric_cpds = [parent_cpd , child_cpd ]
139- )
140-
141- # Get the linked cpd and build CPT
142- child_cpd_linked = model .get_module_of_concept ('child' )
143- cpt = child_cpd_linked .build_cpt ()
144- self .assertIsNotNone (cpt )
145-
146- def test_build_potential_categorical (self ):
147- """Test build_potential for Categorical variable."""
148- parent = Variable (concepts = ['parent' ], parents = [], distribution = Bernoulli , size = 1 )
149- child = Variable (concepts = ['child' ], parents = [parent ], distribution = Categorical , size = 3 )
150-
151- parent_cpd = ParametricCPD (concepts = 'parent' , parametrization = nn .Linear (10 , 1 ))
152- child_cpd = ParametricCPD (concepts = 'child' , parametrization = nn .Linear (1 , 3 ))
153-
154- model = ProbabilisticModel (
155- variables = [parent , child ],
156- parametric_cpds = [parent_cpd , child_cpd ]
157- )
158-
159- child_cpd_linked = model .get_module_of_concept ('child' )
160- potential = child_cpd_linked .build_potential ()
161- self .assertIsNotNone (potential )
162-
163128 def test_multiple_parent_combinations (self ):
164129 """Test cpd with multiple parents."""
165130 parent1 = Variable (concepts = ['p1' ], parents = [], distribution = Bernoulli , size = 1 )
0 commit comments