nemos.observation_models.Observations.log_likelihood#

abstractmethod Observations.log_likelihood(y, predicted_rate, scale=1.0, aggregate_sample_scores=<function mean>)[source]#

Compute the observation model log-likelihood.

This computes the log-likelihood of the predicted rates for the observed neural activity including the normalization constant

Parameters:
  • y (Array) – The target activity to compare against. Shape (n_time_bins, ), or (n_time_bins, n_neurons).

  • predicted_rate (Array) – The predicted rate of the current model. Shape (n_time_bins, ), or (n_time_bins, n_neurons).

  • scale (Union[float, Array]) – The scale parameter of the model

  • aggregate_sample_scores (Callable) – Function that aggregates the log-likelihood of each sample.

Returns:

The log-likehood. Shape (1,).