| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_402) on Mon Apr 15 02:01:53 UTC 2024 --> |
| <title>DistributedLDAModel (Spark 3.4.3 JavaDoc)</title> |
| <meta name="date" content="2024-04-15"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DistributedLDAModel (Spark 3.4.3 JavaDoc)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":9,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/spark/mllib/clustering/BisectingKMeansModel.SaveLoadV3_0$.html" title="class in org.apache.spark.mllib.clustering"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/spark/mllib/clustering/EMLDAOptimizer.html" title="class in org.apache.spark.mllib.clustering"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/spark/mllib/clustering/DistributedLDAModel.html" target="_top">Frames</a></li> |
| <li><a href="DistributedLDAModel.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>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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.clustering</div> |
| <h2 title="Class DistributedLDAModel" class="title">Class DistributedLDAModel</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">org.apache.spark.mllib.clustering.LDAModel</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.spark.mllib.clustering.DistributedLDAModel</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><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="typeNameLabel">DistributedLDAModel</span> |
| extends <a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></pre> |
| <div class="block">Distributed LDA model. |
| This model stores the inferred topics, the full training dataset, and the topic distributions.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>scala.Tuple2<int[],double[]>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#describeTopics-int-">describeTopics</a></span>(int maxTermsPerTopic)</code> |
| <div class="block">Return the topics described by weighted terms.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#docConcentration--">docConcentration</a></span>()</code> |
| <div class="block">Concentration parameter (commonly named "alpha") for the prior placed on documents' |
| distributions over topics ("theta").</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><scala.Tuple3<Long,int[],int[]>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#javaTopicAssignments--">javaTopicAssignments</a></span>()</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/api/java/JavaPairRDD.html" title="class in org.apache.spark.api.java">JavaPairRDD</a><Long,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#javaTopicDistributions--">javaTopicDistributions</a></span>()</code> |
| <div class="block">Java-friendly version of <code>topicDistributions</code></div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><scala.Tuple3<Long,int[],double[]>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#javaTopTopicsPerDocument-int-">javaTopTopicsPerDocument</a></span>(int k)</code> |
| <div class="block">Java-friendly version of <code>topTopicsPerDocument</code></div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#k--">k</a></span>()</code> |
| <div class="block">Number of topics</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html" title="class in org.apache.spark.mllib.clustering">DistributedLDAModel</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#load-org.apache.spark.SparkContext-java.lang.String-">load</a></span>(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#logLikelihood--">logLikelihood</a></span>()</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#logPrior--">logPrior</a></span>()</code> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#save-org.apache.spark.SparkContext-java.lang.String-">save</a></span>(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</code> |
| <div class="block">Save this model to the given path.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/clustering/LocalLDAModel.html" title="class in org.apache.spark.mllib.clustering">LocalLDAModel</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#toLocal--">toLocal</a></span>()</code> |
| <div class="block">Convert model to a local model.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>scala.Tuple2<long[],double[]>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topDocumentsPerTopic-int-">topDocumentsPerTopic</a></span>(int maxDocumentsPerTopic)</code> |
| <div class="block">Return the top documents for each topic</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple3<Object,int[],int[]>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicAssignments--">topicAssignments</a></span>()</code> </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicConcentration--">topicConcentration</a></span>()</code> |
| <div class="block">Concentration parameter (commonly named "beta" or "eta") for the prior placed on topics' |
| distributions over terms.</div> |
| </td> |
| </tr> |
| <tr id="i14" 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<Object,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicDistributions--">topicDistributions</a></span>()</code> |
| <div class="block">For each document in the training set, return the distribution over topics for that document |
| ("theta_doc").</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicsMatrix--">topicsMatrix</a></span>()</code> |
| <div class="block">Inferred topics, where each topic is represented by a distribution over terms.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple3<Object,int[],double[]>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topTopicsPerDocument-int-">topTopicsPerDocument</a></span>(int k)</code> |
| <div class="block">For each document, return the top k weighted topics for that document and their weights.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#vocabSize--">vocabSize</a></span>()</code> |
| <div class="block">Vocabulary size (number of terms or terms in the vocabulary)</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.spark.mllib.clustering.LDAModel"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.spark.mllib.clustering.<a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></h3> |
| <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#describeTopics--">describeTopics</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class Object</h3> |
| <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ 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/clustering/DistributedLDAModel.html" title="class in org.apache.spark.mllib.clustering">DistributedLDAModel</a> load(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a> sc, |
| String path)</pre> |
| </li> |
| </ul> |
| <a name="k--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>k</h4> |
| <pre>public int k()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#k--">LDAModel</a></code></span></div> |
| <div class="block">Number of topics</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#k--">k</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="vocabSize--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>vocabSize</h4> |
| <pre>public int vocabSize()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#vocabSize--">LDAModel</a></code></span></div> |
| <div class="block">Vocabulary size (number of terms or terms in the vocabulary)</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#vocabSize--">vocabSize</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="docConcentration--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>docConcentration</h4> |
| <pre>public <a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a> docConcentration()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#docConcentration--">LDAModel</a></code></span></div> |
| <div class="block">Concentration parameter (commonly named "alpha") for the prior placed on documents' |
| distributions over topics ("theta"). |
| <p> |
| This is the parameter to a Dirichlet distribution.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#docConcentration--">docConcentration</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="topicConcentration--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topicConcentration</h4> |
| <pre>public double topicConcentration()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicConcentration--">LDAModel</a></code></span></div> |
| <div class="block">Concentration parameter (commonly named "beta" or "eta") for the prior placed on topics' |
| distributions over terms. |
| <p> |
| This is the parameter to a symmetric Dirichlet distribution. |
| <p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicConcentration--">topicConcentration</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toLocal--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toLocal</h4> |
| <pre>public <a href="../../../../../org/apache/spark/mllib/clustering/LocalLDAModel.html" title="class in org.apache.spark.mllib.clustering">LocalLDAModel</a> toLocal()</pre> |
| <div class="block">Convert model to a local model. |
| The local model stores the inferred topics but not the topic distributions for training |
| documents.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="topicsMatrix--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topicsMatrix</h4> |
| <pre>public <a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a> topicsMatrix()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicsMatrix--">LDAModel</a></code></span></div> |
| <div class="block">Inferred topics, where each topic is represented by a distribution over terms. |
| This is a matrix of size vocabSize x k, where each column is a topic. |
| No guarantees are given about the ordering of the topics.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicsMatrix--">topicsMatrix</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="describeTopics-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>describeTopics</h4> |
| <pre>public scala.Tuple2<int[],double[]>[] describeTopics(int maxTermsPerTopic)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#describeTopics-int-">LDAModel</a></code></span></div> |
| <div class="block">Return the topics described by weighted terms. |
| <p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#describeTopics-int-">describeTopics</a></code> in class <code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html" title="class in org.apache.spark.mllib.clustering">LDAModel</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxTermsPerTopic</code> - Maximum number of terms to collect for each topic.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Array over topics. Each topic is represented as a pair of matching arrays: |
| (term indices, term weights in topic). |
| Each topic's terms are sorted in order of decreasing weight.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="topDocumentsPerTopic-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topDocumentsPerTopic</h4> |
| <pre>public scala.Tuple2<long[],double[]>[] topDocumentsPerTopic(int maxDocumentsPerTopic)</pre> |
| <div class="block">Return the top documents for each topic |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxDocumentsPerTopic</code> - Maximum number of documents to collect for each topic.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Array over topics. Each element represent as a pair of matching arrays: |
| (IDs for the documents, weights of the topic in these documents). |
| For each topic, documents are sorted in order of decreasing topic weights.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="topicAssignments--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topicAssignments</h4> |
| <pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple3<Object,int[],int[]>> topicAssignments()</pre> |
| </li> |
| </ul> |
| <a name="javaTopicAssignments--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>javaTopicAssignments</h4> |
| <pre>public <a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><scala.Tuple3<Long,int[],int[]>> javaTopicAssignments()</pre> |
| </li> |
| </ul> |
| <a name="logLikelihood--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logLikelihood</h4> |
| <pre>public double logLikelihood()</pre> |
| </li> |
| </ul> |
| <a name="logPrior--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>logPrior</h4> |
| <pre>public double logPrior()</pre> |
| </li> |
| </ul> |
| <a name="topicDistributions--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topicDistributions</h4> |
| <pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<Object,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>>> topicDistributions()</pre> |
| <div class="block">For each document in the training set, return the distribution over topics for that document |
| ("theta_doc"). |
| <p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>RDD of (document ID, topic distribution) pairs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="javaTopicDistributions--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>javaTopicDistributions</h4> |
| <pre>public <a href="../../../../../org/apache/spark/api/java/JavaPairRDD.html" title="class in org.apache.spark.api.java">JavaPairRDD</a><Long,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>> javaTopicDistributions()</pre> |
| <div class="block">Java-friendly version of <code>topicDistributions</code></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="topTopicsPerDocument-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>topTopicsPerDocument</h4> |
| <pre>public <a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple3<Object,int[],double[]>> topTopicsPerDocument(int k)</pre> |
| <div class="block">For each document, return the top k weighted topics for that document and their weights.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>k</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>RDD of (doc ID, topic indices, topic weights)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="javaTopTopicsPerDocument-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>javaTopTopicsPerDocument</h4> |
| <pre>public <a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a><scala.Tuple3<Long,int[],double[]>> javaTopTopicsPerDocument(int k)</pre> |
| <div class="block">Java-friendly version of <code>topTopicsPerDocument</code></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>k</code> - (undocumented)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>(undocumented)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="save-org.apache.spark.SparkContext-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <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, |
| String path)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../org/apache/spark/mllib/util/Saveable.html#save-org.apache.spark.SparkContext-java.lang.String-">Saveable</a></code></span></div> |
| <div class="block">Save this model to the given path. |
| <p> |
| This saves: |
| - human-readable (JSON) model metadata to path/metadata/ |
| - Parquet formatted data to path/data/ |
| <p> |
| The model may be loaded using <code>Loader.load</code>. |
| <p></div> |
| <dl> |
| <dt><span class="paramLabel">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> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/spark/mllib/clustering/BisectingKMeansModel.SaveLoadV3_0$.html" title="class in org.apache.spark.mllib.clustering"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/spark/mllib/clustering/EMLDAOptimizer.html" title="class in org.apache.spark.mllib.clustering"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/spark/mllib/clustering/DistributedLDAModel.html" target="_top">Frames</a></li> |
| <li><a href="DistributedLDAModel.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>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </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> |