Description Usage Arguments Details Examples
get_cluster_labels
returns a factor vector of cluster labels.
get_cluster_centroids
returns a k1
-by-k2
matrix with the
estimated centroid of the k1
-th row cluster and the k2
-th
column cluster.
get_clustered_data
returns a matrix (with the same dimensions and names
as the original data), but with the values for each row replaced by
its "estimated" value (i.e., the appropriate cluster centroid).
1 2 3 4 5 6 7 8 | ## S3 method for class 'CBASS'
get_cluster_labels(x, ..., percent, k.row, k.col, type = c("row", "col"))
## S3 method for class 'CBASS'
get_cluster_centroids(x, ..., percent, k.row, k.col, refit = TRUE)
## S3 method for class 'CBASS'
get_clustered_data(x, ..., percent, k.row, k.col, refit = TRUE)
|
x |
An object of class |
... |
Additional arguments - if any are provided, an error is signalled. |
percent |
A number between 0 and 1, giving the regularization level (as a fraction of the final regularization level used) at which to get cluster labels. |
k.row |
The desired number of row clusters |
k.col |
The desired number of column clusters |
type |
For |
refit |
Should "naive" centroids ( |
get_clustered_data
returns centroids on the original scale of
the data, independent of any pre-processing flags passed to CBASS
.
Note that exactly one of percent
, k.row
, k.col
must be supplied and that that k.row
(if suppplied) will be
used even if type = "col"
and vice versa.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | cbass_fit <- CBASS(presidential_speech)
# Get row clustering results from 50% along the path
get_cluster_labels(cbass_fit, percent = 0.5)
# Get column clustering corresponding to the 3 cluster solution
get_cluster_labels(cbass_fit, k.col = 3, type = "col")
# Get row clustering corresponding to the 3 column clusters
get_cluster_labels(cbass_fit, k.col = 3, type = "row")
# Get cluster centroids partially down the path
get_cluster_centroids(cbass_fit, percent = 0.5)
# Get clustered data
image(get_clustered_data(cbass_fit, k.row = 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.