Plotting Multiple Weka Results in R Console

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Plotting Multiple Weka Results in R Console

gokhan.satilmis@gmail.com
Hello,

I woud like to plot multiple classification algorithms results on the same
graph. I think this can be possible by using R Console.

Do you have any suggestions where I should start ?

I attached two examples of buffer results.

=== Run information ===

Scheme:       weka.classifiers.mlr.MLRClassifier -learner regr.svm -batch
100 -S 1
Relation:     Bigdata-weka.filters.unsupervised.attribute.Remove-R3-9,15
Instances:    17010
Attributes:   7
              Frequency
              RealS11
              DrainVoltage
              DrainCurrent
              GateVoltage
              GateCurrent
              Width
Test mode:    split 50.0% train, remainder test

=== Classifier model (full training set) ===

Learner regr.svm from package e1071
Type: regr
Name: Support Vector Machines (libsvm); Short name: svm
Class: regr.svm
Properties: numerics,factors
Predict-Type: response
Hyperparameters:


Call:
svm.default(x = d$data, y = d$target)


Parameters:
   SVM-Type:  eps-regression
 SVM-Kernel:  radial
       cost:  1
      gamma:  0.1666667
    epsilon:  0.1


Number of Support Vectors:  2476



Time taken to build model: 12.99 seconds

=== Evaluation on test split ===

Time taken to test model on test split: 0.77 seconds

=== Summary ===

Correlation coefficient                  0.9245
Mean absolute error                      0.0057
Root mean squared error                  0.0185
Relative absolute error                 15.6293 %
Root relative squared error             38.5245 %
Total Number of Instances             8505    



=== Run information ===

Scheme:       weka.classifiers.mlr.MLRClassifier -learner regr.rpart -batch
100 -S 1
Relation:     Bigdata-weka.filters.unsupervised.attribute.Remove-R3-9,15
Instances:    17010
Attributes:   7
              Frequency
              RealS11
              DrainVoltage
              DrainCurrent
              GateVoltage
              GateCurrent
              Width
Test mode:    split 50.0% train, remainder test

=== Classifier model (full training set) ===

Learner regr.rpart from package rpart
Type: regr
Name: Decision Tree; Short name: rpart
Class: regr.rpart
Properties: missings,numerics,factors,ordered,weights,featimp
Predict-Type: response
Hyperparameters: xval=0

n= 17010

node), split, n, deviance, yval
      * denotes terminal node

 1) root 17010 39.1627000 0.9564078  
   2) Frequency>=2.6e+10 6480 16.1740700 0.9139802  
     4) Width>=92.5 2592  5.4018240 0.8833672  
       8) GateVoltage>=-0.75 864  2.1126920 0.8471484  
        16) Frequency>=3.4e+10 432  0.8194501 0.8156751 *
        17) Frequency< 3.4e+10 432  0.4373905 0.8786217 *
       9) GateVoltage< -0.75 1728  1.5890390 0.9014766  
        18) Frequency>=3.4e+10 864  0.5375916 0.8803445 *
        19) Frequency< 3.4e+10 864  0.2797804 0.9226087 *
     5) Width< 92.5 3888  6.7237370 0.9343889  
      10) Width< 52.5 432  1.7862370 0.8662279  
        20) GateVoltage>=-1.75 288  0.9375712 0.8417348 *
        21) GateVoltage< -1.75 144  0.3303417 0.9152141 *
      11) Width>=52.5 3456  2.6795860 0.9429090  
        22) Width>=72.5 1728  1.3894640 0.9283049  
          44) GateCurrent>=-3.165e-19 288  0.2750989 0.8913652 *
          45) GateCurrent< -3.165e-19 1440  0.6427804 0.9356928 *
        23) Width< 72.5 1728  0.5530269 0.9575131 *
   3) Frequency< 2.6e+10 10530  4.1457250 0.9825171  
     6) Frequency>=1.6e+10 4050  1.8159980 0.9653346  
      12) Width>=97.5 1350  0.5449486 0.9505821 *
      13) Width< 97.5 2700  0.8303388 0.9727108 *
     7) Frequency< 1.6e+10 6480  0.3866907 0.9932561 *


Time taken to build model: 1.36 seconds

=== Evaluation on test split ===

Time taken to test model on test split: 0.3 seconds

=== Summary ===

Correlation coefficient                  0.9104
Mean absolute error                      0.0133
Root mean squared error                  0.0199
Relative absolute error                 36.2754 %
Root relative squared error             41.3922 %
Total Number of Instances             8505  


















--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Plotting Multiple Weka Results in R Console

Eibe Frank-2
Administrator
You mean a bar chart comparing classification accuracy or similar of the two algorithms? One way to do this is to use the Experimenter followed by the Explorer:

1) Set up an experiment in the Experimenter that has the two algorithms and the dataset you want to compare them on.

2) Run the experiment.

