Given a vector of binary classification instances and the corresponding probability values
created by a classification model, calculate the F1 score of the model if the threshold is set to
0.55.
actual <- c(1, 0, 1, 1, 0, 0, 1, 0, 1, 1)
predicted_prob <- c(0.78, 0.34, 0.65, 0.83, 0.45, 0.30, 0.70, 0.50, 0.92, 0.80)
Hint:
• Convert the predicted probabilities to binary predictions using a threshold of 0.55.