Description Usage Arguments See Also Examples

View source: R/weight_matrix2states.R

Converts a probabilistic cluster assignment to a unique cluster assignment using the

`'argmax'`

rule:state of row

*i*is assigned as the position of the maximum in that row (ties are broken at random).`'sample'`

rulestate of row

*i*is sampled from the discrete distribution where probabilities equal the weight vector in row*i*

1 | ```
weight_matrix2states(weight.matrix, rule = c("argmax", "sample"))
``` |

`weight.matrix` |
an |

`rule` |
how do we choose the state given the weight
matrix. |

1 2 3 4 5 6 7 8 | ```
WW <- matrix(runif(12), ncol = 3)
WW <- normalize(WW)
WW
weight_matrix2states(WW)
weight_matrix2states(WW, "sample")
# another 'sample' is in general different from previous conversion unless WW is
# a 0/1 matrix
weight_matrix2states(WW, "sample")
``` |

LICORS documentation built on May 29, 2017, 1:02 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.