skbio.stats.composition.
power
(x, a)[source]¶State: Experimental as of 0.4.0. Performs the power operation.
This operation is defined as follows
\(C[x]\) is the closure operation defined as
for some \(D\) dimensional real vector \(x\) and \(D\) is the number of components for every composition.
x (array_like, float) – a matrix of proportions where rows = compositions and columns = components
a (float) – a scalar float
A matrix of proportions where all of the values are nonzero and each composition (row) adds up to 1
numpy.ndarray, np.float64
Examples
>>> import numpy as np
>>> from skbio.stats.composition import power
>>> x = np.array([.1,.3,.4, .2])
>>> power(x, .1)
array([ 0.23059566, 0.25737316, 0.26488486, 0.24714631])