Implement performance_metrics(actual, predicted) for binary labels (1 = positive, 0 = negative). Both lists have the same length.
Return the tuple (confusion_matrix, accuracy, f1_score, specificity, negative_predictive_value):
confusion_matrix is the nested list [[TP, FN], [FP, TN]] (integers).
- accuracy=TP+TN+FP+FNTP+TN
- F1=precision+recall2⋅precision⋅recall, with precision=TP+FPTP and recall=TP+FNTP
- specificity=TN+FPTN
- NPV=TN+FNTN
Round the four floats to 3 decimal places.