The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

How do I get the MAE (average error) in a linear regression model in RapidMiner?

poppyseedmuffinpoppyseedmuffin Member Posts: 2 Newbie

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

  • rjones13rjones13 Member Posts: 204 Unicorn

    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

Sign In or Register to comment.