summaryrefslogtreecommitdiff
path: root/site/docs/1.5.0/api/java/org/apache/spark/mllib/clustering/DistributedLDAModel.html
blob: 11149bd4fd7a594deb2e4f4523f5362f04d348de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
<!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:09 PDT 2015 -->
<title>DistributedLDAModel</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="DistributedLDAModel";
    }
//-->
</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/clustering/EMLDAOptimizer.html" title="class in org.apache.spark.mllib.clustering"><span class="strong">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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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>java.lang.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="strong">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">:: Experimental ::
 <p>
 Distributed LDA model.
 This model stores the inferred topics, the full training dataset, and the topic distributions.
 When computing topics for new documents, it may give more accurate answers
 than the <a href="../../../../../org/apache/spark/mllib/clustering/LocalLDAModel.html" title="class in org.apache.spark.mllib.clustering"><code>LocalLDAModel</code></a>.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</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>scala.Tuple2&lt;int[],double[]&gt;[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#describeTopics(int)">describeTopics</a></strong>(int&nbsp;maxTermsPerTopic)</code>
<div class="block">Return the topics described by weighted terms.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#docConcentration()">docConcentration</a></strong>()</code>
<div class="block">Concentration parameter (commonly named "alpha") for the prior placed on documents'
 distributions over topics ("theta").</div>
</td>
</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/clustering/DistributedLDAModel.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>protected double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#gammaShape()">gammaShape</a></strong>()</code>
<div class="block">Shape parameter for random initialization of variational parameter gamma.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>breeze.linalg.DenseVector&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#globalTopicTotals()">globalTopicTotals</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a>&lt;breeze.linalg.DenseVector&lt;java.lang.Object&gt;,java.lang.Object&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#graph()">graph</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#iterationTimes()">iterationTimes</a></strong>()</code>&nbsp;</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>&lt;scala.Tuple3&lt;java.lang.Long,int[],int[]&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#javaTopicAssignments()">javaTopicAssignments</a></strong>()</code>
<div class="block">Java-friendly version of <code>topicAssignments</code></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/spark/api/java/JavaPairRDD.html" title="class in org.apache.spark.api.java">JavaPairRDD</a>&lt;java.lang.Long,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#javaTopicDistributions()">javaTopicDistributions</a></strong>()</code>
<div class="block">Java-friendly version of <code>topicDistributions</code></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>&lt;scala.Tuple3&lt;java.lang.Long,int[],double[]&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#javaTopTopicsPerDocument(int)">javaTopTopicsPerDocument</a></strong>(int&nbsp;k)</code>
<div class="block">Java-friendly version of <code>topTopicsPerDocument</code></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#k()">k</a></strong>()</code>
<div class="block">Number of topics</div>
</td>
</tr>
<tr class="rowColor">
<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><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.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>&nbsp;sc,
    java.lang.String&nbsp;path)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#logLikelihood()">logLikelihood</a></strong>()</code>
<div class="block">Log likelihood of the observed tokens in the training set,
 given the current parameter estimates:
  log P(docs | topics, topic distributions for docs, alpha, eta)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#logPrior()">logPrior</a></strong>()</code>
<div class="block">Log probability of the current parameter estimate:
 log P(topics, topic distributions for docs | alpha, eta)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.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>&nbsp;sc,
    java.lang.String&nbsp;path)</code>
