maxent_toolbox

Maximum Entropy toolbox for MATLAB

View the Project on GitHub orimaoz/maxent_toolbox

maxent.getEmpiricalMarginals

Description

Returns the empirical marginals of a maximum entropy model for a set of samples. The function accepts an array of samples over which the marginals are to be computed, and a model which defines the observables to be computed.

Usage

marginals = maxent.getEmpiricalMarginals(samples,model)

Arguments

Mandatory arguments

  • samples - Set of samples to train the model on, in the format (ncells x nsamples).
  • model - Maximum entropy model as returned by the createModel function. It does not matter whether or not this model has been trained because only the its moment-generating functions are used in order to compute the marginals

Output

  • marginals - an (1 x <# of marginals>) vector of marginals.

Example usage

% initialize a maximum entropy model
model = maxent.createModel(30,'ising');   

% The observables of Ising model are firing rates and correlations, so getting the empirical marginals of this
% set of samples will actually return the firing rates and correlations of the population activity
marginals = maxent.getEmpiricalMarginals(samples,model);