31b60db18f5d5b7b5723bc8e76f3ae38bedca335,deepchem/models/multitask.py,SingletaskToMultitask,predict_proba,#SingletaskToMultitask#Any#Any#Any#,148
Before Change
n_samples = len(dataset)
y_pred = np.zeros((n_samples, n_tasks, n_classes))
for ind, task in enumerate(self.tasks):
if self.store_in_memory:
task_model = self.task_models[task]
else:
task_model = self.model_builder(
[task], {task: self.task_types[task]}, self.model_params,
self.task_model_dirs[task],
verbosity=self.verbosity)
task_model.reload()
y_pred[:, ind] = np.squeeze(task_model.predict_proba(
dataset, transformers, n_classes))
return y_pred
After Change
n_samples = len(dataset)
y_pred = np.zeros((n_samples, n_tasks, n_classes))
for ind, task in enumerate(self.tasks):
task_model = self.model_builder(self.task_model_dirs[task])
task_model.reload()
y_pred[:, ind] = np.squeeze(task_model.predict_proba(
dataset, transformers, n_classes))
return y_pred
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 21
Instances
Project Name: deepchem/deepchem
Commit Name: 31b60db18f5d5b7b5723bc8e76f3ae38bedca335
Time: 2016-09-19
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/multitask.py
Class Name: SingletaskToMultitask
Method Name: predict_proba
Project Name: deepchem/deepchem
Commit Name: 31b60db18f5d5b7b5723bc8e76f3ae38bedca335
Time: 2016-09-19
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/multitask.py
Class Name: SingletaskToMultitask
Method Name: predict
Project Name: deepchem/deepchem
Commit Name: 31b60db18f5d5b7b5723bc8e76f3ae38bedca335
Time: 2016-09-19
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/multitask.py
Class Name: SingletaskToMultitask
Method Name: predict_on_batch
Project Name: deepchem/deepchem
Commit Name: 31b60db18f5d5b7b5723bc8e76f3ae38bedca335
Time: 2016-09-19
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/multitask.py
Class Name: SingletaskToMultitask
Method Name: predict_proba