Hey Guys,
I just started working on one of machine learning project in which i used python with few libraries.
One among them is Scikit-Learn which is amazing tool for doing machine learning techniques like
data preprocessing and data mining.
Official link to the site https://scikit-learn.org/stable/
In this today we talk about confusion matrix:
So , Basically we used some of the classification algorithms of scikit to classify the test data based on trained data.
A basic example if we take from scikit site :
Confusion_Matrix :
Now , consider this example where system predicted values [y_pred] are [0, 0, 2, 2, 0, 2] but real values are
Here the classes (nothing but the values are 0,1,2)
so Lets put matrix like this
Predicted 0 1 2
True
0 2 0 0
1 0 0 1
2 1 0 2
How it is formed:
Lets take the true values array : [2, 0, 2, 2, 0, 1]. Lets go one by one
for 2 : y_pred array first element is 0 --> its predicted in-correctly. put 1 for (2,0)
for 0 : y_pred array second element is 0 --> its predicted correctly . put 1 for
(0,0)
for 2: y_pred array third element is 2 --> its predicted correctly . put 1 for
(2,2)
for 2: y_pred array fourth element is 2 --> its predicted correctly . increment 1 for (2,2) which becomes 2.
for 0: y_pred array fifth element is 0 --> its predicted correctly . increment 1 for (0,0) which becomes 2.
for 1: y_pred array sixth element is 2 --> its predicted in-correctly . put 1 for
(1,2)
Now you if you see the matrix diagonal, all are correct predicted values.
Hope you got it now. Thanks :)
NS2 downloads,Angular js ,NS2 TCL Scripts,NS2 Install,NS2 Awk,Xgraph,NS2 research,NS2 problems,NS2 trace files, NS2 help,NS2 solutions,NS2 routing protocols download,MAODV download,PUMA download,AODV awk scripts,AODV throughput download,awk script for AODV,energy for AODV,end-toend delay for NS2,jitter for NS2,
No comments:
Post a Comment