Question 20
Assume that you have trained a logistic regression model on a training dataset containing features X1 and X2. The coefficients obtained and threshold are given in Table 1.
Predict the target variable (y_pred) in the test dataset (Table 2) using the available information.
| X1 | X2 |
|---|---|
| 3 | 4 |
| -1.5 | 2 |
| -2 | -1.5 |
| 4 | 7 |
| 5 | 5 |
| -2 | 3.6 |
| -3 | 4 |
Table 2: Test Dataset
| y_act |
|---|
| 1 |
| 1 |
| 1 |
| 0 |
| 0 |
| 0 |
| 1 |
Table 3: Actual Target Variable
Based on the available information, answer the given subquestions:
What is the precision of class 0?
[Note: Enter your answer in decimal rounded to four decimal places. For example, if your answer is 0.635450, then enter the answer as “63.5450”]