View source: R/wrap07multinomial.R
wrap.multinomial | R Documentation |
Multinomial manifold is referred to the data that is nonnegative and sums to 1. Also known as probability simplex or positive orthant, we denote (p-1) simplex in \mathbf{R}^p by
Δ^{p-1} = \lbrace x \in \mathbf{R}^p~\vert~ ∑_{i=1}^p x_i = 1, x_i > 0 \rbrace
in that data are positive L_1 unit-norm vectors.
In wrap.multinomial
, normalization is applied when each data point is not on the simplex,
but if vectors contain values not in (0,1), it returns errors.
wrap.multinomial(input)
input |
data vectors to be wrapped as
|
a named riemdata
S3 object containing
a list of (p\times 1) matrices in Δ^{p-1}.
dimension of the ambient space.
name of the manifold of interests, "multinomial"
#------------------------------------------------------------------- # Checker for Two Types of Inputs #------------------------------------------------------------------- ## DATA GENERATION d1 = array(0,c(5,3)) d2 = list() for (i in 1:5){ single = abs(stats::rnorm(3)) d1[i,] = single d2[[i]] = single } ## RUN test1 = wrap.multinomial(d1) test2 = wrap.multinomial(d2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.