Mean absolute error in classification

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

Mean absolute error in classification

Ge Hyun Nam
Hi all,

how is the mean absolute error calculated in classification? In numeric prediction it is: {|p1-a1|+....+|pn-an|}/n. But what is the difference of predicted values pi and actual value ai in classification?
I am trying to figure out how weka came out with the following value of the Mean absolute error:

Correctly Classified Instances        4520               47.494  %
Incorrectly Classified Instances      4997               52.506  %
Mean absolute error                      0.2717
Total Number of Instances             9517    

    a    b    c    d    e   <-- classified as
  566  589  226   31    1 |    a = '(-inf--0.0025]'
  209  647  364   71    8 |    b = '(-0.0025--0.0015]'
  181  681  708  390   60 |    c = '(-0.0015-0]'
   31  134  367 1178  823 |    d = '(0-0.0015]'
    1   17   66  747 1421 |    e = '(0.0015-inf)'


Thank you for your help.
Regards

G. Nam
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: Mean absolute error in classification

Peter Reutemann-2
> how is the mean absolute error calculated in classification? In numeric
> prediction it is: {|p1-a1|+....+|pn-an|}/n. But what is the difference of
> predicted values pi and actual value ai in classification?
> I am trying to figure out how weka came out with the following value of
> the Mean absolute error:
>
> Correctly Classified Instances        4520               47.494  %
> Incorrectly Classified Instances      4997               52.506  %
> Mean absolute error                      0.2717
> Total Number of Instances             9517
>
>     a    b    c    d    e   <-- classified as
>   566  589  226   31    1 |    a = '(-inf--0.0025]'
>   209  647  364   71    8 |    b = '(-0.0025--0.0015]'
>   181  681  708  390   60 |    c = '(-0.0015-0]'
>    31  134  367 1178  823 |    d = '(0-0.0015]'
>     1   17   66  747 1421 |    e = '(0.0015-inf)'

For each instance in the test set, Weka obtains a distribution (for each
class label a value from 0 to 1, i.e., 0-100%). This distribution is
matched against the expected distribution (the expected class label has 1
in that array, the others 0). For each class label the following is
calculated:
  AbsErrPerLabel = abs(actual - predicted)/# of class labels

The absolute error per Instance is than the sum of these:
  AbsErrPerInstance = Sum(AbsPerLabel)

(Note: The instance weight is taken into account as well. But this is
normally just 1.)

The mean absolute error is the sum over all the instances and their
AbsErrPerInstance divided by the number of instances in the test set with
an actual class label (that should normally be all of them).
  MeanAbsErr = Sum(AbsErrPerInstance) / # inst. with class label

See the following methods in the weka.classifiers.Evaluation class:
  updateStatsForClassifier(double[],Instance)
  updateNumericScores(double[],double[],weight)

HTH

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174



_______________________________________________
Wekalist mailing list
[hidden email]
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
Reply | Threaded
Open this post in threaded view
|

Re: Mean absolute error in classification

el_iconoclasta
Hello Peter, I'm trying to figure out how to get the MAE, starting from the confusion matrix provided by Ge Hyun Nam and trying to apply your explanations, but I'm not getting there at all. I should also note that I'm not a java programmer and normally I use Weka from the command line (with a cygwin shell) or the GUI, complementing that with R to analyse the outputs generated.

My reasoning was as follows:

All the instances in the diagonal are correctly classified, so they don't add up to the total error (actual - predicted = 0). On the contrary, the other instances should add 1/5 for the actual label error (AbsErrPerLabel)*, 1/5 for the incorrectly classified label error**, while they add zero for the rest of the labels... so all in all, I add 2/5 for each incorrectly classified instance. At the end I get:

4997 = Incorrectly classified instances
9517 = Total number of instances
5    =  Number of labels

4997 * (2 / 5) / 9517 = 0.2100242

Which is not the error that Weka writes in the output (0.2717).

I'm trying to figure out what I'm getting wrong, but I cannot find what it is. I find it twice as difficult since your explanations seems to be made from the perspective of a loop through all the instances, while I'm trying to calculate the MAE from a confusion matrix.

Thanks for all,

Juan

* (actual = 1, predicted = 0, so actual - predicted = 1 and abs(1)/5 = 1/5).
** (actual = 0, predicted = 1, so actual - predicted = -1 and abs(-1)/5 = 1/5).
Reply | Threaded
Open this post in threaded view
|

Re: Mean absolute error in classification

el_iconoclasta
This post was updated on .
Please don't mind my previous post, I just came to see what was my problem understanding the MAE.

I'll try to explain it here, in case it is useful for someone in the future.
First of all, this is a dummy example I ran in my PC (Windows machine), using
cygwin (which is just like any linux shell, basically):

    heap_space=1G
    weka_path="C:\weka.jar"
    train_file="C:\iris.arff"

    java -Xmx$heap_space -cp "$weka_path" weka.classifiers.trees.J48 -C 0.25 -M 2 \
      -t $train_file \
      -classifications "weka.classifiers.evaluation.output.prediction.CSV -distribution -decimals 20 -file C:\classif.csv"

    wait
    # To get rid of those pesky + and * signs in the exported table...
    sed "s/\*\|+//g" /cygdrive/c/classif.csv > tmp.csv
    mv tmp.csv /cygdrive/c/classif.csv

The iris.arff set is the one that comes with Weka 3.7 (and any other version
of course)*.

This code generates the file C:\classif.csv, which has a table that looks like
this:

    inst#,actual,predicted,error,distribution,,
    1,3:Iris-virginica,3:Iris-virginica,,0,0.02439024390243902464,0.975609756097561
    2,3:Iris-virginica,3:Iris-virginica,,0,0.02439024390243902464,0.975609756097561
    3,3:Iris-virginica,3:Iris-virginica,,0,0.02439024390243902464,0.975609756097561
    ...

