RE: MLlib-Missing Regularization Parameter and Intercept for Logistic Regression

2014-06-16 Thread FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
Hi Xiangrui,

Thank you for the reply! I have tried customizing 
LogisticRegressionSGD.optimizer as in the example you mentioned, but the source 
code reveals that the intercept is also penalized if one is included, which is 
usually inappropriate. The developer should fix this problem.

Best,

Congrui

-Original Message-
From: Xiangrui Meng [mailto:men...@gmail.com] 
Sent: Friday, June 13, 2014 11:50 PM
To: user@spark.apache.org
Cc: user
Subject: Re: MLlib-Missing Regularization Parameter and Intercept for Logistic 
Regression

1. 
examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassification.scala
contains example code that shows how to set regParam.

2. A static method with more than 3 parameters becomes hard to
remember and hard to maintain. Please use LogistricRegressionWithSGD's
default constructor and setters.

-Xiangrui


Re: MLlib-Missing Regularization Parameter and Intercept for Logistic Regression

2014-06-16 Thread Xiangrui Meng
Someone is working on weighted regularization. Stay tuned. -Xiangrui

On Mon, Jun 16, 2014 at 9:36 AM, FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
fixed-term.congrui...@us.bosch.com wrote:
 Hi Xiangrui,

 Thank you for the reply! I have tried customizing 
 LogisticRegressionSGD.optimizer as in the example you mentioned, but the 
 source code reveals that the intercept is also penalized if one is included, 
 which is usually inappropriate. The developer should fix this problem.

 Best,

 Congrui

 -Original Message-
 From: Xiangrui Meng [mailto:men...@gmail.com]
 Sent: Friday, June 13, 2014 11:50 PM
 To: user@spark.apache.org
 Cc: user
 Subject: Re: MLlib-Missing Regularization Parameter and Intercept for 
 Logistic Regression

 1. 
 examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassification.scala
 contains example code that shows how to set regParam.

 2. A static method with more than 3 parameters becomes hard to
 remember and hard to maintain. Please use LogistricRegressionWithSGD's
 default constructor and setters.

 -Xiangrui


Re: MLlib-Missing Regularization Parameter and Intercept for Logistic Regression

2014-06-16 Thread DB Tsai
Hi Congrui,

We're working on weighted regularization, so for intercept, you can
just set it as 0. It's also useful when the data is normalized but
want to solve the regularization with original data.

Sincerely,

DB Tsai
---
My Blog: https://www.dbtsai.com
LinkedIn: https://www.linkedin.com/in/dbtsai


On Mon, Jun 16, 2014 at 11:18 AM, Xiangrui Meng men...@gmail.com wrote:
 Someone is working on weighted regularization. Stay tuned. -Xiangrui

 On Mon, Jun 16, 2014 at 9:36 AM, FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
 fixed-term.congrui...@us.bosch.com wrote:
 Hi Xiangrui,

 Thank you for the reply! I have tried customizing 
 LogisticRegressionSGD.optimizer as in the example you mentioned, but the 
 source code reveals that the intercept is also penalized if one is included, 
 which is usually inappropriate. The developer should fix this problem.

 Best,

 Congrui

 -Original Message-
 From: Xiangrui Meng [mailto:men...@gmail.com]
 Sent: Friday, June 13, 2014 11:50 PM
 To: user@spark.apache.org
 Cc: user
 Subject: Re: MLlib-Missing Regularization Parameter and Intercept for 
 Logistic Regression

 1. 
 examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassification.scala
 contains example code that shows how to set regParam.

 2. A static method with more than 3 parameters becomes hard to
 remember and hard to maintain. Please use LogistricRegressionWithSGD's
 default constructor and setters.

 -Xiangrui


RE: MLlib-Missing Regularization Parameter and Intercept for Logistic Regression

2014-06-16 Thread FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
Thank you! I'm really looking forward to that.

Best,

Congrui

-Original Message-
From: Xiangrui Meng [mailto:men...@gmail.com] 
Sent: Monday, June 16, 2014 11:19 AM
To: user@spark.apache.org
Subject: Re: MLlib-Missing Regularization Parameter and Intercept for Logistic 
Regression

Someone is working on weighted regularization. Stay tuned. -Xiangrui

