plot - Plotting a table in R -


I is used to display the results in a confusion matrix table function KNN / SVM classification I am doing .

Example:

  svmE1071 & lt; - Function (x, y, type) {library (e1071) (...) confTab & lt; - Table (Month = Pred, true = y [, 1]) Return (confTab)} MyKknn (y, yUnknown) unknown yWohn1 6 yFlur1 18 yBad1 12 & gt; SvmE1071 (y, yUnknown, "linear") True Future Unknown yWohn1 3 yFlur1 25 yBad1 8 & gt; SvmE1071 (y, yUnknown, "multilateral") true future unknown yWohn1 8 yFlur1 20 yBad1 8 & gt; svmE1071 (y, yUnknown, "radial") (...)  

I How can a barplot with many confusion matrix (classified as barplot) in such research ? Of

  yWohn1 xxxx KNN yFlur1 xxxxxxxxxxxxxxx yBad1 XXXXXXXX yWohn1 X SVMl yFlur1 XXXXXXXXXXXX yBad1 xxxxxxxxxxx (...)  

You must first assign your table to some variable:

  table1 < - svm (...) table2 & lt; - svm (...). ..  

Then you can combine them with cbind are:

  allTables & lt; - cbind (table1, table2, ...)  

And then use barplot:

  barplot (allTables, = true next name = C ("SVN", "KNN"))  

For more information, ? See the barplot .


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -