Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelDiai committed Apr 1, 2021
1 parent e10f8fb commit d0b0f54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions animals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions basic_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -83,12 +84,12 @@ 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
n : number of nodes per cluster
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)
1 change: 1 addition & 0 deletions cancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d0b0f54

Please sign in to comment.