wrap.multinomial {Riemann} | R Documentation |
Prepare Data on Multinomial Manifold
Description
Multinomial manifold is referred to the data that is nonnegative and sums to 1.
Also known as probability simplex or positive orthant, we denote simplex
in
by
in that data are positive 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 , it returns errors.
Usage
wrap.multinomial(input)
Arguments
input |
data vectors to be wrapped as
|
Value
a named riemdata
S3 object containing
- data
a list of
matrices in
.
- size
dimension of the ambient space.
- name
name of the manifold of interests, "multinomial"
Examples
#-------------------------------------------------------------------
# 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)
[Package Riemann version 0.1.4 Index]