Given a LongData
and a
Partition
(or a matrix
and a vector of
integer
), the fonction qualityCriterion
calculate several
quality criterion and return then as a list (see 'value' below).
If some individual have no clusters (ie if Partition
has some
missing values), the corresponding trajectories are exclude from the
calculation.
Note that if there is an empty cluster or an empty trajectory, most of
the criterions are anavailable.
Basicaly, 6 non-parametrics criterions are computed.
In addition, ASSUMING THAT in each clusters C and for each time T,
the variable follow a NORMAL LAW (mean and standard deviation of the variable at time T restricted
to clusters C), it is possible to compute the the posterior
probabilities of the individual trajectories and the
likelihood. From there, we can also compute the BIC, the AIC and
the global posterior probability. The function qualityCriterion
also compute these criterion. But the user should alway keep in mind
that these criterion are
valid ONLY under the hypothesis of normality. If this
hypothèsis is not respected, algorithm like k-means will converge but the BIC and AIC
will have no meaning.
IMPORTANT NOTE: Some criterion should be maximized, some other should be
minimized. This might be confusing for the non expert. In order to
simplify the comparison of the criterion, qualityCriterion
compute the OPPOSITE of the criterion that should be minimized (Ray & Bouldin, Davies & Turi, BIC and AIC). Thus,
all the criterion computed by this function should be maximized.