Linear Regression in Weka

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Linear Regression in Weka

Farnoush Falahatraftar
Hi,
I want to work with Linear Regression method in Weka. My question is that which technique for inverting matrix (of weights) in Linear Regression method has been applied in Weka. Is it Gus-Jordan method?
Thank you in advance.

Regards
Farnoush Falahatraftar

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Linear Regression in Weka

Eibe Frank-2
Administrator
AFAIK, using an explicit matrix inverse is generally discouraged when performing linear regression. WEKA uses the solve method in MTJ’s UpperSPDDenseMatrix,

  https://github.com/fommil/matrix-toolkits-java/blob/master/src/main/java/no/uib/cipr/matrix/UpperSPDDenseMatrix.java

which uses SolveSPD in AbstractSymmDenseMatrix,

  https://github.com/fommil/matrix-toolkits-java/blob/master/src/main/java/no/uib/cipr/matrix/AbstractSymmDenseMatrix.java

The relevant LAPACK call in this method is

  LAPACK.getInstance().dposv(uplo.netlib(), numRows, X.numColumns(), data.clone(), Matrices.ld(numRows), Xd, Matrices.ld(numRows), info);

Information on this LAPACK function is here:

  https://www.math.utah.edu/software/lapack/lapack-d/dposv.html

Optionally, in recent versions of WEKA, you can also use QR decomposition instead of this method (which uses the Cholesky decomposition).

Cheers,
Eibe

> On 29/11/2018, at 8:29 AM, Farnoush Falahatraftar <[hidden email]> wrote:
>
> Hi,
> I want to work with Linear Regression method in Weka. My question is that which technique for inverting matrix (of weights) in Linear Regression method has been applied in Weka. Is it Gus-Jordan method?
> Thank you in advance.
>
> Regards
> Farnoush Falahatraftar
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html