Linear Regression Model operator in Rapidminer how to adjusted R Square value

lanem
New Altair Community Member
Dear Colleagues
I using North Textbook example for Linear regression model (and Chapter04.csv data set) and using apply model operator and performance (regression) operator to get model performance metrics for the linear regression model
I using North Textbook example for Linear regression model (and Chapter04.csv data set) and using apply model operator and performance (regression) operator to get model performance metrics for the linear regression model
Rapidminer Performance (Regression) operator provides R Square but not the adjusted R Square value
If there anyway I can get Rapidminer to calculate and provide adjusted R Square value - formulae is 1 - ((1-R Sq) (N-1) / (N-P-1)) where N = Sample size; P = Number of Predictor/Independent variables and R Sq = R Square value
Any help/clarification on above will be much appreciated
Kind regards Michael
Tagged:
0
Best Answers
-
You can have RapidMiner calculate the adjusted R squared using the formula you provided above or any other similar formula you like.
All the elements of that formula can be extracted using macros (see the Extract Macro operator) and the Performance to Data operator (you will need to download and install the free Converters extension from the marketplace).
Then just use the "Generate Attributes" operator and use the formula you want with the values you want.
-1
Answers
-
You can have RapidMiner calculate the adjusted R squared using the formula you provided above or any other similar formula you like.
All the elements of that formula can be extracted using macros (see the Extract Macro operator) and the Performance to Data operator (you will need to download and install the free Converters extension from the marketplace).
Then just use the "Generate Attributes" operator and use the formula you want with the values you want.
-1 -
Many thanks Telcontar and ceaperez you both provided some really useful advice, great ambassadors for Rapidminer Community
I used following:Performance to data operator (need to install Converters extension to access this operator) to get Linear regression model metrics in exampleset, used Extract Macro to obtain N and P values from relevant exampleset used test Linear Regression model and then calculated formula in Generate Attributes operator using If Statement Criterion == squared_correlation to select R square and then eval Macro Values N and P to calculate adjusted R Square, otherwise falsebest regards Michael1