How do I get the MAE (average error) in a linear regression model in RapidMiner?
I am running a multiple linear regression process on RapidMiner. It works.
But now I want to calculate the Mean Absolute Error and I have to generate my own attribute to do this. So What I have done is I have connected Generate Attributes operator to the Apply Model Operator. The Generate Attributes operator has the column name "Error" with the expression abs(Price - [prediction(price)]). I then connected an Aggregate operator to the Generate Attributes operator. The Aggregate operator calculates the average of Error. I then connected that to a Set Role operator, which is connected to Performance operator. In the Set Role operator, average(Error) is assigned the target role of label. I do have another Set Role operator in the beginning after I have retrieved my data and selected attributes where I assigned Price the target role of "label". And Performance operator is connected to results input.
When I run the process, I get a prompt that says "Missing label: Input ExampleSet does not have a label attribute". I have tried to fix this by putting the Set Role operator before the Aggregate operator but it still doesn't work.
Answers
-
Hi,
The Performance (Regression) operator is able to automatically calculate this for you - we call it the absolute error. I've attached a small example for your review.
Best,
Roland
0