From 78f24779502a78e915890fc6b3247ee307a363f9 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Thu, 16 Feb 2023 08:23:16 +0100 Subject: [PATCH] Removed `memory_profiler` and the bugged printing of the adj matrix and plotting of the graph --- benchmark.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/benchmark.py b/benchmark.py index a1f322f..be8132e 100755 --- a/benchmark.py +++ b/benchmark.py @@ -4,13 +4,11 @@ import glob import os import time from pathlib import Path -from memory_profiler import profile from pyctbn.legacy import JsonImporter from pyctbn.legacy import SamplePath from pyctbn.legacy import StructureConstraintBasedEstimator -@profile def structure_constraint_based_estimation_example(): Path("./data").mkdir(parents=True, exist_ok=True) # @@ -49,13 +47,13 @@ def structure_constraint_based_estimation_example(): end_time = time.time() print("Elaspsed time: %d seconds" % (end_time - start_time)) # obtain the adjacency matrix of the estimated structure - print(se1.adjacency_matrix()) + #print(se1.adjacency_matrix()) Path("./res").mkdir(parents=True, exist_ok=True) # save the estimated structure to a json file # (remember to specify the path AND the .json extension).... se1.save_results("./res/results0.json") # ...or save it also in a graphical model fashion # (remember to specify the path AND the .png extension) - se1.save_plot_estimated_structure_graph("./res/result0.png") + #se1.save_plot_estimated_structure_graph("./res/result0.png") structure_constraint_based_estimation_example()