Inheritance diagram for nipy.neurospin.utils.two_binomial_mixture:
This is the basic Fitting of a mixture of 2 binomial distributions it contains the follwing fields: - r0=0.2:the parameter of the first binomial - r1=0.8: the parameter of the second binomial - lambda=0.9 = the mixture parameter (proportion of the first compoenent) Note that all these parameters are within the [0,1] interval - verbose = 0 verbosity level It is now advised to proceed with the estimation using the EM method
Methods
| EMalgo | |
| EMalgo_from_histo | |
| Estep | |
| Mstep | |
| estimate_parameters | |
| estimate_parameters_from_histo | |
| kappa | |
| parameters | |
| reset | |
| show | |
| update_lambda_fh | |
| update_parameters_fh |
Estimate the parameters of the mixture from the input data using an EM algorithm
| Parameters: | X array of shape (nbitems) :
xmax: the maximal value of the input variable : eps = 1.e-7 = parameter to decide convergence: when lambda :
maxiter=100 : maximal number of iterations |
|---|
Estimate the parameters given an histogram of some data, using an EM algorithm
| Parameters: | H the histogram, i.e. the empirical count of values, whose :
eps = 1.e-7 :
maxiter=100 : |
|---|
Estimate the parameters of the mixture from the input data using a gradient descent algorithm this is strongly discouraged: rather use the EM
| Parameters: | X : 1D ndarray
n_bins: integer :
eps: float, optional :
maxiter : integer, optional
|
|---|
Estimate the parameters given an histogram of some data using a gradient descent. this is strongly discouraged: rather use the EM
| Parameters: | H : 1D ndarray
eps : float, optional
maxiter : float, optional
reset : boolean, optional
|
|---|
Display the histogram of the data, together with the mixture model
| Parameters: | H : ndarray
|
|---|
update lambda given the histogram H
| Parameters: | H array of shape (nbins) :
eps = 1.e-8 :
maxiter = 100: maximum number of iterations : |
|---|
update the binomial parameters given a certain histogram Parameters ———- H array of shape (nbins)
histogram, i.e. the empirical count of values, whose range is given by the length of H (to be padded with zeros when necesary)