class_docstr: Model for Von Mises mixture distribution with fixed variance
  on a two-dimensional sphere
class_docstr_tok: ["Model","for","Von","Mises","mixture","distribution","with","fixed","variance","on","a","two-dimensional","sphere"]
docstr: Return average log density across samples
  
  Parameters
  ----------
  x: array of shape (n,3)
     should be on the unit sphere
  maxiter : int, optional
      maximum number of iterations of the algorithms
  miniter : int, optional
      minimum number of iterations
  bias : array of shape(n), optional
      prior probability of being in a non-null class
  
  Returns
  -------
  ll : float
      average (across samples) log-density
docstr_tok: ["Return","average","log","density","across","samples","Parameters","--","--","--","--","--","x",":","array","of","shape","(","n,3",")","should","be","on","the","unit","sphere","maxiter",":","int",",","optional","maximum","number","of","iterations","of","the","algorithms","miniter",":","int",",","optional","minimum","number","of","iterations","bias",":","array","of","shape","(","n",")",",","optional","prior","probability","of","being","in","a","non-null","class","Returns","--","--","--","-","ll",":","float","average","(","across","samples",")","log-density"]
code: def estimate(self, x, maxiter=100, miniter=1, bias=None):
      """Return average log density across samples
  
      Parameters
      ----------
      x: array of shape (n,3)
         should be on the unit sphere
      maxiter : int, optional
          maximum number of iterations of the algorithms
      miniter : int, optional
          minimum number of iterations
      bias : array of shape(n), optional
          prior probability of being in a non-null class
  
      Returns
      -------
      ll : float
          average (across samples) log-density
      """
      # initialization with random positions and constant weights
      if self.weights is None:
          self.weights = np.ones(self.k) / self.k
          if self.null_class:
              self.weights = np.ones(self.k + 1) / (self.k + 1)
  
      if self.means is None:
          aux = np.arange(x.shape[0])
          np.random.shuffle(aux)
          self.means = x[aux[: self.k]]
  
      # EM algorithm
      assert not (np.isnan(self.means).any())
      pll = -np.inf
      for i in range(maxiter):
          ll = np.log(self.mixture_density(x)).mean()
          z = self.responsibilities(x)
          assert not (np.isnan(z).any())
  
          # bias z
          if bias is not None:
              z[:, 0] *= 1 - bias
              z[:, 1:] = ((z[:, 1:].T) * bias).T
              z = (z.T / np.sum(z, 1)).T
  
          self.estimate_weights(z)
          if self.null_class:
              self.estimate_means(x, z[:, 1:])
          else:
              self.estimate_means(x, z)
          assert not (np.isnan(self.means).any())
          if (i > miniter) and (ll < pll + 1.0e-6):
              break
          pll = ll
      return ll
  
imports: from warnings import warn
  import numpy
label_desc: Use image node_id 10 for calling the VonMisesMixture obj's underlying member method code with example usage: obj.estimate(x, maxiter, miniter, bias) and returns: ll