<div class="block">Java-friendly version of <code>topicDistributions</code></div>
</td>
</tr>
<tr class="rowColor">
<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><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#toLocal()">toLocal</a></strong>()</code>
<div class="block">Convert model to a local model.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>scala.Tuple2&lt;long[],double[]&gt;[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topDocumentsPerTopic(int)">topDocumentsPerTopic</a></strong>(int&nbsp;maxDocumentsPerTopic)</code>
<div class="block">Return the top documents for each topic</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>&lt;scala.Tuple3&lt;java.lang.Object,int[],int[]&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicAssignments()">topicAssignments</a></strong>()</code>
<div class="block">Return the top topic for each (doc, term) pair.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicConcentration()">topicConcentration</a></strong>()</code>
<div class="block">Concentration parameter (commonly named "beta" or "eta") for the prior placed on topics'
 distributions over terms.</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>&lt;scala.Tuple2&lt;java.lang.Object,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicDistributions()">topicDistributions</a></strong>()</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 class="altColor">
<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><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topicsMatrix()">topicsMatrix</a></strong>()</code>
<div class="block">Inferred topics, where each topic is represented by a distribution over terms.</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>&lt;scala.Tuple3&lt;java.lang.Object,int[],double[]&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#topTopicsPerDocument(int)">topTopicsPerDocument</a></strong>(int&nbsp;k)</code>
<div class="block">For each document, return the top k weighted topics for that document and their weights.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html#vocabSize()">vocabSize</a></strong>()</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&nbsp;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_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, 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&nbsp;<a href="../../../../../org/apache/spark/mllib/clustering/DistributedLDAModel.html" title="class in org.apache.spark.mllib.clustering">DistributedLDAModel</a>&nbsp;load(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a>&nbsp;sc,
                       java.lang.String&nbsp;path)</pre>
</li>
</ul>
<a name="graph()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>graph</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a>&lt;breeze.linalg.DenseVector&lt;java.lang.Object&gt;,java.lang.Object&gt;&nbsp;graph()</pre>
</li>
</ul>
<a name="globalTopicTotals()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>globalTopicTotals</h4>
<pre>public&nbsp;breeze.linalg.DenseVector&lt;java.lang.Object&gt;&nbsp;globalTopicTotals()</pre>
</li>
</ul>
<a name="k()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>k</h4>
<pre>public&nbsp;int&nbsp;k()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#k()">LDAModel</a></code></strong></div>
<div class="block">Number of topics</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#k()">k</a></code>&nbsp;in class&nbsp;<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&nbsp;int&nbsp;vocabSize()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#vocabSize()">LDAModel</a></code></strong></div>
<div class="block">Vocabulary size (number of terms or terms in the vocabulary)</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#vocabSize()">vocabSize</a></code>&nbsp;in class&nbsp;<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&nbsp;<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&nbsp;docConcentration()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#docConcentration()">LDAModel</a></code></strong></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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#docConcentration()">docConcentration</a></code>&nbsp;in class&nbsp;<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="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="topicConcentration()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>topicConcentration</h4>
<pre>public&nbsp;double&nbsp;topicConcentration()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicConcentration()">LDAModel</a></code></strong></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>
 Note: The topics' distributions over terms are called "beta" in the original LDA paper
 by Blei et al., but are called "phi" in many later papers such as Asuncion et al., 2009.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicConcentration()">topicConcentration</a></code>&nbsp;in class&nbsp;<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="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="iterationTimes()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterationTimes</h4>
<pre>public&nbsp;double[]&nbsp;iterationTimes()</pre>
</li>
</ul>
<a name="gammaShape()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>gammaShape</h4>
<pre>protected&nbsp;double&nbsp;gammaShape()</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#gammaShape()">LDAModel</a></code></strong></div>
<div class="block">Shape parameter for random initialization of variational parameter gamma.
 Used for variational inference for perplexity and other test-time computations.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#gammaShape()">gammaShape</a></code>&nbsp;in class&nbsp;<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="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="toLocal()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toLocal</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/spark/mllib/clustering/LocalLDAModel.html" title="class in org.apache.spark.mllib.clustering">LocalLDAModel</a>&nbsp;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="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="topicsMatrix()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>topicsMatrix</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/spark/mllib/linalg/Matrix.html" title="interface in org.apache.spark.mllib.linalg">Matrix</a>&nbsp;topicsMatrix()</pre>
<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.
 <p>
 WARNING: This matrix is collected from an RDD. Beware memory usage when vocabSize, k are large.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#topicsMatrix()">topicsMatrix</a></code>&nbsp;in class&nbsp;<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="strong">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&nbsp;scala.Tuple2&lt;int[],double[]&gt;[]&nbsp;describeTopics(int&nbsp;maxTermsPerTopic)</pre>
<div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#describeTopics(int)">LDAModel</a></code></strong></div>
<div class="block">Return the topics described by weighted terms.
 <p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/spark/mllib/clustering/LDAModel.html#describeTopics(int)">describeTopics</a></code>&nbsp;in class&nbsp;<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="strong">Parameters:</span></dt><dd><code>maxTermsPerTopic</code> - Maximum number of terms to collect for each topic.</dd>
