### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.9 Reference Guide (DRAFT) »
- Maximum entropy models (`scipy.maxentropy`) »

# scipy.maxentropy.maxentutils

Utility routines for the maximum entropy module.

Most of them are either Python replacements for the corresponding Fortran routines or wrappers around matrices to allow the maxent module to manipulate ndarrays, scipy sparse matrices, and PySparse matrices a common interface.

Perhaps the logsumexp() function belongs under the utils/ branch where other modules can access it more easily.

Copyright: Ed Schofield, 2003-2006 License: BSD-style (see LICENSE.txt in main source directory)

Functions

`arrayexp`(x) | Returns the elementwise antilog of the real array x.
`arrayexpcomplex`(x) | Returns the elementwise antilog of the vector x.
`asarray`(a[, dtype, order]) | Convert the input to an array.
`columnmeans`(A) | This is a wrapper for general dense or sparse dot products.
`columnvariances`(A) | This is a wrapper for general dense or sparse dot products.
`densefeaturematrix`(f, sample) | Returns an (m x n) dense array of non-zero evaluations of the
`densefeatures`(f, x) | Returns a dense array of non-zero evaluations of the functions fi
`dotprod`(u, v) | This is a wrapper around general dense or sparse dot products.
`empty`(shape[, dtype, order]) | Return a new array of given shape and type, without initializing entries.
`flatten`(a) | Flattens the sparse matrix or dense array/matrix ‘a’ into a
`innerprod`(A, v) | This is a wrapper around general dense or sparse dot products.
`innerprodtranspose`(A, v) | This is a wrapper around general dense or sparse dot products.
`logsumexp`(a) | Compute the log of the sum of exponentials log(e^{a_1}+...e^{a_n})
`logsumexp_naive`(values) | For testing logsumexp().
`robustlog`(x) | Returns log(x) if x > 0, the complex log cmath.log(x) if x < 0,
`rowmeans`(A) | This is a wrapper for general dense or sparse dot products.
`sample_wr`(population, k) | Chooses k random elements (with replacement) from a population.
`sparsefeaturematrix`(f, sample[, format]) | Returns an (m x n) sparse matrix of non-zero evaluations of the scalar or vector functions f_1,...,f_m in the list f at the points x_1,...,x_n in the sequence ‘sample’.
`sparsefeatures`(f, x[, format]) | Returns an Mx1 sparse matrix of non-zero evaluations of the

Classes

`ndarray` | An array object represents a multidimensional, homogeneous array of fixed-size items.

Exceptions

`DivergenceError`(message) | Exception raised if the entropy dual has no finite minimum.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.9 Reference Guide (DRAFT) »
- Maximum entropy models (`scipy.maxentropy`) »