0d0bf039265afd094eebfd4cd5bb1bc8438a5ec1,deepchem/models/tests/test_api.py,TestAPI,test_singletask_sklearn_rf_user_specified_regression_API,#TestAPI#,100
Before Change
for transformer in transformers:
dataset = transformer.transform(dataset)
regression_metrics = [Metric(metrics.r2_score),
Metric(metrics.mean_squared_error),
Metric(metrics.mean_absolute_error)]
sklearn_model = RandomForestRegressor()
model = SklearnModel(sklearn_model, self.model_dir)
// Fit trained model
model.fit(train_dataset)
model.save()
// Eval model on train
evaluator = Evaluator(model, train_dataset, transformers, verbosity=True)
_ = evaluator.compute_model_performance(regression_metrics)
// Eval model on test
evaluator = Evaluator(model, test_dataset, transformers, verbosity=True)
_ = evaluator.compute_model_performance(regression_metrics)
def test_singletask_sklearn_rf_RDKIT_descriptor_regression_API(self):
Test of singletask RF RDKIT-descriptor regression API.
After Change
splitter = dc.splits.SpecifiedSplitter(input_file, "split")
train_dataset, test_dataset = splitter.train_test_split(dataset)
transformers = [dc.transformers.NormalizationTransformer(
transform_y=True, dataset=train_dataset)]
for dataset in [train_dataset, test_dataset]:
for transformer in transformers:
dataset = transformer.transform(dataset)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: deepchem/deepchem
Commit Name: 0d0bf039265afd094eebfd4cd5bb1bc8438a5ec1
Time: 2016-10-30
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/tests/test_api.py
Class Name: TestAPI
Method Name: test_singletask_sklearn_rf_user_specified_regression_API
Project Name: deepchem/deepchem
Commit Name: 0d0bf039265afd094eebfd4cd5bb1bc8438a5ec1
Time: 2016-10-30
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/tests/test_api.py
Class Name: TestAPI
Method Name: test_singletask_tf_mlp_ECFP_classification_API
Project Name: deepchem/deepchem
Commit Name: b3463f05941b7a08f1e9564ceb1402f6f17f0ae2
Time: 2020-07-17
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/utils/test/test_evaluate.py
Class Name: TestEvaluator
Method Name: test_generator_evaluator_dc_metric_multitask_single_point
Project Name: deepchem/deepchem
Commit Name: b3463f05941b7a08f1e9564ceb1402f6f17f0ae2
Time: 2020-07-17
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/utils/test/test_evaluate.py
Class Name: TestEvaluator
Method Name: test_generator_evaluator_dc_metric_multitask