Pages: [1]
  Print  
Author Topic: Extract coefficients from linear regressions Model  (Read 538 times)
Matthias
Newbie
*
Posts: 13


« on: March 16, 2011, 04:56:39 PM »

Hi all,

I 've to extract the coefficients from a linear regressions Model. I want solve this with a little java script, following this topic
http://rapid-i.com/rapidforum/index.php/topic,2427.0.html
First I want to input the model with
Code:
IOObject ioobject = operator.getInput(IOObject.class);

However I don't know how to transform the IOObject into a LinearRegressionsModel so that I can use the getCoefficients() command.

Would be nice if someone has an idea

Greetings

Matthias
Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2421


« Reply #1 on: March 18, 2011, 05:22:33 PM »

Hi,
well actually casting would be a good idea. But if you aren't a Java freak, I would recommend using a simple operator for that: The coefficients are returned as weight Vector from the Linear Regression itself. So you can use it or transform it to a data set using Weights to Data. Then you can save it in any format you want. No coding needed at all...

Greetings,
  Sebastian
Logged

Hope to see you at RapidMiner Community Meeting and Conference (RCOMM 2011) in Dublin from June 7-10, 2011.
The Call for Paper is online now!
More information at http://www.rcomm2011.org
Matthias
Newbie
*
Posts: 13


« Reply #2 on: March 21, 2011, 11:32:13 AM »

Hi,

I don't know exactly why I didn't see the Output port for the weight vector all the time, but you are right there is one.

Thanks

Matthias
Logged
Pages: [1]
  Print  
 
Jump to: