make_Z_discrete: Make initial Z matrix from initial assignment of observations...

View source: R/make_Z_discrete.r

make_Z_discreteR Documentation

Make initial Z matrix from initial assignment of observations to clusters

Description

Z is an n by numClusters matrix of non-negative numbers whose rows sum to 1. The ij^th element z_ij is a probability that observation i belongs to cluster j. Rather than begin from an initial assignment Multimix allows for a weighted assignment accross several clusters.

Usage

make_Z_discrete(d)

Arguments

d

integer

Details

This function yields a 0/1 valued matrix.

Value

a matrix whose entries are non-negative, and whose entries sum to 1.

Author(s)

Murray Jorgensen

Examples

stage = scan(file = system.file('extdata', 'Stage.txt', package = 'multimix'))
stage = stage - 2
Z = make_Z_discrete(stage)

multimix documentation built on Jan. 22, 2023, 1:13 a.m.