Skip to content

Commit

Permalink
Updated preprocessing in JPT
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Dec 31, 2024
1 parent 1c550d8 commit db64750
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/probabilistic_model/learning/jpt/jpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def preprocess_data(self, data: pd.DataFrame) -> np.ndarray:
if isinstance(variable, ScaledContinuous):
column = variable.encode(column)
if isinstance(variable, Symbolic):
column = column.apply(lambda x: variable.domain.simple_sets[0].all_elements[x].value)
column = column.apply(lambda x: int(x))
result[:, variable_index] = column

return result
Expand Down
1 change: 1 addition & 0 deletions test/test_jax/test_coupling_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def generate_parameters(self, x):
def output_length(self):
return self.linear.out_features


class CouplingCircuitTestCase(unittest.TestCase):

data = jnp.array(np.vstack((np.random.uniform(0, 1, (100, 1)),
Expand Down

0 comments on commit db64750

Please sign in to comment.