class_docstr: Class defining continuous distribution type functionality
class_docstr_tok: ["Class","defining","continuous","distribution","type","functionality"]
docstr: The average gaussian loss.
  
  Args:
      X: The original data passed into NOTEARS (i.e. the reconstruction target).
  
      X_hat: The reconstructed data.
  
  Returns:
      Scalar pytorch tensor of the reconstruction loss between X and X_hat.
docstr_tok: ["The","average","gaussian","loss",".","Args",":","X",":","The","original","data","passed","into","NOTEARS","(","i.e",".","the","reconstruction","target",")",".","X_hat",":","The","reconstructed","data",".","Returns",":","Scalar","pytorch","tensor","of","the","reconstruction","loss","between","X","and","X_hat","."]
code: def loss(self, X: torch.Tensor, X_hat: torch.Tensor) -> torch.Tensor:
      """
      The average gaussian loss.
  
      Args:
          X: The original data passed into NOTEARS (i.e. the reconstruction target).
  
          X_hat: The reconstructed data.
  
      Returns:
          Scalar pytorch tensor of the reconstruction loss between X and X_hat.
      """
  
      return (0.5 / X.shape[0]) * torch.sum(
          (X_hat[:, self.idx] - X[:, self.idx]) ** 2
      )
  
imports: import torch
  from causalnex.structure.pytorch.dist_type._base import DistTypeBase
label_desc: Use image node_id 1 for calling the DistTypeContinuous obj's underlying member method code with example usage: obj.loss(X, X_hat) and returns: unknown