gammy.utils

gammy.utils

Miscellaneous utilities

Functions

compose(*funcs)

Function composition

compose2(f, g)

Compose two functions

concat_gaussians(gaussians)

Concatenate means and covariances to one Gaussian

curryish(f)

Lifted partial application

decompose_covariance(H[, energy])

Most important eigenvectors of a symmetric positive-definite square matrix

exp_sine_squared(x1, x2[, corrlen, sigma, …])

Exponential sine squared kernel function

exp_squared(x1, x2[, corrlen, sigma])

Exponential squared kernel function

extend_spline_grid(grid, order)

Grid extension for higher order splines

extract_diag_blocks(x, y)

Extract diagonal blocks from a matrix according to a reference

gen_spline_args_from_grid_ext(grid_ext, …)

Spline arguments generator from extended grid

interp_arrays1d(v, grid, **kwargs)

Create list of interpolators from a given array

jsonify(node)

Turn a expfamily node into a JSON serializable dict

lift(func)

Transforms a function into an operator

listfilter(*args, **kwargs)

Filter for lists with partial evaluation

listmap(*args, **kwargs)

Map for lists with partial evaluation

ornstein_uhlenbeck(x1, x2[, corrlen, sigma])

Ornstein-Uhlenbeck kernel function

peaks(x, y)

The MATLAB function

pipe(arg, *funcs)

Piping an object through functions

rational_quadratic(x1, x2[, corrlen, sigma, …])

Rational quadratic kernel function

rlift(func)

Lift from right

set_from_json(raw, node)

Set BayesPy node attributes from JSON

solve_covariance(u)

Solve covariance matrix from moments

solve_precision(*args, **kwargs)

Solve precision matrix from moments

squared_dist(x1, x2)

Squared distance matrix for column array of N-dimensional points

tuplefilter(*args, **kwargs)

Filter for tuples with partial evaluation

tuplemap(*args, **kwargs)

Map for tuples with partial evaluation

unflatten(x, y)

Unflatten according to a reference

white_noise(n_dims[, sigma])

White noise kernel function

write_to_hdf5(group, data, name)

Add data to HDF5 handler