  We use the Fortuin-Kasteleyn representation based improved estimator of the
correlation configuration as an alternative to the ordinary correlation
configuration in the machine-learning study of the phase classification of spin
models. The phases of classical spin models are classified using the improved
estimators, and the method is also applied to the quantum Monte Carlo
simulation using the loop algorithm. We analyze the
Berezinskii-Kosterlitz-Thouless (BKT) transition of the spin 1/2 quantum XY
model on the square lattice. We classify the BKT phase and the paramagnetic
phase of the quantum XY model using the machine-learning approach. We show that
the classification of the quantum XY model can be performed by using the
training data of the classical XY model.
