**Incorrect Precision/Recall/F1 score compared to sklearn**
https://github.com/PyTorchLightning/pytorch-lightning/issues/3035

Aug 18, 2020 · import torch import numpy as np import pytorch_lightning as pl from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score print(pl.__version__) #### Generate binary data pl.seed_everything(2020) n = 10000 # number of samples y = np.random.choice([0, 1], n) y_pred = np.random.choice([0, 1], n, p=[0.1, 0.9]) y_tensor = torch.tensor(y) y_pred_tensor = …

**DA:** 56 **PA:** 17 **MOZ Rank:** 25