<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Obtain Total Elements for Every Clusters</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for get.N.CLASS"><tr><td>get.N.CLASS</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Obtain Total Elements for Every Clusters</h2>

<h3>Description</h3>

<p>This function will collect the total elements for every clusters
from all processors that the all reduced calls with the sum operation
will be performed.
</p>
<p>The <code>get.CLASS</code> returns class ids.
</p>


<h3>Usage</h3>

<pre>
  get.N.CLASS(K)

  get.CLASS(PARAM)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>K</code></td>
<td>
<p>the total number of clusters.</p>
</td></tr>
<tr valign="top"><td><code>PARAM</code></td>
<td>
<p>a set of parameters.</p>
</td></tr>
</table>


<h3>Details</h3>

<p>The final results are distributed in all processors including the total
elements for each cluster. The global variable <code>CLASS.spmd</code>
stores the identification for each observation on each processors.
This function will first summary <code>CLASS.spmd</code>
in <code>K</code> categories,
then use the all reduce function with the sum operation to add the numbers
by clusters.
The <code>COMM.RANK</code> 0 will be used to take care the printing.
</p>


<h3>Value</h3>

<p><code>K</code> numbers will be returned that are the total elements for each
cluster. Sum of these <code>K</code> numbers should be equal to <code>N</code> the
total number of observations.
</p>


<h3>Author(s)</h3>

<p>Wei-Chen Chen <a href="mailto:wccsnow@gmail.com">wccsnow@gmail.com</a> and George Ostrouchov.
</p>


<h3>References</h3>

<p>Programming with Big Data in R Website:
<a href="https://pbdr.org/">https://pbdr.org/</a>
</p>


<h3>See Also</h3>

<p><code>em.step</code>,
<code>aecm.step</code>,
<code>apecm.step</code>, <br />
<code>apecma.step</code>,
<code>kmeans.step</code>. <br />
</p>


<h3>Examples</h3>

<pre>
## Not run: 
# Examples can be found in the help pages of em.step(),
# aecm.step(), apecm.step(), apecma.step(), and kmeans.step().

## End(Not run)
</pre>


</body></html>
