| <!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 (1.8.0_402) on Mon Apr 15 02:02:02 UTC 2024 --> |
| <title>LinearRegression (Spark 3.4.3 JavaDoc)</title> |
| <meta name="date" content="2024-04-15"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="LinearRegression (Spark 3.4.3 JavaDoc)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":9,"i8":10,"i9":10,"i10":9,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <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/ml/regression/IsotonicRegressionModel.html" title="class in org.apache.spark.ml.regression"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionModel.html" title="class in org.apache.spark.ml.regression"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/spark/ml/regression/LinearRegression.html" target="_top">Frames</a></li> |
| <li><a href="LinearRegression.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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.ml.regression</div> |
| <h2 title="Class LinearRegression" class="title">Class LinearRegression</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/spark/ml/PipelineStage.html" title="class in org.apache.spark.ml">org.apache.spark.ml.PipelineStage</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/spark/ml/Estimator.html" title="class in org.apache.spark.ml">org.apache.spark.ml.Estimator</a><M></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/spark/ml/Predictor.html" title="class in org.apache.spark.ml">org.apache.spark.ml.Predictor</a><FeaturesType,Learner,M></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/spark/ml/regression/Regressor.html" title="class in org.apache.spark.ml.regression">org.apache.spark.ml.regression.Regressor</a><<a href="../../../../../org/apache/spark/ml/linalg/Vector.html" title="interface in org.apache.spark.ml.linalg">Vector</a>,<a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a>,<a href="../../../../../org/apache/spark/ml/regression/LinearRegressionModel.html" title="class in org.apache.spark.ml.regression">LinearRegressionModel</a>></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.spark.ml.regression.LinearRegression</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </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, org.apache.spark.internal.Logging, <a href="../../../../../org/apache/spark/ml/param/Params.html" title="interface in org.apache.spark.ml.param">Params</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasAggregationDepth.html" title="interface in org.apache.spark.ml.param.shared">HasAggregationDepth</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasElasticNetParam.html" title="interface in org.apache.spark.ml.param.shared">HasElasticNetParam</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasFeaturesCol.html" title="interface in org.apache.spark.ml.param.shared">HasFeaturesCol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasFitIntercept.html" title="interface in org.apache.spark.ml.param.shared">HasFitIntercept</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasLabelCol.html" title="interface in org.apache.spark.ml.param.shared">HasLabelCol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasLoss.html" title="interface in org.apache.spark.ml.param.shared">HasLoss</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasMaxBlockSizeInMB.html" title="interface in org.apache.spark.ml.param.shared">HasMaxBlockSizeInMB</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html" title="interface in org.apache.spark.ml.param.shared">HasMaxIter</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html" title="interface in org.apache.spark.ml.param.shared">HasPredictionCol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasRegParam.html" title="interface in org.apache.spark.ml.param.shared">HasRegParam</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasSolver.html" title="interface in org.apache.spark.ml.param.shared">HasSolver</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasStandardization.html" title="interface in org.apache.spark.ml.param.shared">HasStandardization</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasTol.html" title="interface in org.apache.spark.ml.param.shared">HasTol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasWeightCol.html" title="interface in org.apache.spark.ml.param.shared">HasWeightCol</a>, <a href="../../../../../org/apache/spark/ml/PredictorParams.html" title="interface in org.apache.spark.ml">PredictorParams</a>, <a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html" title="interface in org.apache.spark.ml.regression">LinearRegressionParams</a>, <a href="../../../../../org/apache/spark/ml/util/DefaultParamsWritable.html" title="interface in org.apache.spark.ml.util">DefaultParamsWritable</a>, <a href="../../../../../org/apache/spark/ml/util/Identifiable.html" title="interface in org.apache.spark.ml.util">Identifiable</a>, <a href="../../../../../org/apache/spark/ml/util/MLWritable.html" title="interface in org.apache.spark.ml.util">MLWritable</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">LinearRegression</span> |
| extends <a href="../../../../../org/apache/spark/ml/regression/Regressor.html" title="class in org.apache.spark.ml.regression">Regressor</a><<a href="../../../../../org/apache/spark/ml/linalg/Vector.html" title="interface in org.apache.spark.ml.linalg">Vector</a>,<a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a>,<a href="../../../../../org/apache/spark/ml/regression/LinearRegressionModel.html" title="class in org.apache.spark.ml.regression">LinearRegressionModel</a>> |
| implements <a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html" title="interface in org.apache.spark.ml.regression">LinearRegressionParams</a>, <a href="../../../../../org/apache/spark/ml/util/DefaultParamsWritable.html" title="interface in org.apache.spark.ml.util">DefaultParamsWritable</a>, org.apache.spark.internal.Logging</pre> |
| <div class="block">Linear regression. |
| <p> |
| The learning objective is to minimize the specified loss function, with regularization. |
| This supports two kinds of loss: |
| - squaredError (a.k.a squared loss) |
| - huber (a hybrid of squared error for relatively small errors and absolute error for |
| relatively large ones, and we estimate the scale parameter from training data) |
| <p> |
| This supports multiple types of regularization: |
| - none (a.k.a. ordinary least squares) |
| - L2 (ridge regression) |
| - L1 (Lasso) |
| - L2 + L1 (elastic net) |
| <p> |
| The squared error objective function is: |
| <p> |
| <blockquote> |
| $$ |
| \begin{align} |
| \min_{w}\frac{1}{2n}{\sum_{i=1}^n(X_{i}w - y_{i})^{2} + |
| \lambda\left[\frac{1-\alpha}{2}{||w||_{2}}^{2} + \alpha{||w||_{1}}\right]} |
| \end{align} |
| $$ |
| </blockquote> |
| <p> |
| The huber objective function is: |
| <p> |
| <blockquote> |
| $$ |
| \begin{align} |
| \min_{w, \sigma}\frac{1}{2n}{\sum_{i=1}^n\left(\sigma + |
| H_m\left(\frac{X_{i}w - y_{i}}{\sigma}\right)\sigma\right) + \frac{1}{2}\lambda {||w||_2}^2} |
| \end{align} |
| $$ |
| </blockquote> |
| <p> |
| where |
| <p> |
| <blockquote> |
| $$ |
| \begin{align} |
| H_m(z) = \begin{cases} |
| z^2, & \text {if } |z| &lt; \epsilon, \\ |
| 2\epsilon|z| - \epsilon^2, & \text{otherwise} |
| \end{cases} |
| \end{align} |
| $$ |
| </blockquote> |
| <p> |
| Since 3.1.0, it supports stacking instances into blocks and using GEMV for |
| better performance. |
| The block size will be 1.0 MB, if param maxBlockSizeInMB is set 0.0 by default. |
| <p> |
| Note: Fitting with huber loss only supports none and L2 regularization.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.spark.ml.regression.LinearRegression">Serialized Form</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.spark.internal.Logging"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging</h3> |
| <code>org.apache.spark.internal.Logging.SparkShellLoggingFilter</code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#LinearRegression--">LinearRegression</a></span>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#LinearRegression-java.lang.String-">LinearRegression</a></span>(String uid)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/IntParam.html" title="class in org.apache.spark.ml.param">IntParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#aggregationDepth--">aggregationDepth</a></span>()</code> |
| <div class="block">Param for suggested depth for treeAggregate (&gt;= 2).</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#copy-org.apache.spark.ml.param.ParamMap-">copy</a></span>(<a href="../../../../../org/apache/spark/ml/param/ParamMap.html" title="class in org.apache.spark.ml.param">ParamMap</a> extra)</code> |
| <div class="block">Creates a copy of this instance with the same UID and some extra params.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#elasticNetParam--">elasticNetParam</a></span>()</code> |
| <div class="block">Param for the ElasticNet mixing parameter, in range [0, 1].</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#epsilon--">epsilon</a></span>()</code> |
| <div class="block">The shape parameter to control the amount of robustness.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/BooleanParam.html" title="class in org.apache.spark.ml.param">BooleanParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#fitIntercept--">fitIntercept</a></span>()</code> |
| <div class="block">Param for whether to fit an intercept term.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#load-java.lang.String-">load</a></span>(String path)</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/Param.html" title="class in org.apache.spark.ml.param">Param</a><String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#loss--">loss</a></span>()</code> |
| <div class="block">The loss function to be optimized.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#MAX_FEATURES_FOR_NORMAL_SOLVER--">MAX_FEATURES_FOR_NORMAL_SOLVER</a></span>()</code> |
| <div class="block">When using <code>LinearRegression.solver</code> == "normal", the solver must limit the number of |
| features to at most this number.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#maxBlockSizeInMB--">maxBlockSizeInMB</a></span>()</code> |
| <div class="block">Param for Maximum memory in MB for stacking input data into blocks.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/IntParam.html" title="class in org.apache.spark.ml.param">IntParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#maxIter--">maxIter</a></span>()</code> |
| <div class="block">Param for maximum number of iterations (&gt;= 0).</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/spark/ml/util/MLReader.html" title="class in org.apache.spark.ml.util">MLReader</a><T></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#read--">read</a></span>()</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#regParam--">regParam</a></span>()</code> |
| <div class="block">Param for regularization parameter (&gt;= 0).</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setAggregationDepth-int-">setAggregationDepth</a></span>(int value)</code> |
| <div class="block">Suggested depth for treeAggregate (greater than or equal to 2).</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setElasticNetParam-double-">setElasticNetParam</a></span>(double value)</code> |
| <div class="block">Set the ElasticNet mixing parameter.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setEpsilon-double-">setEpsilon</a></span>(double value)</code> |
| <div class="block">Sets the value of param <code>epsilon</code>.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setFitIntercept-boolean-">setFitIntercept</a></span>(boolean value)</code> |
| <div class="block">Set if we should fit the intercept.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setLoss-java.lang.String-">setLoss</a></span>(String value)</code> |
| <div class="block">Sets the value of param <code>loss</code>.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setMaxBlockSizeInMB-double-">setMaxBlockSizeInMB</a></span>(double value)</code> |
| <div class="block">Sets the value of param <code>maxBlockSizeInMB</code>.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setMaxIter-int-">setMaxIter</a></span>(int value)</code> |
| <div class="block">Set the maximum number of iterations.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setRegParam-double-">setRegParam</a></span>(double value)</code> |
| <div class="block">Set the regularization parameter.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setSolver-java.lang.String-">setSolver</a></span>(String value)</code> |
| <div class="block">Set the solver algorithm used for optimization.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setStandardization-boolean-">setStandardization</a></span>(boolean value)</code> |
| <div class="block">Whether to standardize the training features before fitting the model.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setTol-double-">setTol</a></span>(double value)</code> |
| <div class="block">Set the convergence tolerance of iterations.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#setWeightCol-java.lang.String-">setWeightCol</a></span>(String value)</code> |
| <div class="block">Whether to over-/under-sample training instances according to the given weights in weightCol.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/Param.html" title="class in org.apache.spark.ml.param">Param</a><String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#solver--">solver</a></span>()</code> |
| <div class="block">The solver algorithm for optimization.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/BooleanParam.html" title="class in org.apache.spark.ml.param">BooleanParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#standardization--">standardization</a></span>()</code> |
| <div class="block">Param for whether to standardize the training features before fitting the model.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#tol--">tol</a></span>()</code> |
| <div class="block">Param for the convergence tolerance for iterative algorithms (&gt;= 0).</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#uid--">uid</a></span>()</code> |
| <div class="block">An immutable unique ID for the object and its derivatives.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/ml/param/Param.html" title="class in org.apache.spark.ml.param">Param</a><String></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html#weightCol--">weightCol</a></span>()</code> |
| <div class="block">Param for weight column name.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.Predictor"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.spark.ml.<a href="../../../../../org/apache/spark/ml/Predictor.html" title="class in org.apache.spark.ml">Predictor</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/Predictor.html#featuresCol--">featuresCol</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#fit-org.apache.spark.sql.Dataset-">fit</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#labelCol--">labelCol</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#predictionCol--">predictionCol</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#setFeaturesCol-java.lang.String-">setFeaturesCol</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#setLabelCol-java.lang.String-">setLabelCol</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#setPredictionCol-java.lang.String-">setPredictionCol</a>, <a href="../../../../../org/apache/spark/ml/Predictor.html#transformSchema-org.apache.spark.sql.types.StructType-">transformSchema</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.Estimator"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.spark.ml.<a href="../../../../../org/apache/spark/ml/Estimator.html" title="class in org.apache.spark.ml">Estimator</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/Estimator.html#fit-org.apache.spark.sql.Dataset-org.apache.spark.ml.param.ParamMap-">fit</a>, <a href="../../../../../org/apache/spark/ml/Estimator.html#fit-org.apache.spark.sql.Dataset-org.apache.spark.ml.param.ParamPair-org.apache.spark.ml.param.ParamPair...-">fit</a>, <a href="../../../../../org/apache/spark/ml/Estimator.html#fit-org.apache.spark.sql.Dataset-org.apache.spark.ml.param.ParamPair-scala.collection.Seq-">fit</a>, <a href="../../../../../org/apache/spark/ml/Estimator.html#fit-org.apache.spark.sql.Dataset-scala.collection.Seq-">fit</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.PipelineStage"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.spark.ml.<a href="../../../../../org/apache/spark/ml/PipelineStage.html" title="class in org.apache.spark.ml">PipelineStage</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/PipelineStage.html#params--">params</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class Object</h3> |
| <code>equals, 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.ml.regression.LinearRegressionParams"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.regression.<a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html" title="interface in org.apache.spark.ml.regression">LinearRegressionParams</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#getEpsilon--">getEpsilon</a>, <a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#validateAndTransformSchema-org.apache.spark.sql.types.StructType-boolean-org.apache.spark.sql.types.DataType-">validateAndTransformSchema</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasLabelCol"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasLabelCol.html" title="interface in org.apache.spark.ml.param.shared">HasLabelCol</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasLabelCol.html#getLabelCol--">getLabelCol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasLabelCol.html#labelCol--">labelCol</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasFeaturesCol"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasFeaturesCol.html" title="interface in org.apache.spark.ml.param.shared">HasFeaturesCol</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasFeaturesCol.html#featuresCol--">featuresCol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasFeaturesCol.html#getFeaturesCol--">getFeaturesCol</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasPredictionCol"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html" title="interface in org.apache.spark.ml.param.shared">HasPredictionCol</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html#getPredictionCol--">getPredictionCol</a>, <a href="../../../../../org/apache/spark/ml/param/shared/HasPredictionCol.html#predictionCol--">predictionCol</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.Params"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.<a href="../../../../../org/apache/spark/ml/param/Params.html" title="interface in org.apache.spark.ml.param">Params</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/Params.html#clear-org.apache.spark.ml.param.Param-">clear</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#copyValues-T-org.apache.spark.ml.param.ParamMap-">copyValues</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#defaultCopy-org.apache.spark.ml.param.ParamMap-">defaultCopy</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#defaultParamMap--">defaultParamMap</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#explainParam-org.apache.spark.ml.param.Param-">explainParam</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#explainParams--">explainParams</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#extractParamMap--">extractParamMap</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#extractParamMap-org.apache.spark.ml.param.ParamMap-">extractParamMap</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#get-org.apache.spark.ml.param.Param-">get</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#getDefault-org.apache.spark.ml.param.Param-">getDefault</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#getOrDefault-org.apache.spark.ml.param.Param-">getOrDefault</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#getParam-java.lang.String-">getParam</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#hasDefault-org.apache.spark.ml.param.Param-">hasDefault</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#hasParam-java.lang.String-">hasParam</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#isDefined-org.apache.spark.ml.param.Param-">isDefined</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#isSet-org.apache.spark.ml.param.Param-">isSet</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#onParamChange-org.apache.spark.ml.param.Param-">onParamChange</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#paramMap--">paramMap</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#params--">params</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#set-org.apache.spark.ml.param.Param-T-">set</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#set-org.apache.spark.ml.param.ParamPair-">set</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#set-java.lang.String-java.lang.Object-">set</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#setDefault-org.apache.spark.ml.param.Param-T-">setDefault</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#setDefault-scala.collection.Seq-">setDefault</a>, <a href="../../../../../org/apache/spark/ml/param/Params.html#shouldOwn-org.apache.spark.ml.param.Param-">shouldOwn</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.util.Identifiable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.util.<a href="../../../../../org/apache/spark/ml/util/Identifiable.html" title="interface in org.apache.spark.ml.util">Identifiable</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/util/Identifiable.html#toString--">toString</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasRegParam"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasRegParam.html" title="interface in org.apache.spark.ml.param.shared">HasRegParam</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasRegParam.html#getRegParam--">getRegParam</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasElasticNetParam"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasElasticNetParam.html" title="interface in org.apache.spark.ml.param.shared">HasElasticNetParam</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasElasticNetParam.html#getElasticNetParam--">getElasticNetParam</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasMaxIter"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html" title="interface in org.apache.spark.ml.param.shared">HasMaxIter</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html#getMaxIter--">getMaxIter</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasTol"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasTol.html" title="interface in org.apache.spark.ml.param.shared">HasTol</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasTol.html#getTol--">getTol</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasFitIntercept"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasFitIntercept.html" title="interface in org.apache.spark.ml.param.shared">HasFitIntercept</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasFitIntercept.html#getFitIntercept--">getFitIntercept</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasStandardization"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasStandardization.html" title="interface in org.apache.spark.ml.param.shared">HasStandardization</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasStandardization.html#getStandardization--">getStandardization</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasWeightCol"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasWeightCol.html" title="interface in org.apache.spark.ml.param.shared">HasWeightCol</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasWeightCol.html#getWeightCol--">getWeightCol</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasSolver"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasSolver.html" title="interface in org.apache.spark.ml.param.shared">HasSolver</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasSolver.html#getSolver--">getSolver</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasAggregationDepth"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasAggregationDepth.html" title="interface in org.apache.spark.ml.param.shared">HasAggregationDepth</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasAggregationDepth.html#getAggregationDepth--">getAggregationDepth</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasLoss"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasLoss.html" title="interface in org.apache.spark.ml.param.shared">HasLoss</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasLoss.html#getLoss--">getLoss</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.param.shared.HasMaxBlockSizeInMB"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.param.shared.<a href="../../../../../org/apache/spark/ml/param/shared/HasMaxBlockSizeInMB.html" title="interface in org.apache.spark.ml.param.shared">HasMaxBlockSizeInMB</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxBlockSizeInMB.html#getMaxBlockSizeInMB--">getMaxBlockSizeInMB</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.util.DefaultParamsWritable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.util.<a href="../../../../../org/apache/spark/ml/util/DefaultParamsWritable.html" title="interface in org.apache.spark.ml.util">DefaultParamsWritable</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/util/DefaultParamsWritable.html#write--">write</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.ml.util.MLWritable"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.ml.util.<a href="../../../../../org/apache/spark/ml/util/MLWritable.html" title="interface in org.apache.spark.ml.util">MLWritable</a></h3> |
| <code><a href="../../../../../org/apache/spark/ml/util/MLWritable.html#save-java.lang.String-">save</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.internal.Logging"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.spark.internal.Logging</h3> |
| <code>$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize</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="LinearRegression-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LinearRegression</h4> |
| <pre>public LinearRegression(String uid)</pre> |
| </li> |
| </ul> |
| <a name="LinearRegression--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LinearRegression</h4> |
| <pre>public LinearRegression()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="load-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>load</h4> |
| <pre>public static <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> load(String path)</pre> |
| </li> |
| </ul> |
| <a name="MAX_FEATURES_FOR_NORMAL_SOLVER--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MAX_FEATURES_FOR_NORMAL_SOLVER</h4> |
| <pre>public static int MAX_FEATURES_FOR_NORMAL_SOLVER()</pre> |
| <div class="block">When using <code>LinearRegression.solver</code> == "normal", the solver must limit the number of |
| features to at most this number. The entire covariance matrix X^T^X will be collected |
| to the driver. This limit helps prevent memory overflow errors.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="read--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>read</h4> |
| <pre>public static <a href="../../../../../org/apache/spark/ml/util/MLReader.html" title="class in org.apache.spark.ml.util">MLReader</a><T> read()</pre> |
| </li> |
| </ul> |
| <a name="solver--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>solver</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/Param.html" title="class in org.apache.spark.ml.param">Param</a><String> solver()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#solver--">LinearRegressionParams</a></code></span></div> |
| <div class="block">The solver algorithm for optimization. |
| Supported options: "l-bfgs", "normal" and "auto". |
| Default: "auto" |
| <p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasSolver.html#solver--">solver</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasSolver.html" title="interface in org.apache.spark.ml.param.shared">HasSolver</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#solver--">solver</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html" title="interface in org.apache.spark.ml.regression">LinearRegressionParams</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="loss--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>loss</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/Param.html" title="class in org.apache.spark.ml.param">Param</a><String> loss()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#loss--">LinearRegressionParams</a></code></span></div> |
| <div class="block">The loss function to be optimized. |
| Supported options: "squaredError" and "huber". |
| Default: "squaredError" |
| <p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasLoss.html#loss--">loss</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasLoss.html" title="interface in org.apache.spark.ml.param.shared">HasLoss</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#loss--">loss</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html" title="interface in org.apache.spark.ml.regression">LinearRegressionParams</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="epsilon--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>epsilon</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a> epsilon()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#epsilon--">LinearRegressionParams</a></code></span></div> |
| <div class="block">The shape parameter to control the amount of robustness. Must be &gt; 1.0. |
| At larger values of epsilon, the huber criterion becomes more similar to least squares |
| regression; for small values of epsilon, the criterion is more similar to L1 regression. |
| Default is 1.35 to get as much robustness as possible while retaining |
| 95% statistical efficiency for normally distributed data. It matches sklearn |
| HuberRegressor and is "M" from <a href="http://statweb.stanford.edu/~owen/reports/hhu.pdf"> |
| A robust hybrid of lasso and ridge regression</a>. |
| Only valid when "loss" is "huber". |
| <p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html#epsilon--">epsilon</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionParams.html" title="interface in org.apache.spark.ml.regression">LinearRegressionParams</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxBlockSizeInMB--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxBlockSizeInMB</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a> maxBlockSizeInMB()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxBlockSizeInMB.html#maxBlockSizeInMB--">HasMaxBlockSizeInMB</a></code></span></div> |
| <div class="block">Param for Maximum memory in MB for stacking input data into blocks. Data is stacked within partitions. If more than remaining data size in a partition then it is adjusted to the data size. Default 0.0 represents choosing optimal value, depends on specific algorithm. Must be &gt;= 0..</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxBlockSizeInMB.html#maxBlockSizeInMB--">maxBlockSizeInMB</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxBlockSizeInMB.html" title="interface in org.apache.spark.ml.param.shared">HasMaxBlockSizeInMB</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="aggregationDepth--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>aggregationDepth</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/IntParam.html" title="class in org.apache.spark.ml.param">IntParam</a> aggregationDepth()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasAggregationDepth.html#aggregationDepth--">HasAggregationDepth</a></code></span></div> |
| <div class="block">Param for suggested depth for treeAggregate (&gt;= 2).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasAggregationDepth.html#aggregationDepth--">aggregationDepth</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasAggregationDepth.html" title="interface in org.apache.spark.ml.param.shared">HasAggregationDepth</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="weightCol--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>weightCol</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/Param.html" title="class in org.apache.spark.ml.param">Param</a><String> weightCol()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasWeightCol.html#weightCol--">HasWeightCol</a></code></span></div> |
| <div class="block">Param for weight column name. If this is not set or empty, we treat all instance weights as 1.0.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasWeightCol.html#weightCol--">weightCol</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasWeightCol.html" title="interface in org.apache.spark.ml.param.shared">HasWeightCol</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="standardization--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>standardization</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/BooleanParam.html" title="class in org.apache.spark.ml.param">BooleanParam</a> standardization()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasStandardization.html#standardization--">HasStandardization</a></code></span></div> |
| <div class="block">Param for whether to standardize the training features before fitting the model.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasStandardization.html#standardization--">standardization</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasStandardization.html" title="interface in org.apache.spark.ml.param.shared">HasStandardization</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="fitIntercept--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fitIntercept</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/BooleanParam.html" title="class in org.apache.spark.ml.param">BooleanParam</a> fitIntercept()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasFitIntercept.html#fitIntercept--">HasFitIntercept</a></code></span></div> |
| <div class="block">Param for whether to fit an intercept term.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasFitIntercept.html#fitIntercept--">fitIntercept</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasFitIntercept.html" title="interface in org.apache.spark.ml.param.shared">HasFitIntercept</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="tol--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>tol</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a> tol()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasTol.html#tol--">HasTol</a></code></span></div> |
| <div class="block">Param for the convergence tolerance for iterative algorithms (&gt;= 0).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasTol.html#tol--">tol</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasTol.html" title="interface in org.apache.spark.ml.param.shared">HasTol</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="maxIter--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>maxIter</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/IntParam.html" title="class in org.apache.spark.ml.param">IntParam</a> maxIter()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html#maxIter--">HasMaxIter</a></code></span></div> |
| <div class="block">Param for maximum number of iterations (&gt;= 0).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html#maxIter--">maxIter</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasMaxIter.html" title="interface in org.apache.spark.ml.param.shared">HasMaxIter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="elasticNetParam--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>elasticNetParam</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a> elasticNetParam()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasElasticNetParam.html#elasticNetParam--">HasElasticNetParam</a></code></span></div> |
| <div class="block">Param for the ElasticNet mixing parameter, in range [0, 1]. For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasElasticNetParam.html#elasticNetParam--">elasticNetParam</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasElasticNetParam.html" title="interface in org.apache.spark.ml.param.shared">HasElasticNetParam</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="regParam--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>regParam</h4> |
| <pre>public final <a href="../../../../../org/apache/spark/ml/param/DoubleParam.html" title="class in org.apache.spark.ml.param">DoubleParam</a> regParam()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/shared/HasRegParam.html#regParam--">HasRegParam</a></code></span></div> |
| <div class="block">Param for regularization parameter (&gt;= 0).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/shared/HasRegParam.html#regParam--">regParam</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/shared/HasRegParam.html" title="interface in org.apache.spark.ml.param.shared">HasRegParam</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="uid--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>uid</h4> |
| <pre>public String uid()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/util/Identifiable.html#uid--">Identifiable</a></code></span></div> |
| <div class="block">An immutable unique ID for the object and its derivatives.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/util/Identifiable.html#uid--">uid</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/util/Identifiable.html" title="interface in org.apache.spark.ml.util">Identifiable</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setRegParam-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRegParam</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setRegParam(double value)</pre> |
| <div class="block">Set the regularization parameter. |
| Default is 0.0. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setFitIntercept-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFitIntercept</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setFitIntercept(boolean value)</pre> |
| <div class="block">Set if we should fit the intercept. |
| Default is true. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setStandardization-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setStandardization</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setStandardization(boolean value)</pre> |
| <div class="block">Whether to standardize the training features before fitting the model. |
| The coefficients of models will be always returned on the original scale, |
| so it will be transparent for users. |
| Default is true. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| <dt><span class="simpleTagLabel">Note:</span></dt> |
| <dd>With/without standardization, the models should be always converged |
| to the same solution when no regularization is applied. In R's GLMNET package, |
| the default behavior is true as well. |
| <p></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setElasticNetParam-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setElasticNetParam</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setElasticNetParam(double value)</pre> |
| <div class="block">Set the ElasticNet mixing parameter. |
| For alpha = 0, the penalty is an L2 penalty. |
| For alpha = 1, it is an L1 penalty. |
| For alpha in (0,1), the penalty is a combination of L1 and L2. |
| Default is 0.0 which is an L2 penalty. |
| <p> |
| Note: Fitting with huber loss only supports None and L2 regularization, |
| so throws exception if this param is non-zero value. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setMaxIter-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxIter</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setMaxIter(int value)</pre> |
| <div class="block">Set the maximum number of iterations. |
| Default is 100. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setTol-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setTol</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setTol(double value)</pre> |
| <div class="block">Set the convergence tolerance of iterations. |
| Smaller value will lead to higher accuracy with the cost of more iterations. |
| Default is 1E-6. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setWeightCol-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setWeightCol</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setWeightCol(String value)</pre> |
| <div class="block">Whether to over-/under-sample training instances according to the given weights in weightCol. |
| If not set or empty, all instances are treated equally (weight 1.0). |
| Default is not set, so all instances have weight one. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setSolver-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSolver</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setSolver(String value)</pre> |
| <div class="block">Set the solver algorithm used for optimization. |
| In case of linear regression, this can be "l-bfgs", "normal" and "auto". |
| - "l-bfgs" denotes Limited-memory BFGS which is a limited-memory quasi-Newton |
| optimization method. |
| - "normal" denotes using Normal Equation as an analytical solution to the linear regression |
| problem. This solver is limited to <code>LinearRegression.MAX_FEATURES_FOR_NORMAL_SOLVER</code>. |
| - "auto" (default) means that the solver algorithm is selected automatically. |
| The Normal Equations solver will be used when possible, but this will automatically fall |
| back to iterative optimization methods when needed. |
| <p> |
| Note: Fitting with huber loss doesn't support normal solver, |
| so throws exception if this param was set with "normal".</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setAggregationDepth-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAggregationDepth</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setAggregationDepth(int value)</pre> |
| <div class="block">Suggested depth for treeAggregate (greater than or equal to 2). |
| If the dimensions of features or the number of partitions are large, |
| this param could be adjusted to a larger size. |
| Default is 2. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setLoss-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLoss</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setLoss(String value)</pre> |
| <div class="block">Sets the value of param <code>loss</code>. |
| Default is "squaredError". |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setEpsilon-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setEpsilon</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setEpsilon(double value)</pre> |
| <div class="block">Sets the value of param <code>epsilon</code>. |
| Default is 1.35. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setMaxBlockSizeInMB-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMaxBlockSizeInMB</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> setMaxBlockSizeInMB(double value)</pre> |
| <div class="block">Sets the value of param <code>maxBlockSizeInMB</code>. |
| Default is 0.0, then 1.0 MB will be chosen. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copy-org.apache.spark.ml.param.ParamMap-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>copy</h4> |
| <pre>public <a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a> copy(<a href="../../../../../org/apache/spark/ml/param/ParamMap.html" title="class in org.apache.spark.ml.param">ParamMap</a> extra)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/ml/param/Params.html#copy-org.apache.spark.ml.param.ParamMap-">Params</a></code></span></div> |
| <div class="block">Creates a copy of this instance with the same UID and some extra params. |
| Subclasses should implement this method and set the return type properly. |
| See <code>defaultCopy()</code>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/param/Params.html#copy-org.apache.spark.ml.param.ParamMap-">copy</a></code> in interface <code><a href="../../../../../org/apache/spark/ml/param/Params.html" title="interface in org.apache.spark.ml.param">Params</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/ml/Predictor.html#copy-org.apache.spark.ml.param.ParamMap-">copy</a></code> in class <code><a href="../../../../../org/apache/spark/ml/Predictor.html" title="class in org.apache.spark.ml">Predictor</a><<a href="../../../../../org/apache/spark/ml/linalg/Vector.html" title="interface in org.apache.spark.ml.linalg">Vector</a>,<a href="../../../../../org/apache/spark/ml/regression/LinearRegression.html" title="class in org.apache.spark.ml.regression">LinearRegression</a>,<a href="../../../../../org/apache/spark/ml/regression/LinearRegressionModel.html" title="class in org.apache.spark.ml.regression">LinearRegressionModel</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>extra</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <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/ml/regression/IsotonicRegressionModel.html" title="class in org.apache.spark.ml.regression"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/spark/ml/regression/LinearRegressionModel.html" title="class in org.apache.spark.ml.regression"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/spark/ml/regression/LinearRegression.html" target="_top">Frames</a></li> |
| <li><a href="LinearRegression.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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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> |