class_docstr: Class for finding gradient and gradient log of Joint Gaussian Distribution
  Inherits pgmpy.inference.base_continuous.BaseGradLogPDF
  Here model must be an instance of GaussianDistribution
  
  Parameters
  ----------
  variable_assignments : A 1d array like object (numpy.ndarray or list)
      Vector representing values of variables at which we want to find gradient and log
  
  model : An instance of pgmpy.models.GaussianDistribution
  
  Example
  -------
  >>> from pgmpy.sampling import GradLogPDFGaussian
  >>> from pgmpy.factors.continuous import GaussianDistribution
  >>> import numpy as np
  >>> mean = np.array([3, 4])
  >>> covariance = np.array([[5, 4], [4, 5]])
  >>> model = GaussianDistribution(['x', 'y'], mean, covariance)
  >>> dist_param = np.array([12, 21])
  >>> grad_logp, logp = GradLogPDFGaussian(dist_param, model).get_gradient_log_pdf()
  >>> logp
  -34.777777777777771
  >>> grad_logp
  array([ 2.55555556, -5.44444444])
class_docstr_tok: ["Class","for","finding","gradient","and","gradient","log","of","Joint","Gaussian","Distribution","Inherits","pgmpy.inference.base_continuous.BaseGradLogPDF","Here","model","must","be","an","instance","of","GaussianDistribution","Parameters","--","--","--","--","--","variable_assignments",":","A","1d","array","like","object","(","numpy.ndarray","or","list",")","Vector","representing","values","of","variables","at","which","we","want","to","find","gradient","and","log","model",":","An","instance","of","pgmpy.models.GaussianDistribution","Example","--","--","--","-",">",">",">","from","pgmpy.sampling","import","GradLogPDFGaussian",">",">",">","from","pgmpy.factors.continuous","import","GaussianDistribution",">",">",">","import","numpy","as","np",">",">",">","mean","=","np.array","(","[","3",",","4","]",")",">",">",">","covariance","=","np.array","(","[","[","5",",","4","]",",","[","4",",","5","]","]",")",">",">",">","model","=","GaussianDistribution","(","[","'","x","'",",","'","y","'","]",",","mean",",","covariance",")",">",">",">","dist_param","=","np.array","(","[","12",",","21","]",")",">",">",">","grad_logp",",","logp","=","GradLogPDFGaussian","(","dist_param",",","model",")",".get_gradient_log_pdf","(",")",">",">",">","logp","-34.777777777777771",">",">",">","grad_logp","array","(","[","2.55555556",",","-5.44444444","]",")"]
docstr: Method that finds gradient and its log at position
docstr_tok: ["Method","that","finds","gradient","and","its","log","at","position"]
code: def _get_gradient_log_pdf(self):
      """
      Method that finds gradient and its log at position
      """
      sub_vec = self.variable_assignments - self.model.mean.flatten()
      grad = -np.dot(self.model.precision_matrix, sub_vec)
      log_pdf = 0.5 * np.dot(sub_vec, grad)
  
      return grad, log_pdf
  
imports: import itertools
  import math
  import os
  import networkx
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from pgmpy.inference import Inference
  from pgmpy.utils import _check_1d_array_object, _check_length_equal, compat_fns
label_desc: Use image node_id 2 for calling the GradLogPDFGaussian obj's underlying member method code with example usage: obj._get_gradient_log_pdf() and returns: grad,  log_pdf