<dt><span class="strong">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&nbsp;scala.Tuple2&lt;long[],double[]&gt;[]&nbsp;topDocumentsPerTopic(int&nbsp;maxDocumentsPerTopic)</pre>
<div class="block">Return the top documents for each topic
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>maxDocumentsPerTopic</code> - Maximum number of documents to collect for each topic.</dd>
<dt><span class="strong">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&nbsp;<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;scala.Tuple3&lt;java.lang.Object,int[],int[]&gt;&gt;&nbsp;topicAssignments()</pre>
<div class="block">Return the top topic for each (doc, term) pair.  I.e., for each document, what is the most
 likely topic generating each term?
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>RDD of (doc ID, assignment of top topic index for each term),
         where the assignment is specified via a pair of zippable arrays
         (term indices, topic indices).  Note that terms will be omitted if not present in
         the document.</dd></dl>
</li>
</ul>
<a name="javaTopicAssignments()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>javaTopicAssignments</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a>&lt;scala.Tuple3&lt;java.lang.Long,int[],int[]&gt;&gt;&nbsp;javaTopicAssignments()</pre>
<div class="block">Java-friendly version of <code>topicAssignments</code></div>
</li>
</ul>
<a name="logLikelihood()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logLikelihood</h4>
<pre>public&nbsp;double&nbsp;logLikelihood()</pre>
<div class="block">Log likelihood of the observed tokens in the training set,
 given the current parameter estimates:
  log P(docs | topics, topic distributions for docs, alpha, eta)
 <p>
 Note:
  - This excludes the prior; for that, use <code>logPrior</code>.
  - Even with <code>logPrior</code>, this is NOT the same as the data log likelihood given the
    hyperparameters.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="logPrior()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logPrior</h4>
<pre>public&nbsp;double&nbsp;logPrior()</pre>
<div class="block">Log probability of the current parameter estimate:
 log P(topics, topic distributions for docs | alpha, eta)</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="topicDistributions()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>topicDistributions</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;scala.Tuple2&lt;java.lang.Object,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&gt;&gt;&nbsp;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="strong">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&nbsp;<a href="../../../../../org/apache/spark/api/java/JavaPairRDD.html" title="class in org.apache.spark.api.java">JavaPairRDD</a>&lt;java.lang.Long,<a href="../../../../../org/apache/spark/mllib/linalg/Vector.html" title="interface in org.apache.spark.mllib.linalg">Vector</a>&gt;&nbsp;javaTopicDistributions()</pre>
<div class="block">Java-friendly version of <code>topicDistributions</code></div>
<dl><dt><span class="strong">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&nbsp;<a href="../../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a>&lt;scala.Tuple3&lt;java.lang.Object,int[],double[]&gt;&gt;&nbsp;topTopicsPerDocument(int&nbsp;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="strong">Parameters:</span></dt><dd><code>k</code> - (undocumented)</dd>
<dt><span class="strong">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&nbsp;<a href="../../../../../org/apache/spark/api/java/JavaRDD.html" title="class in org.apache.spark.api.java">JavaRDD</a>&lt;scala.Tuple3&lt;java.lang.Long,int[],double[]&gt;&gt;&nbsp;javaTopTopicsPerDocument(int&nbsp;k)</pre>
<div class="block">Java-friendly version of <code>topTopicsPerDocument</code></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>k</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="formatVersion()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>formatVersion</h4>
<pre>protected&nbsp;java.lang.String&nbsp;formatVersion()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<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>
</li>
</ul>
<a name="save(org.apache.spark.SparkContext, java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>save</h4>
<pre>public&nbsp;void&nbsp;save(<a href="../../../../../org/apache/spark/SparkContext.html" title="class in org.apache.spark">SparkContext</a>&nbsp;sc,
        java.lang.String&nbsp;path)</pre>
<div class="block">Java-friendly version of <code>topicDistributions</code></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sc</code> - (undocumented)</dd><dd><code>path</code> - (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/clustering/EMLDAOptimizer.html" title="class in org.apache.spark.mllib.clustering"><span class="strong">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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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>