class_docstr: Observation model for beat tracking with a HMM.
  
  Parameters
  ----------
  state_space : :class:`BeatStateSpace` instance
      BeatStateSpace instance.
  observation_lambda : int
      Split one beat period into `observation_lambda` parts, the first
      representing beat states and the remaining non-beat states.
  
  References
  ----------
  .. [1] Sebastian Böck, Florian Krebs and Gerhard Widmer,
         "A Multi-Model Approach to Beat Tracking Considering Heterogeneous
         Music Styles",
         Proceedings of the 15th International Society for Music Information
         Retrieval Conference (ISMIR), 2014.
class_docstr_tok: ["Observation","model","for","beat","tracking","with","a","HMM",".","Parameters","--","--","--","--","--","state_space",":",":","class",":","`","BeatStateSpace","`","instance","BeatStateSpace","instance",".","observation_lambda",":","int","Split","one","beat","period","into","`","observation_lambda","`","parts",",","the","first","representing","beat","states","and","the","remaining","non-beat","states",".","References","--","--","--","--","--","..","[","1","]","Sebastian","B\u00f6ck",",","Florian","Krebs","and","Gerhard","Widmer",",","``","A","Multi-Model","Approach","to","Beat","Tracking","Considering","Heterogeneous","Music","Styles","''",",","Proceedings","of","the","15th","International","Society","for","Music","Information","Retrieval","Conference","(","ISMIR",")",",","2014","."]
docstr: Compute the log densities of the observations.
  
  Parameters
  ----------
  observations : numpy array, shape (N, )
      Observations (i.e. 1D beat activations of the RNN).
  
  Returns
  -------
  numpy array, shape (N, 2)
      Log densities of the observations, the columns represent the
      observation log probability densities for no-beats and beats.
docstr_tok: ["Compute","the","log","densities","of","the","observations",".","Parameters","--","--","--","--","--","observations",":","numpy","array",",","shape","(","N",",",")","Observations","(","i.e",".","1D","beat","activations","of","the","RNN",")",".","Returns","--","--","--","-","numpy","array",",","shape","(","N",",","2",")","Log","densities","of","the","observations",",","the","columns","represent","the","observation","log","probability","densities","for","no-beats","and","beats","."]
code: def log_densities(self, observations):
      """
      Compute the log densities of the observations.
  
      Parameters
      ----------
      observations : numpy array, shape (N, )
          Observations (i.e. 1D beat activations of the RNN).
  
      Returns
      -------
      numpy array, shape (N, 2)
          Log densities of the observations, the columns represent the
          observation log probability densities for no-beats and beats.
  
      """
      # cast as 1-dimensional array
      # Note: in online mode, observations are just float values
      observations = np.array(
          observations, copy=False, subok=True, ndmin=1
      )
      # init densities
      log_densities = np.empty((len(observations), 2), dtype=float)
      # Note: it's faster to call np.log 2 times instead of once on the
      #       whole 2d array
      log_densities[:, 0] = np.log(
          (1.0 - observations) / (self.observation_lambda - 1)
      )
      log_densities[:, 1] = np.log(observations)
      # return the densities
      return log_densities
  
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from madmom.ml.hmm import ObservationModel, TransitionModel
label_desc: Use image node_id 2 for calling the RNNBeatTrackingObservationModel obj's underlying member method code with example usage: obj.log_densities(observations) and returns: log_densities