\name{BIC and ICL for the model based clustering with elliptically symmetric distributions}
\alias{bic.mixsespc}
\alias{bic.mixesag}
\title{
BIC and ICL to choose the number of components in a model based clustering with elliptically symmetric distributions
}

\description{
BIC and ICL to choose the number of components in a model based clustering with elliptically symmetric distributions
}

\usage{
bic.mixsespc(x, G = 5, tol = 1e-4, ncores = 1)
bic.mixesag(x, G = 5, tol = 1e-4, ncores = 1)
}

\arguments{
\item{x}{
A matrix containing directional data.
}
\item{G}{
The maximum number of clusters to be tested. Default value is 5.
}
\item{tol}{
The tolerance value to terminate the EM algorithm.
}
\item{ncores}{
The number of cores in case you want to run the search for the optimal number of clusters in parallel.
}
}

\details{
The function computes the BIC and ICL to decide on the optimal number of clusters when
using mixtures of SESPC or mixtures of ESAG distributions.
}

\value{
A plot of the ICL values and a list including:
\item{bic}{
The BIC values for all the models tested.
}
\item{icl}{
The ICL values for all the models tested.
}
\item{runtime}{
The run time of the algorithm. A numeric vector. The first element is the user time,
the second element is the system time and the third element is the elapsed time.
}
}

\references{
Perdikis T., Alharbi N. and Tsagris M. (2026). Model--based clustering for spherical
and hyper--spherical data using elliptically symmetric distributions.

https://arxiv.org/abs/2605.27496
}

\author{
Michail Tsagris.

R implementation and documentation: Michail Tsagris \email{mtsagris@uoc.gr} and
Theodoros Perdikis \email{theoperdikis92@gmail.com}.
}

%\note{
%%  ~~further notes~~
%}

\seealso{
\code{\link{mixsespc.mle}, \link{rmixsespc}
}
}

\examples{
x <- as.matrix( iris[, 1:3] )
x <- x / sqrt( rowSums(x^2) )
bic.mixsespc(x, G = 3)
}

