Metrics return unexpected results in 0.10.0rc1
🐛 Bug
There is a chance i dont understand well how it works, but both sklearn, functional and tensor metrics seem to not behave expectedly, specifically precision and recall

To Reproduce
I used a small dummy example for y_true and y_pred for a 2 class classification problem

Code sample
import pytorch_lightning.metrics as plmetrics
import pytorch_lightning as pl
import torch

# Dummy data 
y_pred = torch.Tensor([1,0,1,0,1,1])
y_true = torch.Tensor([0,1,1,0,0,0])
## PL scikit learn test
plsk_accuracy = pl.metrics.sklearns.Accuracy()
plsk_precision = pl.metrics.sklearns.Precision()
plsk_recall = pl.metrics.sklearns.Recall()

accuracy = plsk_accuracy(y_pred, y_true)
precision = plsk_precision(y_pred, y_true)
recall = plsk_recall(y_pred, y_true)

print("PL scikit metrics precision: {}, recall: {}, accuracy: {}".format(precision, recall, accuracy))
PL scikit metrics precision: 0.375, recall: 0.375, accuracy: 0.3333333432674408
# Test for class based metrics
pl_accuracy = plmetrics.classification.Accuracy(num_classes=2)
pl_precision = plmetrics.classification.Precision(num_classes=2)
pl_recall = plmetrics.classification.Recall(num_classes=2)

accuracy = pl_accuracy(y_pred, y_true)
precision = pl_precision(y_pred, y_true)
recall = pl_recall(y_pred, y_true)

print("PL class metrics precision: {}, recall: {}, accuracy: {}".format(precision, recall, accuracy))
PL class metrics precision: 0.3333333432674408, recall: 0.3333333432674408, accuracy: 0.3333333432674408
# Normal scikit test
from sklearn.metrics import accuracy_score, precision_score, recall_score

sk_recall = recall_score(y_true.to("cpu").numpy(), y_pred.to("cpu").numpy())
sk_precision = precision_score(y_true.to("cpu").numpy(), y_pred.to("cpu").numpy())
sk_accuracy = accuracy_score(y_true.to("cpu").numpy(), y_pred.to("cpu").numpy())
print("precision: {}, recall: {}, accuracy: {}".format(sk_precision, sk_recall, sk_accuracy))
precision: 0.25, recall: 0.5, accuracy: 0.3333333333333333

Expected behavior
I expect that all 3 would yield the same precision, recall and accuracy numbers, specifically they should match scikit-learns results in the toy example above

Environment

CUDA:

GPU:

Tesla V100-SXM2-16GB


available:         True
version:           10.1


Packages:

numpy:             1.18.1
pyTorch_debug:     False
pyTorch_version:   1.5.0
pytorch-lightning: 0.10.0rc1
tqdm:              4.42.1


System:

OS:                Linux
architecture:

64bit



processor:         x86_64
python:            3.7.7
version:           #1 SMP Wed Jun 24 19:07:39 UTC 2020



Additional context