summaryrefslogblamecommitdiff
path: root/site/docs/1.5.0/api/java/org/apache/spark/mllib/regression/LassoWithSGD.html
blob: 1afe6f67258dd204d067b3b85e2b0287fdfef382 (plain) (tree)
1
2
3
4
5
6
7



                                                                                                      
                                                                                
                           
                                       





























                                                                                               

                                                                                                                                                                                            








































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

                                                                                                                                                                                            








































                                                                                                                                                                                               
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Wed Sep 16 10:26:34 PDT 2015 -->
<title>LassoWithSGD</title>
<meta name="date" content="2015-09-16">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="LassoWithSGD";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/spark/mllib/regression/LinearRegressionModel.html" title="class in org.apache.spark.mllib.regression"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/regression/LassoWithSGD.html" target="_top">Frames</a></li>
<li><a href="LassoWithSGD.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.spark.mllib.regression</div>
<h2 title="Class LassoWithSGD" class="title">Class LassoWithSGD</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html" title="class in org.apache.spark.mllib.regression">org.apache.spark.mllib.regression.GeneralizedLinearAlgorithm</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.spark.mllib.regression.LassoWithSGD</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, <a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">LassoWithSGD</span>
extends <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearAlgorithm</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&gt;
implements scala.Serializable</pre>
<div class="block">Train a regression model with L1-regularization using Stochastic Gradient Descent.
 This solves the l1-regularized least squares regression formulation
          f(weights) = 1/2n ||A weights-y||^2^  + regParam ||weights||_1
 Here the data matrix has n rows, and the input RDD holds the set of rows of A, each with
 its corresponding right hand side label y.
 See also the documentation for the precise formulation.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.mllib.regression.LassoWithSGD">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#LassoWithSGD()">LassoWithSGD</a></strong>()</code>
<div class="block">Construct a Lasso object with default parameters: {stepSize: 1.0, numIterations: 100,
 regParam: 0.01, miniBatchFraction: 1.0}.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#createModel(org.apache.spark.mllib.linalg.Vector, double)">createModel</a></strong>(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&nbsp;weights,
           double&nbsp;intercept)</code>
<div class="block">Create a model given the weights and intercept</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/optimization/GradientDescent.html" title="class in org.apache.spark.mllib.optimization">GradientDescent</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#optimizer()">optimizer</a></strong>()</code>
<div class="block">The optimizer to solve the problem.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#train(org.apache.spark.rdd.RDD, int)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
     int&nbsp;numIterations)</code>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#train(org.apache.spark.rdd.RDD, int, double, double)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
     int&nbsp;numIterations,
     double&nbsp;stepSize,
     double&nbsp;regParam)</code>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#train(org.apache.spark.rdd.RDD, int, double, double, double)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
     int&nbsp;numIterations,
     double&nbsp;stepSize,
     double&nbsp;regParam,
     double&nbsp;miniBatchFraction)</code>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/regression/LassoWithSGD.html#train(org.apache.spark.rdd.RDD, int, double, double, double, org.apache.spark.mllib.linalg.Vector)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
     int&nbsp;numIterations,
     double&nbsp;stepSize,
     double&nbsp;regParam,
     double&nbsp;miniBatchFraction,
     <a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&nbsp;initialWeights)</code>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.mllib.regression.GeneralizedLinearAlgorithm">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.spark.mllib.regression.<a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearAlgorithm</a></h3>
