class_docstr: Represents a density estimator based on a Gaussian mixture model. The estimator uses the sklearn
  BayesianGaussianMixture model internally.
class_docstr_tok: ["Represents","a","density","estimator","based","on","a","Gaussian","mixture","model",".","The","estimator","uses","the","sklearn","BayesianGaussianMixture","model","internally","."]
code: def __init__(self, num_components: Optional[int] = None) -> None:
      self._gmm_model = None
      self._num_components = num_components
  
file_path: dowhy/dowhy/gcm/density_estimators.py
imports: from typing import Optional
  import numpy
  from sklearn.mixture import BayesianGaussianMixture
  from sklearn.neighbors import KernelDensity
  from dowhy.gcm.density_estimator import DensityEstimator
  from dowhy.gcm.util.general import shape_into_2d
label_desc: Use image node_id 1 to create a new GaussianMixtureDensityEstimator object from inherited base classes: DensityEstimator with example: obj = GaussianMixtureDensityEstimator(num_components)