Logistic regression with Lasso regularization

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

Logistic regression with Lasso regularization

Phuong Pham
Hi everyone,
As I know the Logistic regression classifier has Ridge regularization method. I wonder if is there any other options or other Weka library that supports doing logistic regression with Lasso regularization or not?
Best regards,
Phuong Pham

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://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: Logistic regression with Lasso regularization

Eibe Frank-2
Administrator
This is not currently available natively in WEKA. However, you can run it via R if you have a recent version of the RPlugin package for WEKA 3.7 installed.

The glmnet function in R gives you elastic net regularization for logistic regression, etc. Ridge regression and the lasso are special cases. By default, the alpha parameter is set to 1, which corresponds to the lasso.

Here is an example of how to run it from the command-line via WEKA once you have the RPlugin package installed:

  java weka.Run .MLRClassifier -learner classif.glmnet -t ~/datasets/UCI/diabetes.arff

Documentation for the parameters of the glmnet function is on page 8 of

  http://cran.r-project.org/web/packages/glmnet/glmnet.pdf

Parameters can be passed to glmnet via the -params option of MLRClassifier.

Cheers,
Eibe

> On 26 Nov 2014, at 14:08, Phuong Pham <[hidden email]> wrote:
>
> Hi everyone,
> As I know the Logistic regression classifier has Ridge regularization method. I wonder if is there any other options or other Weka library that supports doing logistic regression with Lasso regularization or not?
> Best regards,
> Phuong Pham
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://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]
List info and subscription status: http://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: Logistic regression with Lasso regularization

Phuong Pham
Thanks Eibe

On Tue, Nov 25, 2014 at 10:46 PM, Eibe Frank <[hidden email]> wrote:
This is not currently available natively in WEKA. However, you can run it via R if you have a recent version of the RPlugin package for WEKA 3.7 installed.

The glmnet function in R gives you elastic net regularization for logistic regression, etc. Ridge regression and the lasso are special cases. By default, the alpha parameter is set to 1, which corresponds to the lasso.

Here is an example of how to run it from the command-line via WEKA once you have the RPlugin package installed:

  java weka.Run .MLRClassifier -learner classif.glmnet -t ~/datasets/UCI/diabetes.arff

Documentation for the parameters of the glmnet function is on page 8 of

  http://cran.r-project.org/web/packages/glmnet/glmnet.pdf

Parameters can be passed to glmnet via the -params option of MLRClassifier.

Cheers,
Eibe

> On 26 Nov 2014, at 14:08, Phuong Pham <[hidden email]> wrote:
>
> Hi everyone,
> As I know the Logistic regression classifier has Ridge regularization method. I wonder if is there any other options or other Weka library that supports doing logistic regression with Lasso regularization or not?
> Best regards,
> Phuong Pham
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://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]
List info and subscription status: http://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]
List info and subscription status: http://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: Logistic regression with Lasso regularization

Monika
In reply to this post by Eibe Frank-2
Can we do it in Weka 3.9.4 without using the  Rplugin???




--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Logistic regression with Lasso regularization

Eibe Frank-2
Administrator
LibLINEAR has an option for L_1 regularised logistic regression.

Note that LibLINEAR builds 1-vs-rest models for multi-class problems so it does not optimise the per-class models jointly.

Cheers,
Eibe

> On 1/06/2020, at 7:24 AM, Monika <[hidden email]> wrote:
>
> Can we do it in Weka 3.9.4 without using the  Rplugin???
>
>
>
>
> --
> Sent from: https://weka.8497.n7.nabble.com/
> _______________________________________________
> Wekalist mailing list -- [hidden email]
> Send posts to [hidden email]
> To unsubscribe send an email to [hidden email]
> To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html