<!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 15:55:11 PDT 2015 -->
<title>ALS</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="ALS";
}
//-->
</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>Prev Class</li>
<li><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/ALS.html" target="_top">Frames</a></li>
<li><a href="ALS.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.recommendation</div>
<h2 title="Class ALS" class="title">Class ALS</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.spark.mllib.recommendation.ALS</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, <a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">ALS</span>
extends java.lang.Object
implements scala.Serializable, <a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></pre>
<div class="block">Alternating Least Squares matrix factorization.
<p>
ALS attempts to estimate the ratings matrix <code>R</code> as the product of two lower-rank matrices,
<code>X</code> and <code>Y</code>, i.e. <code>X * Yt = R</code>. Typically these approximations are called 'factor' matrices.
The general approach is iterative. During each iteration, one of the factor matrices is held
constant, while the other is solved for using least squares. The newly-solved factor matrix is
then held constant while solving for the other factor matrix.
<p>
This is a blocked implementation of the ALS factorization algorithm that groups the two sets
of factors (referred to as "users" and "products") into blocks and reduces communication by only
sending one copy of each user vector to each product block on each iteration, and only for the
product blocks that need that user's feature vector. This is achieved by precomputing some
information about the ratings matrix to determine the "out-links" of each user (which blocks of
products it will contribute to) and "in-link" information for each product (which of the feature
vectors it receives from each user block it will depend on). This allows us to send only an
array of feature vectors between each user block and product block, and have the product block
find the users' ratings and update the products based on these messages.
<p>
For implicit preference data, the algorithm used is based on
"Collaborative Filtering for Implicit Feedback Datasets", available at
<code>http://dx.doi.org/10.1109/ICDM.2008.22</code>, adapted for the blocked approach used here.
<p>
Essentially instead of finding the low-rank approximations to the rating matrix <code>R</code>,
this finds the approximations for a preference matrix <code>P</code> where the elements of <code>P</code> are 1 if
r > 0 and 0 if r <= 0. The ratings then act as 'confidence' values related to strength of
indicated user
preferences rather than explicit ratings given to items.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.mllib.recommendation.ALS">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/recommendation/ALS.html#ALS()">ALS</a></strong>()</code>
<div class="block">Constructs an ALS instance with default parameters: {numBlocks: -1, rank: 10, iterations: 10,
lambda: 0.01, implicitPrefs: false, alpha: 1.0}.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </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/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#run(org.apache.spark.api.java.JavaRDD)">run</a></strong>(<a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings)</code>
<div class="block">Java-friendly version of <code>ALS.run</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#run(org.apache.spark.rdd.RDD)">run</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings)</code>
<div class="block">Run ALS with the configured parameters on an input RDD of (user, product, rating) triples.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setAlpha(double)">setAlpha</a></strong>(double alpha)</code>
<div class="block">Sets the constant used in computing confidence in implicit ALS.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setBlocks(int)">setBlocks</a></strong>(int numBlocks)</code>
<div class="block">Set the number of blocks for both user blocks and product blocks to parallelize the computation
into; pass -1 for an auto-configured number of blocks.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setCheckpointInterval(int)">setCheckpointInterval</a></strong>(int checkpointInterval)</code>
<div class="block">Set period (in iterations) between checkpoints (default = 10).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setFinalRDDStorageLevel(org.apache.spark.storage.StorageLevel)">setFinalRDDStorageLevel</a></strong>(<a href="../../../../../org/apache/spark/storage/StorageLevel.html" title="class in org.apache.spark.storage">StorageLevel</a> storageLevel)</code>
<div class="block">:: DeveloperApi ::
Sets storage level for final RDDs (user/product used in MatrixFactorizationModel).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setImplicitPrefs(boolean)">setImplicitPrefs</a></strong>(boolean implicitPrefs)</code>
<div class="block">Sets whether to use implicit preference.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setIntermediateRDDStorageLevel(org.apache.spark.storage.StorageLevel)">setIntermediateRDDStorageLevel</a></strong>(<a href="../../../../../org/apache/spark/storage/StorageLevel.html" title="class in org.apache.spark.storage">StorageLevel</a> storageLevel)</code>
<div class="block">:: DeveloperApi ::
Sets storage level for intermediate RDDs (user/product in/out links).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setIterations(int)">setIterations</a></strong>(int iterations)</code>
<div class="block">Set the number of iterations to run.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setLambda(double)">setLambda</a></strong>(double lambda)</code>
<div class="block">Set the regularization parameter, lambda.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setNonnegative(boolean)">setNonnegative</a></strong>(boolean b)</code>
<div class="block">Set whether the least-squares problems solved at each iteration should have
nonnegativity constraints.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setProductBlocks(int)">setProductBlocks</a></strong>(int numProductBlocks)</code>
<div class="block">Set the number of product blocks to parallelize the computation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setRank(int)">setRank</a></strong>(int rank)</code>
<div class="block">Set the rank of the feature matrices computed (number of features).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setSeed(long)">setSeed</a></strong>(long seed)</code>
<div class="block">Sets a random seed to have deterministic results.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#setUserBlocks(int)">setUserBlocks</a></strong>(int numUserBlocks)</code>
<div class="block">Set the number of user blocks to parallelize the computation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#train(org.apache.spark.rdd.RDD, int, int)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations)</code>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#train(org.apache.spark.rdd.RDD, int, int, double)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda)</code>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#train(org.apache.spark.rdd.RDD, int, int, double, int)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks)</code>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#train(org.apache.spark.rdd.RDD, int, int, double, int, long)">train</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks,
long seed)</code>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#trainImplicit(org.apache.spark.rdd.RDD, int, int)">trainImplicit</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations)</code>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' ratings given by
users to some products, in the form of (userID, productID, rating) pairs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#trainImplicit(org.apache.spark.rdd.RDD, int, int, double, double)">trainImplicit</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
double alpha)</code>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' given by users to
some products, in the form of (userID, productID, preference) pairs.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#trainImplicit(org.apache.spark.rdd.RDD, int, int, double, int, double)">trainImplicit</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks,
double alpha)</code>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' given by users
to some products, in the form of (userID, productID, preference) pairs.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html#trainImplicit(org.apache.spark.rdd.RDD, int, int, double, int, double, long)">trainImplicit</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks,
double alpha,
long seed)</code>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' given by users
to some products, in the form of (userID, productID, preference) pairs.</div>
</td>
</tr>
</table>
<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, toString, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.spark.Logging">
<!-- -->
</a>
<h3>Methods inherited from interface org.apache.spark.<a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></h3>
<code><a href="../../../../../org/apache/spark/Logging.html#initializeIfNecessary()">initializeIfNecessary</a>, <a href="../../../../../org/apache/spark/Logging.html#initializeLogging()">initializeLogging</a>, <a href="../../../../../org/apache/spark/Logging.html#isTraceEnabled()">isTraceEnabled</a>, <a href="../../../../../org/apache/spark/Logging.html#log_()">log_</a>, <a href="../../../../../org/apache/spark/Logging.html#log()">log</a>, <a href="../../../../../org/apache/spark/Logging.html#logDebug(scala.Function0)">logDebug</a>, <a href="../../../../../org/apache/spark/Logging.html#logDebug(scala.Function0, java.lang.Throwable)">logDebug</a>, <a href="../../../../../org/apache/spark/Logging.html#logError(scala.Function0)">logError</a>, <a href="../../../../../org/apache/spark/Logging.html#logError(scala.Function0, java.lang.Throwable)">logError</a>, <a href="../../../../../org/apache/spark/Logging.html#logInfo(scala.Function0)">logInfo</a>, <a href="../../../../../org/apache/spark/Logging.html#logInfo(scala.Function0, java.lang.Throwable)">logInfo</a>, <a href="../../../../../org/apache/spark/Logging.html#logName()">logName</a>, <a href="../../../../../org/apache/spark/Logging.html#logTrace(scala.Function0)">logTrace</a>, <a href="../../../../../org/apache/spark/Logging.html#logTrace(scala.Function0, java.lang.Throwable)">logTrace</a>, <a href="../../../../../org/apache/spark/Logging.html#logWarning(scala.Function0)">logWarning</a>, <a href="../../../../../org/apache/spark/Logging.html#logWarning(scala.Function0, java.lang.Throwable)">logWarning</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ALS()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ALS</h4>
<pre>public ALS()</pre>
<div class="block">Constructs an ALS instance with default parameters: {numBlocks: -1, rank: 10, iterations: 10,
lambda: 0.01, implicitPrefs: false, alpha: 1.0}.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="train(org.apache.spark.rdd.RDD, int, int, double, int, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks,
long seed)</pre>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the
product of two lower-rank matrices of a given rank (number of features). To solve for these
features, we run a given number of iterations of ALS. This is done using a level of
parallelism given by <code>blocks</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd><dd><code>lambda</code> - regularization factor (recommended: 0.01)</dd><dd><code>blocks</code> - level of parallelism to split computation into</dd><dd><code>seed</code> - random seed</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="train(org.apache.spark.rdd.RDD, int, int, double, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks)</pre>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the
product of two lower-rank matrices of a given rank (number of features). To solve for these
features, we run a given number of iterations of ALS. This is done using a level of
parallelism given by <code>blocks</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd><dd><code>lambda</code> - regularization factor (recommended: 0.01)</dd><dd><code>blocks</code> - level of parallelism to split computation into</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="train(org.apache.spark.rdd.RDD, int, int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda)</pre>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the
product of two lower-rank matrices of a given rank (number of features). To solve for these
features, we run a given number of iterations of ALS. The level of parallelism is determined
automatically based on the number of partitions in <code>ratings</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd><dd><code>lambda</code> - regularization factor (recommended: 0.01)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="train(org.apache.spark.rdd.RDD, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>train</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> train(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations)</pre>
<div class="block">Train a matrix factorization model given an RDD of ratings given by users to some products,
in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the
product of two lower-rank matrices of a given rank (number of features). To solve for these
features, we run a given number of iterations of ALS. The level of parallelism is determined
automatically based on the number of partitions in <code>ratings</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="trainImplicit(org.apache.spark.rdd.RDD, int, int, double, int, double, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trainImplicit</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> trainImplicit(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks,
double alpha,
long seed)</pre>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' given by users
to some products, in the form of (userID, productID, preference) pairs. We approximate the
ratings matrix as the product of two lower-rank matrices of a given rank (number of features).
To solve for these features, we run a given number of iterations of ALS. This is done using
a level of parallelism given by <code>blocks</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd><dd><code>lambda</code> - regularization factor (recommended: 0.01)</dd><dd><code>blocks</code> - level of parallelism to split computation into</dd><dd><code>alpha</code> - confidence parameter</dd><dd><code>seed</code> - random seed</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="trainImplicit(org.apache.spark.rdd.RDD, int, int, double, int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trainImplicit</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> trainImplicit(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
int blocks,
double alpha)</pre>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' given by users
to some products, in the form of (userID, productID, preference) pairs. We approximate the
ratings matrix as the product of two lower-rank matrices of a given rank (number of features).
To solve for these features, we run a given number of iterations of ALS. This is done using
a level of parallelism given by <code>blocks</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd><dd><code>lambda</code> - regularization factor (recommended: 0.01)</dd><dd><code>blocks</code> - level of parallelism to split computation into</dd><dd><code>alpha</code> - confidence parameter</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="trainImplicit(org.apache.spark.rdd.RDD, int, int, double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trainImplicit</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> trainImplicit(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations,
double lambda,
double alpha)</pre>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' given by users to
some products, in the form of (userID, productID, preference) pairs. We approximate the
ratings matrix as the product of two lower-rank matrices of a given rank (number of features).
To solve for these features, we run a given number of iterations of ALS. The level of
parallelism is determined automatically based on the number of partitions in <code>ratings</code>.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd><dd><code>lambda</code> - regularization factor (recommended: 0.01)</dd><dd><code>alpha</code> - confidence parameter</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="trainImplicit(org.apache.spark.rdd.RDD, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trainImplicit</h4>
<pre>public static <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> trainImplicit(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings,
int rank,
int iterations)</pre>
<div class="block">Train a matrix factorization model given an RDD of 'implicit preferences' ratings given by
users to some products, in the form of (userID, productID, rating) pairs. We approximate the
ratings matrix as the product of two lower-rank matrices of a given rank (number of features).
To solve for these features, we run a given number of iterations of ALS. The level of
parallelism is determined automatically based on the number of partitions in <code>ratings</code>.
Model parameters <code>alpha</code> and <code>lambda</code> are set to reasonable default values
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - RDD of (userID, productID, rating) pairs</dd><dd><code>rank</code> - number of features to use</dd><dd><code>iterations</code> - number of iterations of ALS (recommended: 10-20)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setBlocks(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBlocks</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setBlocks(int numBlocks)</pre>
<div class="block">Set the number of blocks for both user blocks and product blocks to parallelize the computation
into; pass -1 for an auto-configured number of blocks. Default: -1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numBlocks</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setUserBlocks(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUserBlocks</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setUserBlocks(int numUserBlocks)</pre>
<div class="block">Set the number of user blocks to parallelize the computation.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numUserBlocks</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setProductBlocks(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProductBlocks</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setProductBlocks(int numProductBlocks)</pre>
<div class="block">Set the number of product blocks to parallelize the computation.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numProductBlocks</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setRank(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRank</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setRank(int rank)</pre>
<div class="block">Set the rank of the feature matrices computed (number of features). Default: 10.</div>
</li>
</ul>
<a name="setIterations(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIterations</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setIterations(int iterations)</pre>
<div class="block">Set the number of iterations to run. Default: 10.</div>
</li>
</ul>
<a name="setLambda(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLambda</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setLambda(double lambda)</pre>
<div class="block">Set the regularization parameter, lambda. Default: 0.01.</div>
</li>
</ul>
<a name="setImplicitPrefs(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setImplicitPrefs</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setImplicitPrefs(boolean implicitPrefs)</pre>
<div class="block">Sets whether to use implicit preference. Default: false.</div>
</li>
</ul>
<a name="setAlpha(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAlpha</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setAlpha(double alpha)</pre>
<div class="block">Sets the constant used in computing confidence in implicit ALS. Default: 1.0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>alpha</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setSeed(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSeed</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setSeed(long seed)</pre>
<div class="block">Sets a random seed to have deterministic results.</div>
</li>
</ul>
<a name="setNonnegative(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNonnegative</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setNonnegative(boolean b)</pre>
<div class="block">Set whether the least-squares problems solved at each iteration should have
nonnegativity constraints.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setIntermediateRDDStorageLevel(org.apache.spark.storage.StorageLevel)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIntermediateRDDStorageLevel</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setIntermediateRDDStorageLevel(<a href="../../../../../org/apache/spark/storage/StorageLevel.html" title="class in org.apache.spark.storage">StorageLevel</a> storageLevel)</pre>
<div class="block">:: DeveloperApi ::
Sets storage level for intermediate RDDs (user/product in/out links). The default value is
<code>MEMORY_AND_DISK</code>. Users can change it to a serialized storage, e.g., <code>MEMORY_AND_DISK_SER</code> and
set <code>spark.rdd.compress</code> to <code>true</code> to reduce the space requirement, at the cost of speed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storageLevel</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setFinalRDDStorageLevel(org.apache.spark.storage.StorageLevel)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFinalRDDStorageLevel</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setFinalRDDStorageLevel(<a href="../../../../../org/apache/spark/storage/StorageLevel.html" title="class in org.apache.spark.storage">StorageLevel</a> storageLevel)</pre>
<div class="block">:: DeveloperApi ::
Sets storage level for final RDDs (user/product used in MatrixFactorizationModel). The default
value is <code>MEMORY_AND_DISK</code>. Users can change it to a serialized storage, e.g.
<code>MEMORY_AND_DISK_SER</code> and set <code>spark.rdd.compress</code> to <code>true</code> to reduce the space requirement,
at the cost of speed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storageLevel</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="setCheckpointInterval(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCheckpointInterval</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a> setCheckpointInterval(int checkpointInterval)</pre>
<div class="block">Set period (in iterations) between checkpoints (default = 10). Checkpointing helps with
recovery (when nodes fail) and StackOverflow exceptions caused by long lineage. It also helps
with eliminating temporary shuffle files on disk, which can be important when there are many
ALS iterations. If the checkpoint directory is not set in <a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark"><code>SparkContext</code></a>,
this setting is ignored.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>checkpointInterval</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="run(org.apache.spark.rdd.RDD)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> run(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings)</pre>
<div class="block">Run ALS with the configured parameters on an input RDD of (user, product, rating) triples.
Returns a MatrixFactorizationModel with feature vectors for each user and product.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="run(org.apache.spark.api.java.JavaRDD)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>run</h4>
<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> run(<a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>> ratings)</pre>
<div class="block">Java-friendly version of <code>ALS.run</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ratings</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/ALS.html" target="_top">Frames</a></li>
<li><a href="ALS.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>