EVOLUTION-MANAGER
Edit File: tidy.Mclust.html
<!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: Tidy a(n) Mclust object</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 tidy.Mclust {broom}"><tr><td>tidy.Mclust {broom}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Tidy a(n) Mclust object</h2> <h3>Description</h3> <p>Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies across models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return. </p> <h3>Usage</h3> <pre> ## S3 method for class 'Mclust' tidy(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>An <code>Mclust</code> object return from <code><a href="../../mclust/html/Mclust.html">mclust::Mclust()</a></code>.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments. Not used. Needed to match generic signature only. <strong>Cautionary note:</strong> Misspelled arguments will be absorbed in <code>...</code>, where they will be ignored. If the misspelled argument has a default value, the default value will be used. For example, if you pass <code>conf.lvel = 0.9</code>, all computation will proceed using <code>conf.level = 0.95</code>. Additionally, if you pass <code>newdata = my_tibble</code> to an <code><a href="reexports.html">augment()</a></code> method that does not accept a <code>newdata</code> argument, it will use the default value for the <code>data</code> argument.</p> </td></tr> </table> <h3>Value</h3> <p>A <code><a href="../../tibble/html/tibble.html">tibble::tibble()</a></code> with columns: </p> <table summary="R valueblock"> <tr valign="top"><td><code>proportion</code></td> <td> <p>The mixing proportion of each component</p> </td></tr> <tr valign="top"><td><code>size</code></td> <td> <p>Number of points assigned to cluster.</p> </td></tr> <tr valign="top"><td><code>mean</code></td> <td> <p>The mean for each component. In case of 2+ dimensional models, a column with the mean is added for each dimension. NA for noise component</p> </td></tr> <tr valign="top"><td><code>variance</code></td> <td> <p>In case of one-dimensional and spherical models, the variance for each component, omitted otherwise. NA for noise component</p> </td></tr> <tr valign="top"><td><code>component</code></td> <td> <p>Cluster id as a factor.</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="reexports.html">tidy()</a></code>, <code><a href="../../mclust/html/Mclust.html">mclust::Mclust()</a></code> </p> <p>Other mclust tidiers: <code><a href="augment.Mclust.html">augment.Mclust</a>()</code> </p> <h3>Examples</h3> <pre> library(dplyr) library(mclust) set.seed(27) centers <- tibble::tibble( cluster = factor(1:3), num_points = c(100, 150, 50), # number points in each cluster x1 = c(5, 0, -3), # x1 coordinate of cluster center x2 = c(-1, 1, -2) # x2 coordinate of cluster center ) points <- centers %>% mutate( x1 = purrr::map2(num_points, x1, rnorm), x2 = purrr::map2(num_points, x2, rnorm) ) %>% dplyr::select(-num_points, -cluster) %>% tidyr::unnest(c(x1, x2)) m <- mclust::Mclust(points) tidy(m) augment(m, points) glance(m) </pre> <hr /><div style="text-align: center;">[Package <em>broom</em> version 0.7.0 <a href="00Index.html">Index</a>]</div> </body></html>