  The first-principles-based effective Hamiltonian scheme provides one of the
most accurate modeling technique for large-scale structures, especially for
ferroelectrics. However, the parameterization of the effective Hamiltonian is
complicated and can be difficult for some complex systems such as high-entropy
perovskites. Here, we propose a general form of effective Hamiltonian and
develop an active machine learning approach to parameterize the effective
Hamiltonian based on Bayesian linear regression. The parameterization is
employed in molecular dynamics simulations with the prediction of energy,
forces, stress and their uncertainties at each step, which decides whether
first-principles calculations are executed to retrain the parameters.
Structures of BaTiO$_3$, Pb(Zr$_{0.75}$Ti$_{0.25}$)O$_3$ and (Pb,Sr)TiO$_3$
system are taken as examples to show the accuracy of this approach, as compared
with conventional parametrization method and experiments. This machine learning
approach provides a universal and automatic way to compute the effective
Hamiltonian parameters for any considered complex systems with
super-large-scale (more than $10^7$ atoms) atomic structures.
