docstr: Calculate the log posterior probabilities for each example.
  
  This method calculates the log posterior probabilities for each example
  under each component of the model after factoring in the prior 
  probability and normalizing across all the components.
  
  
  Parameters
  ----------
  X: list, tuple, numpy.ndarray, torch.Tensor, shape=(-1, self.d)
          A set of examples to summarize.
  
  priors: list, numpy.ndarray, torch.Tensor, shape=(-1, self.k)
          Prior probabilities of assigning each symbol to each node. If not
          provided, do not include in the calculations (conceptually
          equivalent to a uniform probability, but without scaling the
          probabilities). This can be used to assign labels to observatons
          by setting one of the probabilities for an observation to 1.0.
          Note that this can be used to assign hard labels, but does not
          have the same semantics for soft labels, in that it only
          influences the initial estimate of an observation being generated
          by a component, not gives a target. Default is None.
  
  
  Returns
  -------
  y: torch.Tensor, shape=(-1, self.k)
          The log posterior probabilities for each example under each 
          component.
docstr_tok: ["Calculate","the","log","posterior","probabilities","for","each","example",".","This","method","calculates","the","log","posterior","probabilities","for","each","example","under","each","component","of","the","model","after","factoring","in","the","prior","probability","and","normalizing","across","all","the","components",".","Parameters","--","--","--","--","--","X",":","list",",","tuple",",","numpy.ndarray",",","torch.Tensor",",","shape=","(","-1",",","self.d",")","A","set","of","examples","to","summarize",".","priors",":","list",",","numpy.ndarray",",","torch.Tensor",",","shape=","(","-1",",","self.k",")","Prior","probabilities","of","assigning","each","symbol","to","each","node",".","If","not","provided",",","do","not","include","in","the","calculations","(","conceptually","equivalent","to","a","uniform","probability",",","but","without","scaling","the","probabilities",")",".","This","can","be","used","to","assign","labels","to","observatons","by","setting","one","of","the","probabilities","for","an","observation","to","1.0",".","Note","that","this","can","be","used","to","assign","hard","labels",",","but","does","not","have","the","same","semantics","for","soft","labels",",","in","that","it","only","influences","the","initial","estimate","of","an","observation","being","generated","by","a","component",",","not","gives","a","target",".","Default","is","None",".","Returns","--","--","--","-","y",":","torch.Tensor",",","shape=","(","-1",",","self.k",")","The","log","posterior","probabilities","for","each","example","under","each","component","."]
code: def predict_log_proba(self, X, priors=None):
      """Calculate the log posterior probabilities for each example.
  
      This method calculates the log posterior probabilities for each example
      under each component of the model after factoring in the prior
      probability and normalizing across all the components.
  
  
      Parameters
      ----------
      X: list, tuple, numpy.ndarray, torch.Tensor, shape=(-1, self.d)
              A set of examples to summarize.
  
      priors: list, numpy.ndarray, torch.Tensor, shape=(-1, self.k)
              Prior probabilities of assigning each symbol to each node. If not
              provided, do not include in the calculations (conceptually
              equivalent to a uniform probability, but without scaling the
              probabilities). This can be used to assign labels to observatons
              by setting one of the probabilities for an observation to 1.0.
              Note that this can be used to assign hard labels, but does not
              have the same semantics for soft labels, in that it only
              influences the initial estimate of an observation being generated
              by a component, not gives a target. Default is None.
  
  
      Returns
      -------
      y: torch.Tensor, shape=(-1, self.k)
              The log posterior probabilities for each example under each
              component.
      """
  
      e = self._emission_matrix(X, priors=priors)
      return e - torch.logsumexp(e, dim=1, keepdims=True)
  
file_path: pomegranate/pomegranate/_bayes.py
imports: import torch
  from ._utils import _cast_as_tensor
  from ._utils import _update_parameter
  from ._utils import _check_parameter
  from ._utils import _reshape_weights
  from .distributions._distribution import Distribution
label_desc: Use image node_id 7 for calling the BayesMixin obj's underlying member method code with example usage: obj.predict_log_proba(X, priors) and returns: unknown