diff options
author | Reynold Xin <rxin@apache.org> | 2015-09-17 22:11:21 +0000 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2015-09-17 22:11:21 +0000 |
commit | 6f57b0c45a7d1b6255067c6e9bc549baa491acac (patch) | |
tree | dbf7d7a7700e9e6bad3c8289ab831bc9c2c20d62 /site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation | |
parent | ee9ffe89d608e7640a2487406b618d27e58026d6 (diff) | |
download | spark-website-6f57b0c45a7d1b6255067c6e9bc549baa491acac.tar.gz spark-website-6f57b0c45a7d1b6255067c6e9bc549baa491acac.tar.bz2 spark-website-6f57b0c45a7d1b6255067c6e9bc549baa491acac.zip |
add 1.5.0 back
Diffstat (limited to 'site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation')
6 files changed, 1949 insertions, 0 deletions
diff --git a/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/ALS.html b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/ALS.html new file mode 100644 index 000000000..6e3c9fcac --- /dev/null +++ b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/ALS.html @@ -0,0 +1,819 @@ +<!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> diff --git a/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html new file mode 100644 index 000000000..4494041c0 --- /dev/null +++ b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html @@ -0,0 +1,531 @@ +<!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>MatrixFactorizationModel</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="MatrixFactorizationModel"; + } +//--> +</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/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.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/MatrixFactorizationModel.html" target="_top">Frames</a></li> +<li><a href="MatrixFactorizationModel.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 MatrixFactorizationModel" class="title">Class MatrixFactorizationModel</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li>java.lang.Object</li> +<li> +<ul class="inheritance"> +<li>org.apache.spark.mllib.recommendation.MatrixFactorizationModel</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>, <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">MatrixFactorizationModel</span> +extends java.lang.Object +implements <a href="../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a>, scala.Serializable, <a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a></pre> +<div class="block">Model representing the result of matrix factorization. + <p> + Note: If you create the model directly using constructor, please be aware that fast prediction + requires cached user/product features and their associated partitioners. + <p> + param: rank Rank for the features in this model. + param: userFeatures RDD of tuples where each tuple represents the userId and + the features computed for this user. + param: productFeatures RDD of tuples where each tuple represents the productId + and the features computed for this product.</div> +<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.mllib.recommendation.MatrixFactorizationModel">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/MatrixFactorizationModel.html#MatrixFactorizationModel(int, org.apache.spark.rdd.RDD, org.apache.spark.rdd.RDD)">MatrixFactorizationModel</a></strong>(int rank, + <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>> userFeatures, + <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>> productFeatures)</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>protected java.lang.String</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#formatVersion()">formatVersion</a></strong>()</code> +<div class="block">Current version of model save/load format.</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/MatrixFactorizationModel.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> +<div class="block">Load a model from the given path.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>double</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#predict(int, int)">predict</a></strong>(int user, + int product)</code> +<div class="block">Predict the rating of one user for one product.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><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>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#predict(org.apache.spark.api.java.JavaPairRDD)">predict</a></strong>(<a href="../../../../../org/apache/spark/api/java/JavaPairRDD.html" title="class in org.apache.spark.api.java">JavaPairRDD</a><java.lang.Integer,java.lang.Integer> usersProducts)</code> +<div class="block">Java-friendly version of <code>MatrixFactorizationModel.predict</code>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><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>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#predict(org.apache.spark.rdd.RDD)">predict</a></strong>(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,java.lang.Object>> usersProducts)</code> +<div class="block">Predict the rating of many users for many products.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#productFeatures()">productFeatures</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/recommendation/MatrixFactorizationModel.html#rank()">rank</a></strong>()</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[]</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#recommendProducts(int, int)">recommendProducts</a></strong>(int user, + int num)</code> +<div class="block">Recommends products to a user.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[]>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#recommendProductsForUsers(int)">recommendProductsForUsers</a></strong>(int num)</code> +<div class="block">Recommends topK products for all users.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[]</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#recommendUsers(int, int)">recommendUsers</a></strong>(int product, + int num)</code> +<div class="block">Recommends users to a product.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[]>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#recommendUsersForProducts(int)">recommendUsersForProducts</a></strong>(int num)</code> +<div class="block">Recommends topK users for all products.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.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="altColor"> +<td class="colFirst"><code><a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>></code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html#userFeatures()">userFeatures</a></strong>()</code> </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="MatrixFactorizationModel(int, org.apache.spark.rdd.RDD, org.apache.spark.rdd.RDD)"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>MatrixFactorizationModel</h4> +<pre>public MatrixFactorizationModel(int rank, + <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>> userFeatures, + <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>> productFeatures)</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(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/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a> load(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, + java.lang.String path)</pre> +<div class="block">Load a model from the given path. + <p> + The model should have been saved by <code>Saveable.save</code>. + <p></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sc</code> - Spark context used for loading model files.</dd><dd><code>path</code> - Path specifying the directory to which the model was saved.</dd> +<dt><span class="strong">Returns:</span></dt><dd>Model instance</dd></dl> +</li> +</ul> +<a name="rank()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>rank</h4> +<pre>public int rank()</pre> +</li> +</ul> +<a name="userFeatures()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>userFeatures</h4> +<pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>> userFeatures()</pre> +</li> +</ul> +<a name="productFeatures()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>productFeatures</h4> +<pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,double[]>> productFeatures()</pre> +</li> +</ul> +<a name="predict(int, int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>predict</h4> +<pre>public double predict(int user, + int product)</pre> +<div class="block">Predict the rating of one user for one product.</div> +</li> +</ul> +<a name="predict(org.apache.spark.rdd.RDD)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>predict</h4> +<pre>public <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>> predict(<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,java.lang.Object>> usersProducts)</pre> +<div class="block">Predict the rating of many users for many products. + The output RDD has an element per each element in the input RDD (including all duplicates) + unless a user or product is missing in the training set. + <p></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>usersProducts</code> - RDD of (user, product) pairs.</dd> +<dt><span class="strong">Returns:</span></dt><dd>RDD of Ratings.</dd></dl> +</li> +</ul> +<a name="predict(org.apache.spark.api.java.JavaPairRDD)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>predict</h4> +<pre>public <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>> predict(<a href="../../../../../org/apache/spark/api/java/JavaPairRDD.html" title="class in org.apache.spark.api.java">JavaPairRDD</a><java.lang.Integer,java.lang.Integer> usersProducts)</pre> +<div class="block">Java-friendly version of <code>MatrixFactorizationModel.predict</code>.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>usersProducts</code> - (undocumented)</dd> +<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl> +</li> +</ul> +<a name="recommendProducts(int, int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>recommendProducts</h4> +<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[] recommendProducts(int user, + int num)</pre> +<div class="block">Recommends products to a user. + <p></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>user</code> - the user to recommend products to</dd><dd><code>num</code> - how many products to return. The number returned may be less than this.</dd> +<dt><span class="strong">Returns:</span></dt><dd><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation"><code>Rating</code></a> objects, each of which contains the given user ID, a product ID, and a + "score" in the rating field. Each represents one recommended product, and they are sorted + by score, decreasing. The first returned is the one predicted to be most strongly + recommended to the user. The score is an opaque value that indicates how strongly + recommended the product is.</dd></dl> +</li> +</ul> +<a name="recommendUsers(int, int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>recommendUsers</h4> +<pre>public <a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[] recommendUsers(int product, + int num)</pre> +<div class="block">Recommends users to a product. That is, this returns users who are most likely to be + interested in a product. + <p></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>product</code> - the product to recommend users to</dd><dd><code>num</code> - how many users to return. The number returned may be less than this.</dd> +<dt><span class="strong">Returns:</span></dt><dd><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation"><code>Rating</code></a> objects, each of which contains a user ID, the given product ID, and a + "score" in the rating field. Each represents one recommended user, and they are sorted + by score, decreasing. The first returned is the one predicted to be most strongly + recommended to the product. The score is an opaque value that indicates how strongly + recommended the user is.</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="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">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="recommendProductsForUsers(int)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>recommendProductsForUsers</h4> +<pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[]>> recommendProductsForUsers(int num)</pre> +<div class="block">Recommends topK products for all users. + <p></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - how many products to return for every user.</dd> +<dt><span class="strong">Returns:</span></dt><dd>[(Int, Array[Rating])] objects, where every tuple contains a userID and an array of + rating objects which contains the same userId, recommended productID and a "score" in the + rating field. Semantics of score is same as recommendProducts API</dd></dl> +</li> +</ul> +<a name="recommendUsersForProducts(int)"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>recommendUsersForProducts</h4> +<pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a>[]>> recommendUsersForProducts(int num)</pre> +<div class="block">Recommends topK users for all products. + <p></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - how many users to return for every product.</dd> +<dt><span class="strong">Returns:</span></dt><dd>[(Int, Array[Rating])] objects, where every tuple contains a productID and an array + of rating objects which contains the recommended userId, same productID and a "score" in the + rating field. Semantics of score is same as recommendUsers API</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/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.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/MatrixFactorizationModel.html" target="_top">Frames</a></li> +<li><a href="MatrixFactorizationModel.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> diff --git a/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/Rating.html b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/Rating.html new file mode 100644 index 000000000..17f11fc0d --- /dev/null +++ b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/Rating.html @@ -0,0 +1,305 @@ +<!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>Rating</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="Rating"; + } +//--> +</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/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/Rating.html" target="_top">Frames</a></li> +<li><a href="Rating.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 Rating" class="title">Class Rating</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li>java.lang.Object</li> +<li> +<ul class="inheritance"> +<li>org.apache.spark.mllib.recommendation.Rating</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd>java.io.Serializable, scala.Equals, scala.Product</dd> +</dl> +<hr> +<br> +<pre>public class <span class="strong">Rating</span> +extends java.lang.Object +implements scala.Product, scala.Serializable</pre> +<div class="block">A more compact class to represent a rating than Tuple3[Int, Int, Double].</div> +<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.spark.mllib.recommendation.Rating">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/Rating.html#Rating(int, int, double)">Rating</a></strong>(int user, + int product, + double rating)</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>int</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html#product()">product</a></strong>()</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>double</code></td> +<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html#rating()">rating</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/recommendation/Rating.html#user()">user</a></strong>()</code> </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_scala.Product"> +<!-- --> +</a> +<h3>Methods inherited from interface scala.Product</h3> +<code>productArity, productElement, productIterator, productPrefix</code></li> +</ul> +<ul class="blockList"> +<li class="blockList"><a name="methods_inherited_from_class_scala.Equals"> +<!-- --> +</a> +<h3>Methods inherited from interface scala.Equals</h3> +<code>canEqual, equals</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="Rating(int, int, double)"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Rating</h4> +<pre>public Rating(int user, + int product, + double rating)</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method_detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="user()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>user</h4> +<pre>public int user()</pre> +</li> +</ul> +<a name="product()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>product</h4> +<pre>public int product()</pre> +</li> +</ul> +<a name="rating()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>rating</h4> +<pre>public double rating()</pre> +</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/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Prev Class</span></a></li> +<li>Next Class</li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/Rating.html" target="_top">Frames</a></li> +<li><a href="Rating.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> diff --git a/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-frame.html b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-frame.html new file mode 100644 index 000000000..f4a8f9a75 --- /dev/null +++ b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-frame.html @@ -0,0 +1,21 @@ +<!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:14 PDT 2015 --> +<title>org.apache.spark.mllib.recommendation</title> +<meta name="date" content="2015-09-16"> +<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> +</head> +<body> +<h1 class="bar"><a href="../../../../../org/apache/spark/mllib/recommendation/package-summary.html" target="classFrame">org.apache.spark.mllib.recommendation</a></h1> +<div class="indexContainer"> +<h2 title="Classes">Classes</h2> +<ul title="Classes"> +<li><a href="ALS.html" title="class in org.apache.spark.mllib.recommendation" target="classFrame">ALS</a></li> +<li><a href="MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation" target="classFrame">MatrixFactorizationModel</a></li> +<li><a href="Rating.html" title="class in org.apache.spark.mllib.recommendation" target="classFrame">Rating</a></li> +</ul> +</div> +<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> diff --git a/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-summary.html b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-summary.html new file mode 100644 index 000000000..61b97646d --- /dev/null +++ b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-summary.html @@ -0,0 +1,145 @@ +<!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:14 PDT 2015 --> +<title>org.apache.spark.mllib.recommendation</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="org.apache.spark.mllib.recommendation"; + } +//--> +</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 class="navBarCell1Rev">Package</li> +<li>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/rdd/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/spark/mllib/regression/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.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> +<a name="skip-navbar_top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 title="Package" class="title">Package org.apache.spark.mllib.recommendation</h1> +</div> +<div class="contentContainer"> +<ul class="blockList"> +<li class="blockList"> +<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> +<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Class</th> +<th class="colLast" scope="col">Description</th> +</tr> +<tbody> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation">ALS</a></td> +<td class="colLast"> +<div class="block">Alternating Least Squares matrix factorization.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation">MatrixFactorizationModel</a></td> +<td class="colLast"> +<div class="block">Model representing the result of matrix factorization.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation">Rating</a></td> +<td class="colLast"> +<div class="block">A more compact class to represent a rating than Tuple3[Int, Int, Double].</div> +</td> +</tr> +</tbody> +</table> +</li> +</ul> +</div> +<!-- ======= 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 class="navBarCell1Rev">Package</li> +<li>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/rdd/package-summary.html">Prev Package</a></li> +<li><a href="../../../../../org/apache/spark/mllib/regression/package-summary.html">Next Package</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/package-summary.html" target="_top">Frames</a></li> +<li><a href="package-summary.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> +<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> diff --git a/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-tree.html b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-tree.html new file mode 100644 index 000000000..cdee24107 --- /dev/null +++ b/site/docs/1.5.0/api/java/org/apache/spark/mllib/recommendation/package-tree.html @@ -0,0 +1,128 @@ +<!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:14 PDT 2015 --> +<title>org.apache.spark.mllib.recommendation Class Hierarchy</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="org.apache.spark.mllib.recommendation Class Hierarchy"; + } +//--> +</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</li> +<li class="navBarCell1Rev">Tree</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/rdd/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/spark/mllib/regression/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.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> +<a name="skip-navbar_top"> +<!-- --> +</a></div> +<!-- ========= END OF TOP NAVBAR ========= --> +<div class="header"> +<h1 class="title">Hierarchy For Package org.apache.spark.mllib.recommendation</h1> +<span class="strong">Package Hierarchies:</span> +<ul class="horizontal"> +<li><a href="../../../../../overview-tree.html">All Packages</a></li> +</ul> +</div> +<div class="contentContainer"> +<h2 title="Class Hierarchy">Class Hierarchy</h2> +<ul> +<li type="circle">java.lang.Object +<ul> +<li type="circle">org.apache.spark.mllib.recommendation.<a href="../../../../../org/apache/spark/mllib/recommendation/ALS.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">ALS</span></a> (implements org.apache.spark.<a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a>, scala.Serializable)</li> +<li type="circle">org.apache.spark.mllib.recommendation.<a href="../../../../../org/apache/spark/mllib/recommendation/MatrixFactorizationModel.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">MatrixFactorizationModel</span></a> (implements org.apache.spark.<a href="../../../../../org/apache/spark/Logging.html" title="interface in org.apache.spark">Logging</a>, org.apache.spark.mllib.util.<a href="../../../../../org/apache/spark/mllib/util/Saveable.html" title="interface in org.apache.spark.mllib.util">Saveable</a>, scala.Serializable)</li> +<li type="circle">org.apache.spark.mllib.recommendation.<a href="../../../../../org/apache/spark/mllib/recommendation/Rating.html" title="class in org.apache.spark.mllib.recommendation"><span class="strong">Rating</span></a> (implements scala.Product, scala.Serializable)</li> +</ul> +</li> +</ul> +</div> +<!-- ======= 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</li> +<li class="navBarCell1Rev">Tree</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/rdd/package-tree.html">Prev</a></li> +<li><a href="../../../../../org/apache/spark/mllib/regression/package-tree.html">Next</a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../../index.html?org/apache/spark/mllib/recommendation/package-tree.html" target="_top">Frames</a></li> +<li><a href="package-tree.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> +<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> |