Here are the distributions that Peter mentions in his answer:

>> For each instance in the test set, Weka obtains a distribution (for each
>> class label a value from 0 to 1, i.e., 0-100%). This distribution is
>> matched against the expected distribution (the expected class label has 1
>> in that array, the others 0). For each class label the following is
>> calculated:
>>   AbsErrPerLabel = abs(actual - predicted)/# of class labels

It took me too long to realize that Peter was referring to the values under
the column distribution (and the others after that) of the classifications
table shown above. For example, for the instance 1, the distribution given by
Weka is:

    0  0.02439024390243902464  0.975609756097561

(note that it adds up to 1; the order is the same as the order of the labels:
fist = Setosa, second = Versicolor & third = Virginica)

I personally think that "distribution" it's a very vague name.
I would rather call them something like prediction scores maybe, as
distribution can be many things in this context (for example, the
actual distribution of clases in the dataset).

Anyway, in the case of this instance, the error is very simple to calculate.
First, the Expected distribution for the instance would be:

    0 0 1

Since it's an instance of Iris virginica. Then the error is:

    abs(0 - 0)/3 + abs(0.02439024390243902464 - 0)/3 + abs(0.975609756097561 - 1)/3
    = 0.01626016

Repeating this for all the instances and summing up, I get 5.246992, which
divided by 150 is 0.0349799, and that's the same answer I get with Weka.

Well, it took me some time to write all this, but at least it can be helpfull
for someone else.

Cheers,
Juan Manuel

*Is not too hard to replicate this using the GUI: go to "More options..." in
the Classfy tab and then configure the "Output predictions" to generate a CSV
table. However, you will get a file with + and * signs in the middle of
numeric columns, which are not a small anoyance.

PS:

For R users, this code can be used to calculate MAE and RMSE from the
classifications table, getting the same result as with Weka:

    classif <- read.csv("C:/classif.csv")[,-4]
    names(classif) <- c("Inst", "Actual", "Predicted", "Setosa", "Versicolor", "Virginica")
    classif$Inst <- 1:nrow(classif)
    levels(classif$Actual) <- c("Setosa", "Versicolor", "Virginica")
    levels(classif$Predicted) <- c("Setosa", "Versicolor", "Virginica")

    classif$E_setosa <- ifelse(classif$Actual == "Setosa", 1, 0)
    classif$E_versicolor <- ifelse(classif$Actual == "Versicolor", 1, 0)
    classif$E_virginica <- ifelse(classif$Actual == "Virginica", 1, 0)

    MSE <-
      sum(abs(classif[,4:6] - classif[,7:9])) / (3 * nrow(classif))
    RMSE <-
      sqrt(sum((classif[,4:6] - classif[,7:9]) ** 2) / (3 * nrow(classif)))


Reply | Threaded
Open this post in threaded view
|

Re: Mean absolute error in classification

kenny57
Hi man I tried to realize the example you described, but I just dont get
5.246992 ... just 66,773

1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 3:Iris-virginica + -   0,20 0,80 -   1 -  
0,533
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,015
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,015
3 3:Iris-virginica 3:Iris-virginica -   0,25 0,75 -   -   1
0,167
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,015
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,015
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
12 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
13 2:Iris-versicolor 3:Iris-virginica + -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
15 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   -   1,00 -   -   1 -  
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 2:Iris-versicolor + -   -   1,00 -   -   1
-  
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 2:Iris-versicolor + -   -   1,00 1 -   -  
0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
12 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
13 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
14 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
15 2:Iris-versicolor 2:Iris-versicolor -   -   1,00 -   1 -  
0,667
1 3:Iris-virginica 3:Iris-virginica -   -   1,00 -   -   1 -  
2 3:Iris-virginica 3:Iris-virginica -   -   1,00 -   -   1 -  
3 3:Iris-virginica 3:Iris-virginica -   -   1,00 -   -   1 -  
4 3:Iris-virginica 2:Iris-versicolor + -   0,02 0,98 -   -   1
0,015
5 3:Iris-virginica 3:Iris-virginica -   -   1,00 -   -   1 -  
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,652
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,652
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,652
14 2:Iris-versicolor 3:Iris-virginica + -   -   1,00 -   1 -  
0,667
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,652
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   -   1,00 -   -   1 -  
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
1 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
2 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
3 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
4 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
5 3:Iris-virginica 3:Iris-virginica -   0,02 0,98 -   -   1
0,016
6 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
7 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
8 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
9 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
10 1:Iris-setosa 1:Iris-setosa -   -   1,00 1 -   -   0,667
11 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
12 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
13 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
14 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651
15 2:Iris-versicolor 2:Iris-versicolor -   0,02 0,98 -   1 -  
0,651

                                                                                                                                       
66,773

So, could you help me please?




--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
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: Mean absolute error in classification

Michael Hall


> On Jun 14, 2020, at 9:37 AM, kenny57 <[hidden email]> wrote:
>
> Hi man I tried to realize the example you described, but I just dont get
> 5.246992 ... just 66,773
>

What example?
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
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: Mean absolute error in classification

el_iconoclasta
In reply to this post by kenny57
Kenny, I think you might have forgotten to divide by 150 (the number of
cases).

Then again, 66.773 / 150 = 0.445133, which is not exactly the same as I
reported in my example (5.246992), but maybe the classification is not the
same, due to some random component of the algorithm? (It's been a while
since I last used Weka or J48 trees).

JM




--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
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: Mean absolute error in classification

kenny57
This post was updated on .
In reply to this post by Michael Hall
I get it, thank you guys ... I will post the complete example in xlsx, for future reference ...

Mean_Absolute_Error.xlsx