Hi,
Answer contradicts with section 10, unit 9?
Course Name: Python for Machine Learning in Finance, Section No: 10, Unit No: 11, Unit type: Quiz
Hi,
Answer contradicts with section 10, unit 9?
Course Name: Python for Machine Learning in Finance, Section No: 10, Unit No: 11, Unit type: Quiz
Hi RR,
Precision is a metric used to measure how accurate a model’s “positive” predictions are. In trading terms, this usually means checking how often a model’s “Buy” signals were actually correct.
What is Precision?
Precision answers this question:
Out of all the times the model said “Buy”, how many times was it actually right?
It does not care about missed opportunities (when it should have said “Buy” but didn’t), only about the correctness of the predictions it did make.
How to Calculate Precision:
The formula for precision is:
Precision = True Positives / (True Positives + False Positives)
Where:
Example from Confusion Matrix:
From the table:
Predicted: Do Not Buy | Predicted: Buy | |
---|---|---|
Actual: Price did NOT go up | 50 | 20 |
Actual: Price went up | 30 | 100 |
In this case:
Using the formula:
Precision = 100 / (100 + 20) = 100 / 120 = 0.8333
So the precision is 83.33%
This means that when the model gave a “Buy” signal, it was correct about 83% of the time.
Which Definition Best Matches Precision?
Let’s look at the options:
Correct Answer: Option 3
This matches the formula for precision:
Precision = Correct Buy Predictions / All Buy Predictions
Summary:
This taken from which AI powered chatbot?
This is drafted message with AI formatting. You can use any free available chatbots to respond in markdown code. Try prompt markdown {text}
.
Hi,
See the confusion matrix.
Actual \ Predicted | 0 | 1 |
---|---|---|
0 (Negative) | True Negative | False Positive |
1 (Positive) | False Negative | True Positive |
Precision measures how many of the predicted buy signals were actually correct.
Precision = True Positive / (True Positive + False Positive)
Now using the same idea,
Precision for Buy = Buy signals predicted correctly (True Positive)/ Total Number of Buy signals given by the algorithm (True Positive+ False Positive)
Recall measures how many of the actual buy opportunities were correctly identified.
Recall = True Positive / (True Positive + False Negative)
So for our case,
Recall for Buy = Buy signals predicted correctly (True Positive) / Total Number of actual Buy opportunities (True Positive + False Negative)
So, both the answers in unit 9 and 11 are correct.
Noted and thanks for the answer.