2
$\begingroup$

During comparison estimates/ coefficients in 'R'& Spark Mllib of Logistic regression, It has been observed that estimates are not same.

On further investigation, I found that R & Mllib has different implementations for Logistic regression.

R's glm is return a maximum likelihood estimate of the model while Spark's LogisticRegressionWithLBFGS is return a regularized model estimate.

Maximum likelihood estimates seems more efficient, as per literature available.

I am curious to know, why Spark Mllib developers has not chosen 'Maximum likelihood estimation' technique?

$\endgroup$
1
  • $\begingroup$ In my opinion this question is not duplicate. This question is about why R & Spark Mllib have implemented Logistic regression using 'Maximum likelihood estimation' & 'Regularization model estimation' technique. $\endgroup$ Commented Sep 9, 2016 at 11:10

1 Answer 1

3
$\begingroup$

I think you're confused. Maximum likelihood is a general technique for giving the most likely parameter estimation. There is no closed solution for maximum likelihood for logistic regression, so both R and Spark must numerically estimate it.

How exactly the likelihood is estimated could be slightly different and might depends on the implementation. For example, Spark prefers to add regularization, R might like to use something else (you'll need to check the documentation).

Summary: Both R and Spark try to estimate ML for you. Please check the R documentation on how R do it.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.