1
0
Fork 0

Undefine node children time

master
Pietro 4 years ago
parent 710a392fac
commit 5e38ef6220
  1. 1
      .gitignore
  2. 2
      PyCTBN/PyCTBN/structure_graph/trajectory_generator.py
  3. 4
      PyCTBN/PyCTBN/utility/json_exporter.py

1
.gitignore vendored

@ -12,3 +12,4 @@ test_1.py
test1.json
test2.json
test3.json
result0.png

@ -18,8 +18,6 @@ class TrajectoryGenerator(object):
for v in self._vnames:
self._parents[v] = self._importer._df_structure.where(self._importer._df_structure["To"] == v).dropna()["From"].tolist()
print(self._parents)
self._cims = {}
sampled_cims = self._importer._raw_data[0]["dyn.cims"]
for v in sampled_cims.keys():

@ -13,12 +13,12 @@ class JsonExporter(object):
self._trajectories.append(trajectory)
def out_json(self, filename):
data = {
data = [{
"dyn.str": self._dyn_str,
"variables": self._variables,
"dyn.cims": self._dyn_cims,
"samples": self._trajectories
}
}]
path = os.getcwd()
with open(path + "/" + filename, "w") as json_file: