<!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:35 PDT 2015 -->
<title>LogisticRegressionModel</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="LogisticRegressionModel";
}
//-->
</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/classification/ClassificationModel.html" title="interface in org.apache.spark.mllib.classification"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionWithLBFGS.html" title="class in org.apache.spark.mllib.classification"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/classification/LogisticRegressionModel.html" target="_top">Frames</a></li>
<li><a href="LogisticRegressionModel.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.mllib.classification</div>
<h2 title="Class LogisticRegressionModel" class="title">Class LogisticRegressionModel</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/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">org.apache.spark.mllib.regression.GeneralizedLinearModel</a></li>
<li>
<ul class="inheritance">
<li>org.apache.spark.mllib.classification.LogisticRegressionModel</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/mllib/classification/ClassificationModel.html" title="interface in org.apache.spark.mllib.classification">ClassificationModel</a>, <a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html" title="interface in org.apache.spark.mllib.pmml">PMMLExportable</a>, <a href="../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">LogisticRegressionModel</span>
extends <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearModel</a>
implements <a href="../../../../../org/apache/spark/mllib/classification/ClassificationModel.html" title="interface in org.apache.spark.mllib.classification">ClassificationModel</a>, scala.Serializable, <a href="../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a>, <a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html" title="interface in org.apache.spark.mllib.pmml">PMMLExportable</a></pre>
<div class="block">Classification model trained using Multinomial/Binary Logistic Regression.
<p>
param: weights Weights computed for every feature.
param: intercept Intercept computed for this model. (Only used in Binary Logistic Regression.
In Multinomial Logistic Regression, the intercepts will not be a single value,
so the intercepts will be part of the weights.)
param: numFeatures the dimension of the features.
param: numClasses the number of possible outcomes for k classes classification problem in
Multinomial Logistic Regression. By default, it is binary logistic regression
so numClasses will be set to 2.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.mllib.classification.LogisticRegressionModel">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"> </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/classification/LogisticRegressionModel.html#LogisticRegressionModel(org.apache.spark.mllib.linalg.Vector, double)">LogisticRegressionModel</a></strong>(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weights,
double intercept)</code>
<div class="block">Constructs a <a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification"><code>LogisticRegressionModel</code></a> with weights and intercept for binary classification.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#LogisticRegressionModel(org.apache.spark.mllib.linalg.Vector, double, int, int)">LogisticRegressionModel</a></strong>(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weights,
double intercept,
int numFeatures,
int numClasses)</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </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><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification">LogisticRegressionModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#clearThreshold()">clearThreshold</a></strong>()</code>
<div class="block">:: Experimental ::
Clears the threshold so that <code>predict</code> will output raw prediction scores.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#formatVersion()">formatVersion</a></strong>()</code>
<div class="block">Current version of model save/load format.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>scala.Option<java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#getThreshold()">getThreshold</a></strong>()</code>
<div class="block">:: Experimental ::
Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#intercept()">intercept</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification">LogisticRegressionModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#load(org.apache.spark.SparkContext, java.lang.String)">load</a></strong>(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc,
java.lang.String path)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#numClasses()">numClasses</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#numFeatures()">numFeatures</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#predictPoint(org.apache.spark.mllib.linalg.Vector, org.apache.spark.mllib.linalg.Vector, double)">predictPoint</a></strong>(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> dataMatrix,
<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weightMatrix,
double intercept)</code>
<div class="block">Predict the result given a data point and the weights learned.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#save(org.apache.spark.SparkContext, java.lang.String)">save</a></strong>(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc,
java.lang.String path)</code>
<div class="block">Save this model to the given path.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification">LogisticRegressionModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#setThreshold(double)">setThreshold</a></strong>(double threshold)</code>
<div class="block">:: Experimental ::
Sets the threshold that separates positive predictions from negative predictions
in Binary Logistic Regression.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#toString()">toString</a></strong>()</code>
<div class="block">Print a summary of the model.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html#weights()">weights</a></strong>()</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.mllib.regression.GeneralizedLinearModel">
<!-- -->
</a>
<h3>Methods inherited from class org.apache.spark.mllib.regression.<a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearModel</a></h3>
<code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#predict(org.apache.spark.rdd.RDD)">predict</a>, <a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#predict(org.apache.spark.mllib.linalg.Vector)">predict</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 java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.mllib.classification.ClassificationModel">
<!-- -->
</a>
<h3>Methods inherited from interface org.apache.spark.mllib.classification.<a href="../../../../../org/apache/spark/mllib/classification/ClassificationModel.html" title="interface in org.apache.spark.mllib.classification">ClassificationModel</a></h3>
<code><a href="../../../../../org/apache/spark/mllib/classification/ClassificationModel.html#predict(org.apache.spark.api.java.JavaRDD)">predict</a>, <a href="../../../../../org/apache/spark/mllib/classification/ClassificationModel.html#predict(org.apache.spark.rdd.RDD)">predict</a>, <a href="../../../../../org/apache/spark/mllib/classification/ClassificationModel.html#predict(org.apache.spark.mllib.linalg.Vector)">predict</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.mllib.pmml.PMMLExportable">
<!-- -->
</a>
<h3>Methods inherited from interface org.apache.spark.mllib.pmml.<a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html" title="interface in org.apache.spark.mllib.pmml">PMMLExportable</a></h3>
<code><a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html#toPMML()">toPMML</a>, <a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html#toPMML(java.io.OutputStream)">toPMML</a>, <a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html#toPMML(org.apache.spark.SparkContext, java.lang.String)">toPMML</a>, <a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html#toPMML(javax.xml.transform.stream.StreamResult)">toPMML</a>, <a href="../../../../../org/apache/spark/mllib/pmml/PMMLExportable.html#toPMML(java.lang.String)">toPMML</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="LogisticRegressionModel(org.apache.spark.mllib.linalg.Vector, double, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LogisticRegressionModel</h4>
<pre>public LogisticRegressionModel(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weights,
double intercept,
int numFeatures,
int numClasses)</pre>
</li>
</ul>
<a name="LogisticRegressionModel(org.apache.spark.mllib.linalg.Vector, double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LogisticRegressionModel</h4>
<pre>public LogisticRegressionModel(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weights,
double intercept)</pre>
<div class="block">Constructs a <a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification"><code>LogisticRegressionModel</code></a> with weights and intercept for binary classification.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>weights</code> - (undocumented)</dd><dd><code>intercept</code> - (undocumented)</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="load(org.apache.spark.SparkContext, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>load</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification">LogisticRegressionModel</a> load(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc,
java.lang.String path)</pre>
</li>
</ul>
<a name="weights()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>weights</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weights()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#weights()">weights</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearModel</a></code></dd>
</dl>
</li>
</ul>
<a name="intercept()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intercept</h4>
<pre>public double intercept()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#intercept()">intercept</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearModel</a></code></dd>
</dl>
</li>
</ul>
<a name="numFeatures()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numFeatures</h4>
<pre>public int numFeatures()</pre>
</li>
</ul>
<a name="numClasses()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numClasses</h4>
<pre>public int numClasses()</pre>
</li>
</ul>
<a name="setThreshold(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setThreshold</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification">LogisticRegressionModel</a> setThreshold(double threshold)</pre>
<div class="block">:: Experimental ::
Sets the threshold that separates positive predictions from negative predictions
in Binary Logistic Regression. An example with prediction score greater than or equal to
this threshold is identified as an positive, and negative otherwise. The default value is 0.5.
It is only used for binary classification.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>threshold</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="getThreshold()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getThreshold</h4>
<pre>public scala.Option<java.lang.Object> getThreshold()</pre>
<div class="block">:: Experimental ::
Returns the threshold (if any) used for converting raw prediction scores into 0/1 predictions.
It is only used for binary classification.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="clearThreshold()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearThreshold</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionModel.html" title="class in org.apache.spark.mllib.classification">LogisticRegressionModel</a> clearThreshold()</pre>
<div class="block">:: Experimental ::
Clears the threshold so that <code>predict</code> will output raw prediction scores.
It is only used for binary classification.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="predictPoint(org.apache.spark.mllib.linalg.Vector, org.apache.spark.mllib.linalg.Vector, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>predictPoint</h4>
<pre>protected double predictPoint(<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> dataMatrix,
<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> weightMatrix,
double intercept)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#predictPoint(org.apache.spark.mllib.linalg.Vector, org.apache.spark.mllib.linalg.Vector, double)">GeneralizedLinearModel</a></code></strong></div>
<div class="block">Predict the result given a data point and the weights learned.
<p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#predictPoint(org.apache.spark.mllib.linalg.Vector, org.apache.spark.mllib.linalg.Vector, double)">predictPoint</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearModel</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>dataMatrix</code> - Row vector containing the features for this data point</dd><dd><code>weightMatrix</code> - Column vector containing the weights of the model</dd><dd><code>intercept</code> - Intercept of the model.</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="save(org.apache.spark.SparkContext, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>save</h4>
<pre>public void save(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc,
java.lang.String path)</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html#save(org.apache.spark.SparkContext, java.lang.String)">Saveable</a></code></strong></div>
<div class="block">Save this model to the given path.
<p>
This saves:
- human-readable (JSON) model metadata to path/metadata/
- Parquet formatted data to path/data/
<p>
The model may be loaded using <code>Loader.load</code>.
<p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html#save(org.apache.spark.SparkContext, java.lang.String)">save</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>sc</code> - Spark context used to save model data.</dd><dd><code>path</code> - Path specifying the directory in which to save this model.
If the directory already exists, this method throws an exception.</dd></dl>
</li>
</ul>
<a name="formatVersion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>formatVersion</h4>
<pre>protected java.lang.String formatVersion()</pre>
<div class="block"><strong>Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html#formatVersion()">Saveable</a></code></strong></div>
<div class="block">Current version of model save/load format.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html#formatVersion()">formatVersion</a></code> in interface <code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a></code></dd>
</dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#toString()">GeneralizedLinearModel</a></code></strong></div>
<div class="block">Print a summary of the model.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html#toString()">toString</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/regression/GeneralizedLinearModel.html" title="class in org.apache.spark.mllib.regression">GeneralizedLinearModel</a></code></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/classification/ClassificationModel.html" title="interface in org.apache.spark.mllib.classification"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/spark/mllib/classification/LogisticRegressionWithLBFGS.html" title="class in org.apache.spark.mllib.classification"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/classification/LogisticRegressionModel.html" target="_top">Frames</a></li>
<li><a href="LogisticRegressionModel.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>