class_docstr: Assume a joint intensity distribution model is given by self.dist
class_docstr_tok: ["Assume","a","joint","intensity","distribution","model","is","given","by","self.dist"]
code: def loss(self, H):
      if not hasattr(self, "L"):
          if self.dist is None:
              raise ValueError(
                  "SupervisedLikelihoodRatio: dist attribute cannot be None"
              )
          if not self.dist.shape == H.shape:
              raise ValueError(
                  "SupervisedLikelihoodRatio: wrong shape for dist attribute"
              )
          self.L = dist2loss(self.dist)
      return self.L
  
imports: import numpy
  from scipy.ndimage import gaussian_filter
  from ._registration import _L1_moments
label_desc: Use image node_id 1 for calling the SupervisedLikelihoodRatio obj's underlying member method code with example usage: obj.loss(H) and returns: self