No, it's not possible to calculate the accuracy solely based on Precision and Recall. Building up on the previous answers, even if you know the sample size $N$, you'd still need more information.
Given that:
- $N = TP+TN+FP+FN \implies TN = N-(TP+FP+FN)$
- Precision is defined as $P = \frac{TP}{TP+FP}$
- Recall is defined as $R = \frac{TP}{TP+FN}$
- Accuracy is defined as $Acc = \frac{TN+TP}{N}$
We have:
$Acc = \frac{TN+TP}{N} = \frac{N-(TP+FP+FN)+TP}{N}=\frac{N-FP-FN}{N}$
In order to continue, we would need to have $FP$ and $FN$, or simply $TP$. We can obtain $FP = \frac{TP \cdot (1-P)}{P}$ from the Precision definition, and $FN = \frac{TP \cdot (1-R)}{R}$ from the Recall definition. But without knowing the value of $TP$, we cannot reach a solution.