Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

states2weight_matrix

Converts label vector to 0/1 mixture weight matrix


Description

Converts unique cluster assignment stored in a length N label vector into a N \times K Boolean matrix of mixture weights.

Usage

states2weight_matrix(states, num.states.total = NULL)

Arguments

states

a vector of length N with the state labels

num.states.total

total number of states. If NULL, then the maximum of states is chosen

See Also

Examples

ss <- sample.int(5, 10, replace = TRUE)
WW <- states2weight_matrix(ss)

image2(WW, col = "RdBu", xlab = "States", ylab = "Samples", axes = FALSE)

LICORS

Light Cone Reconstruction of States - Predictive State Estimation From Spatio-Temporal Data

v0.2.0
GPL-2
Authors
Georg M. Goerg <gmg@stat.cmu.edu>
Initial release
2013-11-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.