Last chance! 50% off unlimited learning
Sale ends in
Computes the expected number of components for a stable process.
expected_number_of_components_stable(n, Gama, ntrunc = NULL)
Number of data points
Numeric constant. 0 <= Gama <=1.
Level of truncation when computing the expectation. Defaults to n. If greater than n, it is fixed to n.
A real value of type mpfr1 which approximates the expected number of components
In spite of the high precision arithmetic packages used for in function, it can be numerically unstable for small values of Gama. This is because evaluating a sum with alternated signs, in the generalized factorial coefficients, is tricky. Reference: P. De Blasi, S. Favaro, A. Lijoi, R. H. Mena, I. Pr<U+00FC>nster, and M. Ruggiero, <U+201C>Are gibbs-type priors the most natural generalization of the Dirichlet process?,<U+201D> IEEE Trans. Pattern Anal. Mach. Intell., vol. 37, no. 2, pp. 212<U+2013>229, 2015.
# NOT RUN {
expected_number_of_components_stable(100, 0.8)
# }
Run the code above in your browser using DataLab