On Mon, Jun 16, 2014 at 9:36 AM, FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
fixed-term.congrui...@us.bosch.com wrote:
 Hi Xiangrui,

 Thank you for the reply! I have tried customizing 
 LogisticRegressionSGD.optimizer as in the example you mentioned, but the 
 source code reveals that the intercept is also penalized if one is included, 
 which is usually inappropriate. The developer should fix this problem.

 Best,

 Congrui

 -Original Message-
 From: Xiangrui Meng [mailto:men...@gmail.com]
 Sent: Friday, June 13, 2014 11:50 PM
 To: user@spark.apache.org
 Cc: user
 Subject: Re: MLlib-Missing Regularization Parameter and Intercept for 
 Logistic Regression

 1. 
 examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassification.scala
 contains example code that shows how to set regParam.

 2. A static method with more than 3 parameters becomes hard to
 remember and hard to maintain. Please use LogistricRegressionWithSGD's
 default constructor and setters.

 -Xiangrui


RE: MLlib-Missing Regularization Parameter and Intercept for Logistic Regression

2014-06-16 Thread Congrui Yi
Hi DB,

Thank you for the reply! I'm looking forward to this change, which surely adds 
much more flexibility to the optimizers, including whether or not the intercept 
should be penalized.

Sincerely,

Congrui Yi

From: DB Tsai-2 [via Apache Spark User List] 
[mailto:ml-node+s1001560n768...@n3.nabble.com]
Sent: Monday, June 16, 2014 11:31 AM
To: FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
Subject: Re: MLlib-Missing Regularization Parameter and Intercept for Logistic 
Regression

Hi Congrui,

We're working on weighted regularization, so for intercept, you can
just set it as 0. It's also useful when the data is normalized but
want to solve the regularization with original data.

Sincerely,

DB Tsai
---
My Blog: https://www.dbtsai.com
LinkedIn: https://www.linkedin.com/in/dbtsai


On Mon, Jun 16, 2014 at 11:18 AM, Xiangrui Meng [hidden 
email]/user/SendEmail.jtp?type=nodenode=7684i=0 wrote:

 Someone is working on weighted regularization. Stay tuned. -Xiangrui

 On Mon, Jun 16, 2014 at 9:36 AM, FIXED-TERM Yi Congrui (CR/RTC1.3-NA)
 [hidden email]/user/SendEmail.jtp?type=nodenode=7684i=1 wrote:
 Hi Xiangrui,

 Thank you for the reply! I have tried customizing 
 LogisticRegressionSGD.optimizer as in the example you mentioned, but the 
 source code reveals that the intercept is also penalized if one is included, 
 which is usually inappropriate. The developer should fix this problem.

 Best,

 Congrui

 -Original Message-
 From: Xiangrui Meng [mailto:[hidden 
 email]/user/SendEmail.jtp?type=nodenode=7684i=2]
 Sent: Friday, June 13, 2014 11:50 PM
 To: [hidden email]/user/SendEmail.jtp?type=nodenode=7684i=3
 Cc: user
 Subject: Re: MLlib-Missing Regularization Parameter and Intercept for 
 Logistic Regression

 1. 
 examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassification.scala
 contains example code that shows how to set regParam.

 2. A static method with more than 3 parameters becomes hard to
 remember and hard to maintain. Please use LogistricRegressionWithSGD's
 default constructor and setters.

 -Xiangrui


If you reply to this email, your message will be added to the discussion below:
http://apache-spark-user-list.1001560.n3.nabble.com/MLlib-Missing-Regularization-Parameter-and-Intercept-for-Logistic-Regression-tp7588p7684.html
To unsubscribe from MLlib-Missing Regularization Parameter and Intercept for 
Logistic Regression, click 
herehttp://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=7588code=Zml4ZWQtdGVybS5Db25ncnVpLllpQHVzLmJvc2NoLmNvbXw3NTg4fDEwMDQ0NzI0MDQ=.
NAMLhttp://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/MLlib-Missing-Regularization-Parameter-and-Intercept-for-Logistic-Regression-tp7588p7687.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: MLlib-Missing Regularization Parameter and Intercept for Logistic Regression

2014-06-14 Thread Xiangrui Meng
1. 
examples/src/main/scala/org/apache/spark/examples/mllib/BinaryClassification.scala
contains example code that shows how to set regParam.

2. A static method with more than 3 parameters becomes hard to
remember and hard to maintain. Please use LogistricRegressionWithSGD's
default constructor and setters.

-Xiangrui