class_docstr: Implements discrete distribution where the underlying random variable
  takes a value from the finite set `values` with the corresponding
  probabilities.
  
  Note: `values` can have duplicates in which case the probability mass
  of duplicates is added up.
  
  A natural loss function, especially given that the new observation does
  not have to be from the finite set `values`, is ranked probability score
  (RPS). For this reason and to be consitent with terminology of other
  models, `log_prob` is implemented as the negative RPS.
class_docstr_tok: ["Implements","discrete","distribution","where","the","underlying","random","variable","takes","a","value","from","the","finite","set","`","values","`","with","the","corresponding","probabilities",".","Note",":","`","values","`","can","have","duplicates","in","which","case","the","probability","mass","of","duplicates","is","added","up",".","A","natural","loss","function",",","especially","given","that","the","new","observation","does","not","have","to","be","from","the","finite","set","`","values","`",",","is","ranked","probability","score","(","RPS",")",".","For","this","reason","and","to","be","consitent","with","terminology","of","other","models",",","`","log_prob","`","is","implemented","as","the","negative","RPS","."]
code: def log_prob(self, obs: torch.Tensor):
      return -self.rps(obs)
  
file_path: gluonts/src/gluonts/torch/distributions/discrete_distribution.py
imports: from numbers import Number
  from typing import Optional
  import torch
label_desc: Use image node_id 4 for calling the DiscreteDistribution obj's underlying member method code with example usage: obj.log_prob(obs) and returns: unknown