| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html><head><title>R: Get fitted result from a k-means model</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link rel="stylesheet" type="text/css" href="R.css"> |
| |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css"> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/r.min.js"></script> |
| <script>hljs.initHighlightingOnLoad();</script> |
| </head><body> |
| |
| <table width="100%" summary="page for fitted {SparkR}"><tr><td>fitted {SparkR}</td><td align="right">R Documentation</td></tr></table> |
| |
| <h2>Get fitted result from a k-means model</h2> |
| |
| <h3>Description</h3> |
| |
| <p>Get fitted result from a k-means model, similarly to R's fitted(). |
| Note: A saved-loaded model does not support this method. |
| </p> |
| |
| |
| <h3>Usage</h3> |
| |
| <pre> |
| fitted(object, ...) |
| |
| ## S4 method for signature 'KMeansModel' |
| fitted(object, method = c("centers", "classes")) |
| </pre> |
| |
| |
| <h3>Arguments</h3> |
| |
| <table summary="R argblock"> |
| <tr valign="top"><td><code>object</code></td> |
| <td> |
| <p>a fitted k-means model.</p> |
| </td></tr> |
| <tr valign="top"><td><code>...</code></td> |
| <td> |
| <p>additional argument(s) passed to the method.</p> |
| </td></tr> |
| <tr valign="top"><td><code>method</code></td> |
| <td> |
| <p>type of fitted results, <code>"centers"</code> for cluster centers |
| or <code>"classes"</code> for assigned classes.</p> |
| </td></tr> |
| </table> |
| |
| |
| <h3>Value</h3> |
| |
| <p><code>fitted</code> returns a SparkDataFrame containing fitted values. |
| </p> |
| |
| |
| <h3>Note</h3> |
| |
| <p>fitted since 2.0.0 |
| </p> |
| |
| |
| <h3>Examples</h3> |
| |
| <pre><code class="r">## Not run: |
| ##D model <- spark.kmeans(trainingData, ~ ., 2) |
| ##D fitted.model <- fitted(model) |
| ##D showDF(fitted.model) |
| ## End(Not run) |
| </code></pre> |
| |
| |
| <hr><div align="center">[Package <em>SparkR</em> version 2.1.1 <a href="00Index.html">Index</a>]</div> |
| </body></html> |