3) When the experiment is done, go to the "Analyze" tab of the Experimenter and click on "Experiment". Then, click on "Open Explorer...".

4) The Explorer window that has opened will have the dataset containing all your experimental results. Switch to the "RConsole" tab (assuming you have the RPlugin installed).

5) In the "RConsole" tab, enter the command

barplot(by(rdata$Percent_correct, interaction(rdata$Key_Scheme, rdata$Key_Scheme_options), mean))

Cheers,
Eibe



On Tue, Dec 17, 2019 at 8:00 AM [hidden email] <[hidden email]> wrote:
Hello,

I woud like to plot multiple classification algorithms results on the same
graph. I think this can be possible by using R Console.

Do you have any suggestions where I should start ?

I attached two examples of buffer results.

=== Run information ===

Scheme:       weka.classifiers.mlr.MLRClassifier -learner regr.svm -batch
100 -S 1
Relation:     Bigdata-weka.filters.unsupervised.attribute.Remove-R3-9,15
Instances:    17010
Attributes:   7
              Frequency
              RealS11
              DrainVoltage
              DrainCurrent
              GateVoltage
              GateCurrent
              Width
Test mode:    split 50.0% train, remainder test

=== Classifier model (full training set) ===

Learner regr.svm from package e1071
Type: regr
Name: Support Vector Machines (libsvm); Short name: svm
Class: regr.svm
Properties: numerics,factors
Predict-Type: response
Hyperparameters:


Call:
svm.default(x = d$data, y = d$target)


Parameters:
   SVM-Type:  eps-regression
 SVM-Kernel:  radial
       cost:  1
      gamma:  0.1666667
    epsilon:  0.1


Number of Support Vectors:  2476



Time taken to build model: 12.99 seconds

=== Evaluation on test split ===

Time taken to test model on test split: 0.77 seconds

=== Summary ===

Correlation coefficient                  0.9245
Mean absolute error                      0.0057
Root mean squared error                  0.0185
Relative absolute error                 15.6293 %
Root relative squared error             38.5245 %
Total Number of Instances             8505     



=== Run information ===

Scheme:       weka.classifiers.mlr.MLRClassifier -learner regr.rpart -batch
100 -S 1
Relation:     Bigdata-weka.filters.unsupervised.attribute.Remove-R3-9,15
Instances:    17010
Attributes:   7
              Frequency
              RealS11
              DrainVoltage
              DrainCurrent
              GateVoltage
              GateCurrent
              Width
Test mode:    split 50.0% train, remainder test

=== Classifier model (full training set) ===

Learner regr.rpart from package rpart
Type: regr
Name: Decision Tree; Short name: rpart
Class: regr.rpart
Properties: missings,numerics,factors,ordered,weights,featimp
Predict-Type: response
Hyperparameters: xval=0

n= 17010

node), split, n, deviance, yval
      * denotes terminal node

 1) root 17010 39.1627000 0.9564078 
   2) Frequency>=2.6e+10 6480 16.1740700 0.9139802 
     4) Width>=92.5 2592  5.4018240 0.8833672 
       8) GateVoltage>=-0.75 864  2.1126920 0.8471484 
        16) Frequency>=3.4e+10 432  0.8194501 0.8156751 *
        17) Frequency< 3.4e+10 432  0.4373905 0.8786217 *
       9) GateVoltage< -0.75 1728  1.5890390 0.9014766 
        18) Frequency>=3.4e+10 864  0.5375916 0.8803445 *
        19) Frequency< 3.4e+10 864  0.2797804 0.9226087 *
     5) Width< 92.5 3888  6.7237370 0.9343889 
      10) Width< 52.5 432  1.7862370 0.8662279 
        20) GateVoltage>=-1.75 288  0.9375712 0.8417348 *
        21) GateVoltage< -1.75 144  0.3303417 0.9152141 *
      11) Width>=52.5 3456  2.6795860 0.9429090 
        22) Width>=72.5 1728  1.3894640 0.9283049 
          44) GateCurrent>=-3.165e-19 288  0.2750989 0.8913652 *
          45) GateCurrent< -3.165e-19 1440  0.6427804 0.9356928 *
        23) Width< 72.5 1728  0.5530269 0.9575131 *
   3) Frequency< 2.6e+10 10530  4.1457250 0.9825171 
     6) Frequency>=1.6e+10 4050  1.8159980 0.9653346 
      12) Width>=97.5 1350  0.5449486 0.9505821 *
      13) Width< 97.5 2700  0.8303388 0.9727108 *
     7) Frequency< 1.6e+10 6480  0.3866907 0.9932561 *


Time taken to build model: 1.36 seconds

=== Evaluation on test split ===

Time taken to test model on test split: 0.3 seconds

=== Summary ===

Correlation coefficient                  0.9104
Mean absolute error                      0.0133
Root mean squared error                  0.0199
Relative absolute error                 36.2754 %
Root relative squared error             41.3922 %
Total Number of Instances             8505 


















--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html