c8f605e47dcefe192f3a9b477f3e56b437615e34,pytorch_lightning/metrics/classification/precision_recall.py,Recall,compute,#Recall#,208
Before Change
if self.average == "micro":
return self.true_positives.sum().float() / (self.actual_positives.sum() + METRIC_EPS)
elif self .average == "macro":
return (self.true_positives.float() / (self.actual_positives + METRIC_EPS)).mean()
After Change
- If ``average in ["none", None]``, the shape will be ``(C,)``, where ``C`` stands for the number
of classes
tp , fp, tn, fn = self._get_final_stats()
return _recall_compute(tp, fp, tn, fn, self.average, self.mdmc_reduce)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: williamFalcon/pytorch-lightning
Commit Name: c8f605e47dcefe192f3a9b477f3e56b437615e34
Time: 2021-01-18
Author: tadej.svetina@gmail.com
File Name: pytorch_lightning/metrics/classification/precision_recall.py
Class Name: Recall
Method Name: compute
Project Name: maciejkula/spotlight
Commit Name: bc51dbc0c56f68ed30857755026633f78eef1ae8
Time: 2017-08-20
Author: maciej.kula@gmail.com
File Name: spotlight/layers.py
Class Name: BloomEmbedding
Method Name: forward
Project Name: williamFalcon/pytorch-lightning
Commit Name: c8f605e47dcefe192f3a9b477f3e56b437615e34
Time: 2021-01-18
Author: tadej.svetina@gmail.com
File Name: pytorch_lightning/metrics/classification/precision_recall.py
Class Name: Precision
Method Name: compute