diff --git a/animals.py b/animals.py index 14cb8e6..b729f89 100644 --- a/animals.py +++ b/animals.py @@ -37,3 +37,4 @@ def animals(k, n_iter, alpha, beta): plt.title("Learned graph for the animal dataset k=%s n_iter=%s alpha=%.3f beta=%.3f" % (k , n_iter, alpha, beta)) filename = os.path.join(plots_dir, 'animals', 'graph') fig.savefig(filename) + return G diff --git a/basic_experiments.py b/basic_experiments.py index c67fd6f..1db7b89 100644 --- a/basic_experiments.py +++ b/basic_experiments.py @@ -65,6 +65,7 @@ def load_dataset_and_sgl(dataset, k, k_sgl, n): plt.ylabel('y-coordinate') filename = os.path.join(plots_dir, dataset, 'graph_%s_%s_%s' % (k , k_sgl, n)) fig.savefig(filename) + return G def two_moons(n, k_sgl): @@ -73,7 +74,7 @@ def two_moons(n, k_sgl): k_sgl : number of components to learn using SGL """ # Create save path - load_dataset_and_sgl('Two moons', 2, k_sgl, n) + return load_dataset_and_sgl('Two moons', 2, k_sgl, n) def blops(n, k, k_sgl): @@ -83,7 +84,7 @@ def blops(n, k, k_sgl): k_sgl : number of components to learn using SGL """ # Create save path - load_dataset_and_sgl('Blops', k, k_sgl, n) + return load_dataset_and_sgl('Blops', k, k_sgl, n) def circles(n, k_sgl): """ Plot Circles dataset and learn the graph using SGL @@ -91,4 +92,4 @@ def circles(n, k_sgl): k_sgl : number of components to learn using SGL """ # Create save path - load_dataset_and_sgl('Circles', 2, k_sgl, n) + return load_dataset_and_sgl('Circles', 2, k_sgl, n) diff --git a/cancer.py b/cancer.py index ed26488..c36e00e 100644 --- a/cancer.py +++ b/cancer.py @@ -37,3 +37,4 @@ def Cancer(df_cancer, y_cancer, alpha, beta, k, n_iter): plt.title("Learned graph for the cancer dataset k=%s n_iter=%s alpha=%.3f beta=%.3f" % (k , n_iter, alpha, beta)) filename = os.path.join(plots_dir, 'cancer', 'graph') fig.savefig(filename) + return G