  Machine learning methods have been recently applied to learning phases of
matter and transitions between them. Of particular interest is the topological
phase transition, such as in the XY model, which can be difficult for
unsupervised learning such as the principal component analysis. Recently,
authors of [Nature Physics \textbf{15},790 (2019)] employed the diffusion-map
method for identifying topological order and were able to determine the BKT
phase transition of the XY model, specifically via the intersection of the
average cluster distance $\bar{D}$ and the within cluster dispersion
$\bar\sigma$ (when the different clusters vary from separation to mixing
together). However, sometimes it is not easy to find the intersection if
$\bar{D}$ or $\bar{\sigma}$ does not change too much due to topological
constraint. In this paper, we propose to use the Calinski-Harabaz ($ch$) index,
defined roughly as the ratio $\bar D/\bar \sigma$, to determine the critical
points, at which the $ch$ index reaches a maximum or minimum value, or jump
sharply. We examine the $ch$ index in several statistical models, including
ones that contain a BKT phase transition. For the Ising model, the peaks of the
quantity $ch$ or its components are consistent with the position of the
specific heat maximum. For the XY model both on the square lattices and
honeycomb lattices, our results of the $ch$ index show the convergence of the
peaks over a range of the parameters $\varepsilon/\varepsilon_0$ in the
Gaussian kernel. We also examine the generalized XY model with $q=2$ and $q=8$
and at the value away from the pure XY limit. Our method is thus useful to both
topological and non-topological phase transitions and can achieve accuracy as
good as supervised learning methods previously used in these models, and may be
used for searching phases from experimental data.
