I have actual values and predicted values.
Actual: 33.3663, 38.2561, 28.6362, 35.6252
Predicted: 28.9721, 35.6161, 27.9561, 22.6272
I want to apply confusion matrix to find the accuracy.
I have actual values and predicted values.
Actual: 33.3663, 38.2561, 28.6362, 35.6252
Predicted: 28.9721, 35.6161, 27.9561, 22.6272
I want to apply confusion matrix to find the accuracy.
First thing, confusion matrix is not for continuous values. AND you can also use it by converting continuous values to classes. check https://datascience.stackexchange.com/questions/46019/continuous-variable-not-supported-in-confusion-matrix
from sklearn.metrics import confusion_matrix
expected = [1, 1, 0, 1, 0, 0, 1, 0, 0, 0]
predicted = [1, 0, 0, 1, 0, 0, 1, 1, 1, 0]
results = confusion_matrix(expected, predicted)
print(results)
[[4 2]
[1 3]]
https://machinelearningmastery.com/confusion-matrix-machine-learning/