Skip to content

Commit

Permalink
make gnn default size smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
borauyar committed Jul 3, 2024
1 parent a389225 commit 52bb1be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions flexynesis/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ class AvailableModels(NamedTuple):
# overlay datasets with network info
# this is a temporary solution
print("[INFO] Overlaying the dataset with network data from STRINGDB")
obj = STRING('STRING', "9606", "gene_name")
obj = STRING(os.path.join(args.data_path, '_'.join(['processed', args.prefix])),
args.string_organism, args.string_node_name)
train_dataset = MultiOmicDatasetNW(train_dataset, obj.graph_df)
train_dataset.print_stats()
test_dataset = MultiOmicDatasetNW(test_dataset, obj.graph_df)
Expand Down Expand Up @@ -310,7 +311,7 @@ class AvailableModels(NamedTuple):
# compute feature importance values
print("[INFO] Computing variable importance scores")
for var in model.target_variables:
model.compute_feature_importance(train_dataset, var, steps = 50)
model.compute_feature_importance(train_dataset, var, steps = 25)
df_imp = pd.concat([model.feature_importances[x] for x in model.target_variables],
ignore_index = True)
df_imp.to_csv(os.path.join(args.outdir, '.'.join([args.prefix, 'feature_importance.csv'])), header=True, index=False)
Expand Down
2 changes: 1 addition & 1 deletion flexynesis/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
],
'GNNEarly': [
Integer(16, 128, name='latent_dim'),
Real(0.2, 1, name='hidden_dim_factor'), # relative size of the hidden_dim w.r.t input_dim
Real(0.1, 0.25, name='hidden_dim_factor'), # relative size of the hidden_dim w.r.t input_dim
Real(0.0001, 0.01, prior='log-uniform', name='lr'),
Integer(8, 32, name='supervisor_hidden_dim'),
Categorical(epochs, name='epochs'),
Expand Down

0 comments on commit 52bb1be

Please sign in to comment.