max_depth = 3 # number positive/negative ligands n_pos = 1 n_neg = 1 # Set batch sizes for network test_batch_size = 128 support_batch_size = n_pos + n_neg nb_epochs = 1 n_train_trials = 1000 n_eval_trials = 20 learning_rate = 1e-4 log_every_n_samples = 50 # Number of features on conv-mols n_feat = 75 sider_tasks, dataset, transformers = load_sider_convmol() # Define metric metric = dc.metrics.Metric(dc.metrics.roc_auc_score, mode="classification") task_splitter = dc.splits.TaskSplitter() fold_datasets = task_splitter.k_fold_split(dataset, K) train_folds = fold_datasets[:-1] train_dataset = dc.splits.merge_fold_datasets(train_folds) test_dataset = fold_datasets[-1] # Train support model on train support_model = dc.nn.SequentialSupportGraph(n_feat) # Add layers
# num positive/negative ligands n_pos = 10 n_neg = 10 # Set batch sizes for network test_batch_size = 128 support_batch_size = n_pos + n_neg nb_epochs = 1 n_train_trials = 1000 n_eval_trials = 20 n_steps_per_trial = 1 learning_rate = 1e-4 log_every_n_samples = 50 # Number of features on conv-mols n_feat = 75 sider_tasks, dataset, transformers = load_sider_convmol() # Define metric metric = dc.metrics.Metric(dc.metrics.roc_auc_score, mode="classification") task_splitter = dc.splits.TaskSplitter() fold_datasets = task_splitter.k_fold_split(dataset, K) train_folds = fold_datasets[:-1] train_dataset = dc.splits.merge_fold_datasets(train_folds) test_dataset = fold_datasets[-1] # Train support model on train support_model = dc.nn.SequentialSupportGraph(n_feat) # Add layers
max_depth = 3 # num positive/negative ligands n_pos = 10 n_neg = 10 # Set batch sizes for network test_batch_size = 128 support_batch_size = n_pos + n_neg nb_epochs = 1 n_train_trials = 2000 n_eval_trials = 20 learning_rate = 1e-4 log_every_n_samples = 50 # Number of features on conv-mols n_feat = 75 sider_tasks, sider_dataset, _ = load_sider_convmol() sider_dataset = to_numpy_dataset(sider_dataset) tox21_tasks, tox21_dataset, _ = load_tox21_convmol() tox21_dataset = to_numpy_dataset(tox21_dataset) # Define metric metric = dc.metrics.Metric(dc.metrics.roc_auc_score, mode="classification") # Train support model on train support_model = dc.nn.SequentialSupportGraph(n_feat) # Add layers support_model.add(dc.nn.GraphConv(64, activation='relu')) support_model.add(dc.nn.GraphPool()) support_model.add(dc.nn.GraphConv(128, activation='relu')) support_model.add(dc.nn.GraphPool())
max_depth = 3 # number positive/negative ligands n_pos = 10 n_neg = 10 # Set batch sizes for network test_batch_size = 128 support_batch_size = n_pos + n_neg nb_epochs = 1 n_train_trials = 2000 n_eval_trials = 20 learning_rate = 1e-4 log_every_n_samples = 50 # Number of features on conv-mols n_feat = 75 sider_tasks, sider_dataset, _ = load_sider_convmol() sider_dataset = to_numpy_dataset(sider_dataset) tox21_tasks, tox21_dataset, _ = load_tox21_convmol() tox21_dataset = to_numpy_dataset(tox21_dataset) # Define metric metric = dc.metrics.Metric(dc.metrics.roc_auc_score, mode="classification") # Train support model on train support_model = dc.nn.SequentialSupportGraph(n_feat) # Add layers support_model.add(dc.nn.GraphConv(64, activation='relu')) support_model.add(dc.nn.GraphPool()) support_model.add(dc.nn.GraphConv(128, activation='relu')) support_model.add(dc.nn.GraphPool())