geometric_kernels.utils.product =============================== .. py:module:: geometric_kernels.utils.product .. autoapi-nested-parse:: Utilities for dealing with product spaces and product kernels. Module Contents --------------- .. py:function:: make_product(xs) Embed a list of elements of factor spaces into the product space. Assumes that elements are batched along the first dimension. :param xs: List of the batches of elements, each of the shape [N, ], where `` is the shape of the elements of the respective space. :return: An [N, D]-shaped array, a batch of product space elements, where `D` is the sum, over all factor spaces, of `prod()`. .. py:function:: params_to_params_list(params) Takes a dictionary of parameters of a product kernel and returns a list of dictionaries of parameters for the factor kernels. :param params: Parameters of the product kernel. .. py:function:: project_product(x, dimension_indices, element_shapes) Project an element of the product space onto each factor. Assumes that elements are batched along the first dimension. :param x: An [N, D]-shaped array, a batch of N product space elements. :param dimension_indices: Determines how a product space element `x` is to be mapped to inputs `xi` of the factor kernels. `xi` are assumed to be equal to `x[dimension_indices[i]]`, possibly up to a reshape. Such a reshape might be necessary to accommodate the spaces whose elements are matrices rather than vectors, as determined by `element_shapes`. :param element_shapes: Shapes of the elements in each factor. :return: A list of the batches of elements `xi` in factor spaces, each of the shape `[N, *element_shapes[i]]`.