Skip to content

Commit

Permalink
Updated examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArianeMora committed Dec 2, 2022
1 parent 5855b95 commit bfcc1fe
Show file tree
Hide file tree
Showing 7 changed files with 10,731 additions and 832 deletions.
170 changes: 98 additions & 72 deletions example/Conv VAE MNIST example.ipynb

Large diffs are not rendered by default.

349 changes: 199 additions & 150 deletions example/VAE MNIST example.ipynb

Large diffs are not rendered by default.

821 changes: 315 additions & 506 deletions example/VAE histone.ipynb

Large diffs are not rendered by default.

212 changes: 114 additions & 98 deletions example/VAE iris example.ipynb

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions scivae/vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import pickle
from sklearn.preprocessing import MinMaxScaler
from scivae.validate import Validate
from tensorflow.keras.callbacks import TensorBoard
import json
from scivae import Loss
from sciutil import SciException, SciUtil
Expand Down Expand Up @@ -559,8 +558,7 @@ def optimiser(self, optimiser_name: str, params: dict):
return optimizers.Adamax(learning_rate=learning_rate, beta_1=beta_1, beta_2=beta_2)

elif optimiser_name == 'adam':
return optimizers.Adam(learning_rate=learning_rate, beta_1=beta_1, decay=decay,
beta_2=beta_2, amsgrad=amsgrad)
return optimizers.Adam(learning_rate=learning_rate, beta_1=beta_1, beta_2=beta_2, amsgrad=amsgrad)

elif optimiser_name == 'adadelta':
return optimizers.Adadelta(learning_rate=learning_rate, rho=rho)
Expand Down
10,001 changes: 10,001 additions & 0 deletions tests/data/sub_seqs_species.csv

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tests/test_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def test_histone_data(self):
vis = Vis(vae, vae.u, None)
vis.plot_node_hists(show_plt=True, save_fig=False)
vis.plot_node_feature_correlation(vae_df, 'external_gene_name', columns=new_cols, show_plt=True, save_fig=False)

vis.plot_feature_scatters(vae_df, 'external_gene_name', columns=new_cols, show_plt=True, fig_type="png", save_fig=True,
title="latent space", output_dir='test_figures/')
#
# vis.plot_feature_scatters(vae_df, 'external_gene_name', columns=new_cols, show_plt=True, fig_type="png", save_fig=True,
# title="latent space", output_dir='test_figures/')

cool_genes = [['Emx1', 'Eomes', 'Tbr1', 'Foxg1', 'Lhx6', 'Arx', 'Dlx1', 'Dlx2', 'Dlx5', 'Nr2e2', 'Otx2'],
['Hoxd8', 'Hoxd9', 'Hoxd10', 'Hoxd11', 'Hoxd12', 'Hoxd13', 'Hoxa7', 'Hoxa9', 'Hoxa10', 'Hoxa11',
Expand Down

0 comments on commit bfcc1fe

Please sign in to comment.