<code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#addIntercept()">addIntercept</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#getNumFeatures()">getNumFeatures</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#isAddIntercept()">isAddIntercept</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#numFeatures()">numFeatures</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#numOfLinearPredictor()">numOfLinearPredictor</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#run(org.apache.spark.rdd.RDD)">run</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#run(org.apache.spark.rdd.RDD, org.apache.spark.mllib.linalg.Vector)">run</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#setIntercept(boolean)">setIntercept</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#setValidateData(boolean)">setValidateData</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#validateData()">validateData</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#validators()">validators</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.Logging">
<!--   -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.spark.<a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></h3>
<code><a href="../../../../../org/apache/spark/Logging.html#initializeIfNecessary()">initializeIfNecessary</a>, <a href="../../../../../org/apache/spark/Logging.html#initializeLogging()">initializeLogging</a>, <a href="../../../../../org/apache/spark/Logging.html#isTraceEnabled()">isTraceEnabled</a>, <a href="../../../../../org/apache/spark/Logging.html#log_()">log_</a>, <a href="../../../../../org/apache/spark/Logging.html#log()">log</a>, <a href="../../../../../org/apache/spark/Logging.html#logDebug(scala.Function0)">logDebug</a>, <a href="../../../../../org/apache/spark/Logging.html#logDebug(scala.Function0, java.lang.Throwable)">logDebug</a>, <a href="../../../../../org/apache/spark/Logging.html#logError(scala.Function0)">logError</a>, <a href="../../../../../org/apache/spark/Logging.html#logError(scala.Function0, java.lang.Throwable)">logError</a>, <a href="../../../../../org/apache/spark/Logging.html#logInfo(scala.Function0)">logInfo</a>, <a href="../../../../../org/apache/spark/Logging.html#logInfo(scala.Function0, java.lang.Throwable)">logInfo</a>, <a href="../../../../../org/apache/spark/Logging.html#logName()">logName</a>, <a href="../../../../../org/apache/spark/Logging.html#logTrace(scala.Function0)">logTrace</a>, <a href="../../../../../org/apache/spark/Logging.html#logTrace(scala.Function0, java.lang.Throwable)">logTrace</a>, <a href="../../../../../org/apache/spark/Logging.html#logWarning(scala.Function0)">logWarning</a>, <a href="../../../../../org/apache/spark/Logging.html#logWarning(scala.Function0, java.lang.Throwable)">logWarning</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="LassoWithSGD()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LassoWithSGD</h4>
<pre>public&nbsp;LassoWithSGD()</pre>
<div class="block">Construct a Lasso object with default parameters: {stepSize: 1.0, numIterations: 100,
 regParam: 0.01, miniBatchFraction: 1.0}.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="train(org.apache.spark.rdd.RDD, int, double, double, double, org.apache.spark.mllib.linalg.Vector)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&nbsp;train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
               int&nbsp;numIterations,
               double&nbsp;stepSize,
               double&nbsp;regParam,
               double&nbsp;miniBatchFraction,
               <a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&nbsp;initialWeights)</pre>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs. We run a fixed number
 of iterations of gradient descent using the specified step size. Each iteration uses
 <code>miniBatchFraction</code> fraction of the data to calculate a stochastic gradient. The weights used
 in gradient descent are initialized using the initial weights provided.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - RDD of (label, array of features) pairs. Each pair describes a row of the data
              matrix A as well as the corresponding right hand side label y</dd><dd><code>numIterations</code> - Number of iterations of gradient descent to run.</dd><dd><code>stepSize</code> - Step size scaling to be used for the iterations of gradient descent.</dd><dd><code>regParam</code> - Regularization parameter.</dd><dd><code>miniBatchFraction</code> - Fraction of data to be used per iteration.</dd><dd><code>initialWeights</code> - Initial set of weights to be used. Array should be equal in size to
        the number of features in the data.
 <p></dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="train(org.apache.spark.rdd.RDD, int, double, double, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&nbsp;train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
               int&nbsp;numIterations,
               double&nbsp;stepSize,
               double&nbsp;regParam,
               double&nbsp;miniBatchFraction)</pre>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs. We run a fixed number
 of iterations of gradient descent using the specified step size. Each iteration uses
 <code>miniBatchFraction</code> fraction of the data to calculate a stochastic gradient.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - RDD of (label, array of features) pairs. Each pair describes a row of the data
              matrix A as well as the corresponding right hand side label y</dd><dd><code>numIterations</code> - Number of iterations of gradient descent to run.</dd><dd><code>stepSize</code> - Step size to be used for each iteration of gradient descent.</dd><dd><code>regParam</code> - Regularization parameter.</dd><dd><code>miniBatchFraction</code> - Fraction of data to be used per iteration.
 <p></dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="train(org.apache.spark.rdd.RDD, int, double, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&nbsp;train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
               int&nbsp;numIterations,
               double&nbsp;stepSize,
               double&nbsp;regParam)</pre>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs. We run a fixed number
 of iterations of gradient descent using the specified step size. We use the entire data set to
 update the true gradient in each iteration.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - RDD of (label, array of features) pairs. Each pair describes a row of the data
              matrix A as well as the corresponding right hand side label y</dd><dd><code>stepSize</code> - Step size to be used for each iteration of Gradient Descent.</dd><dd><code>regParam</code> - Regularization parameter.</dd><dd><code>numIterations</code> - Number of iterations of gradient descent to run.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a LassoModel which has the weights and offset from training.
 <p></dd></dl>
</li>
</ul>
<a name="train(org.apache.spark.rdd.RDD, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&nbsp;train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LabeledPoint.html" title="class in org.apache.spark.mllib.regression">LabeledPoint</a>&gt;&nbsp;input,
               int&nbsp;numIterations)</pre>
<div class="block">Train a Lasso model given an RDD of (label, features) pairs. We run a fixed number
 of iterations of gradient descent using a step size of 1.0. We use the entire data set to
 compute the true gradient in each iteration.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - RDD of (label, array of features) pairs. Each pair describes a row of the data
              matrix A as well as the corresponding right hand side label y</dd><dd><code>numIterations</code> - Number of iterations of gradient descent to run.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a LassoModel which has the weights and offset from training.
 <p></dd></dl>
</li>
</ul>
<a name="optimizer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>optimizer</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/spark/mllib/optimization/GradientDescent.html" title="class in org.apache.spark.mllib.optimization">GradientDescent</a>&nbsp;optimizer()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#optimizer()">GeneralizedLinearAlgorithm</a></code></strong></div>
<div class="block">The optimizer to solve the problem.
 <p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#optimizer()">optimizer</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearAlgorithm</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="createModel(org.apache.spark.mllib.linalg.Vector, double)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>createModel</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&nbsp;createModel(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&nbsp;weights,
                     double&nbsp;intercept)</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#createModel(org.apache.spark.mllib.linalg.Vector, double)">GeneralizedLinearAlgorithm</a></code></strong></div>
<div class="block">Create a model given the weights and intercept</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html#createModel(org.apache.spark.mllib.linalg.Vector, double)">createModel</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearAlgorithm</a>&lt;<a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression">LassoModel</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>weights</code> - (undocumented)</dd><dd><code>intercept</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/spark/mllib/regression/LassoModel.html" title="class in org.apache.spark.mllib.regression"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/spark/mllib/regression/LinearRegressionModel.html" title="class in org.apache.spark.mllib.regression"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/regression/LassoWithSGD.html" target="_top">Frames</a></li>
<li><a href="LassoWithSGD.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<script defer="defer" type="text/javascript" src="../../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../../lib/api-javadocs.js"></script></body>
</html>