1a0a14ac9ca854a013083c7430221167283329e7,examples/muv/muv_tf.py,,,#,20
Before Change
reload = True
verbosity = "high"
base_dir = "/tmp/muv_tf"
model_dir = os.path.join(base_dir, "model")
if os.path.exists(base_dir):
shutil.rmtree(base_dir)
os.makedirs(base_dir)
// Load MUV data
muv_tasks, muv_datasets, transformers = load_muv(
base_dir, reload=reload)
train_dataset, valid_dataset = muv_datasets
n_features = 1024
// Build model
classification_metric = Metric(metrics.roc_auc_score, np.mean,
verbosity=verbosity,
mode="classification")
tensorflow_model = TensorflowMultiTaskClassifier(
len(muv_tasks), n_features, model_dir, dropouts=[.25],
learning_rate=0.001, weight_init_stddevs=[.1],
batch_size=64, verbosity=verbosity)
model = TensorflowModel(tensorflow_model, model_dir)
// Fit trained model
model.fit(train_dataset)
model.save()
train_evaluator = Evaluator(model, train_dataset, transformers, verbosity=verbosity)
train_scores = train_evaluator.compute_model_performance([classification_metric])
print("Train scores")
print(train_scores)
valid_evaluator = Evaluator(model, valid_dataset, transformers, verbosity=verbosity)
valid_scores = valid_evaluator.compute_model_performance([classification_metric])
print("Validation scores")
print(valid_scores)
After Change
model.fit(train_dataset)
// Evaluate train/test scores
train_scores = model.evaluate(train_dataset, [metric], transformers)
valid_scores = model.evaluate(valid_dataset, [metric], transformers)
print("Train scores")
print(train_scores)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: deepchem/deepchem
Commit Name: 1a0a14ac9ca854a013083c7430221167283329e7
Time: 2016-11-02
Author: bharath.ramsundar@gmail.com
File Name: examples/muv/muv_tf.py
Class Name:
Method Name:
Project Name: deepchem/deepchem
Commit Name: 1a0a14ac9ca854a013083c7430221167283329e7
Time: 2016-11-02
Author: bharath.ramsundar@gmail.com
File Name: examples/muv/muv_tf.py
Class Name:
Method Name:
Project Name: deepchem/deepchem
Commit Name: 1a0a14ac9ca854a013083c7430221167283329e7
Time: 2016-11-02
Author: bharath.ramsundar@gmail.com
File Name: examples/tox21/tox21_tf_models.py
Class Name:
Method Name:
Project Name: deepchem/deepchem
Commit Name: a1a2b8475e0a1bde9eec14125b15829228aa55e9
Time: 2016-11-03
Author: bharath.ramsundar@gmail.com
File Name: examples/muv/muv_keras.py
Class Name:
Method Name: