Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

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: 201 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.