aboutsummaryrefslogtreecommitdiff
path: root/docs/mllib-linear-methods.md
diff options
context:
space:
mode:
authorJoseph K. Bradley <joseph@databricks.com>2014-12-04 08:58:03 +0800
committerXiangrui Meng <meng@databricks.com>2014-12-04 08:58:03 +0800
commit27ab0b8a03b711e8d86b6167df833f012205ccc7 (patch)
treeed49d857ba62cb29af67d2bcc35ea9936f592e4f /docs/mllib-linear-methods.md
parent1826372d0a1bc80db9015106dd5d2d155ada33f5 (diff)
downloadspark-27ab0b8a03b711e8d86b6167df833f012205ccc7.tar.gz
spark-27ab0b8a03b711e8d86b6167df833f012205ccc7.tar.bz2
spark-27ab0b8a03b711e8d86b6167df833f012205ccc7.zip
[SPARK-4711] [mllib] [docs] Programming guide advice on choosing optimizer
I have heard requests for the docs to include advice about choosing an optimization method. The programming guide could include a brief statement about this (so the user does not have to read the whole optimization section). CC: mengxr Author: Joseph K. Bradley <joseph@databricks.com> Closes #3569 from jkbradley/lr-doc and squashes the following commits: 654aeb5 [Joseph K. Bradley] updated section header for mllib-optimization 5035ad0 [Joseph K. Bradley] updated based on review 94f6dec [Joseph K. Bradley] Updated linear methods and optimization docs with quick advice on choosing an optimization method
Diffstat (limited to 'docs/mllib-linear-methods.md')
-rw-r--r--docs/mllib-linear-methods.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/mllib-linear-methods.md b/docs/mllib-linear-methods.md
index bc914a1899..44b7f67c57 100644
--- a/docs/mllib-linear-methods.md
+++ b/docs/mllib-linear-methods.md
@@ -110,12 +110,16 @@ However, L1 regularization can help promote sparsity in weights leading to small
It is not recommended to train models without any regularization,
especially when the number of training examples is small.
+### Optimization
+
+Under the hood, linear methods use convex optimization methods to optimize the objective functions. MLlib uses two methods, SGD and L-BFGS, described in the [optimization section](mllib-optimization.html). Currently, most algorithm APIs support Stochastic Gradient Descent (SGD), and a few support L-BFGS. Refer to [this optimization section](mllib-optimization.html#Choosing-an-Optimization-Method) for guidelines on choosing between optimization methods.
+
## Binary classification
[Binary classification](http://en.wikipedia.org/wiki/Binary_classification)
aims to divide items into two categories: positive and negative. MLlib
-supports two linear methods for binary classification: linear support vector
-machines (SVMs) and logistic regression. For both methods, MLlib supports
+supports two linear methods for binary classification: linear Support Vector
+Machines (SVMs) and logistic regression. For both methods, MLlib supports
L1 and L2 regularized variants. The training data set is represented by an RDD
of [LabeledPoint](mllib-data-types.html) in MLlib. Note that, in the
mathematical formulation in this guide, a training label $y$ is denoted as
@@ -123,7 +127,7 @@ either $+1$ (positive) or $-1$ (negative), which is convenient for the
formulation. *However*, the negative label is represented by $0$ in MLlib
instead of $-1$, to be consistent with multiclass labeling.
-### Linear support vector machines (SVMs)
+### Linear Support Vector Machines (SVMs)
The [linear SVM](http://en.wikipedia.org/wiki/Support_vector_machine#Linear_SVM)
is a standard method for large-scale classification tasks. It is a linear method as described above in equation `$\eqref{eq:regPrimal}$`, with the loss function in the formulation given by the hinge loss: