class_docstr: GMM 1D distribution.
  
  Given a set of points, we create this object so that we
  can calculate likelihoods and generate samples from this
  1D Gaussian mixture model.
  
  Attributes
  ----------
  points : 1D array
      Set of points to create the GMM
  
  N : int
      Number of points to create the GMM
  
  min_limit : Optional[float], default : -inf
      Minimum limit for the distribution
  
  max_limit : Optional[float], default : inf
      Maximum limit for the distribution
  
  weights : Optional[1D array], default : array of ones
      Used to weight the points non-uniformly if required
class_docstr_tok: ["GMM","1D","distribution",".","Given","a","set","of","points",",","we","create","this","object","so","that","we","can","calculate","likelihoods","and","generate","samples","from","this","1D","Gaussian","mixture","model",".","Attributes","--","--","--","--","--","points",":","1D","array","Set","of","points","to","create","the","GMM","N",":","int","Number","of","points","to","create","the","GMM","min_limit",":","Optional","[","float","]",",","default",":","-inf","Minimum","limit","for","the","distribution","max_limit",":","Optional","[","float","]",",","default",":","inf","Maximum","limit","for","the","distribution","weights",":","Optional","[","1D","array","]",",","default",":","array","of","ones","Used","to","weight","the","points","non-uniformly","if","required"]
code: def __init__(
      self, x, min_limit=-np.inf, max_limit=np.inf, weights=1.0
  ):
      self.points = x
      self.N = x.size
      self.min_limit = min_limit
      self.max_limit = max_limit
      self.sigma = get_sigma(
          x, min_limit=min_limit, max_limit=max_limit
      )
      self.weights = (
          2
          / (
              erf((max_limit - x) / (np.sqrt(2.0) * self.sigma))
              - erf((min_limit - x) / (np.sqrt(2.0) * self.sigma))
          )
          * weights
      )
      self.W_sum = np.sum(self.weights)
  
file_path: brainiak/brainiak/hyperparamopt/hpo.py
imports: import logging
  import math
  import numpy
  from scipy.special import erf
  import scipy.stats
label_desc: Use image node_id 1 to create a new gmm_1d_distribution object  with example: obj = gmm_1d_distribution(x, min_limit, max_limit, weights)