  QCD phase diagram in the $T - \mu$ plane and the equation of state for pure
gluon, 2-flavor, 2+1-flavor systems, and 2+1+1-flavor systems have been
investigated using the Einstein-Maxwell-Dilaton (EMD) framework at finite
temperature and chemical potential. By inputting lattice QCD data for the
equation of state and baryon susceptibility at zero chemical potential into
holographic model, all the parameters can be determined with the aid of machine
learning algorithms. Our findings indicate that the deconfinement phase
transition is of first order for the pure gluon system with critical
temperature $T_c = 0.265 \rm GeV$ at vanishing chemical potential. The phase
transition for the 2-flavor, 2+1-flavor systems, and 2+1+1-flavor systems are
crossover at vanishing chemical potential and first-order at high chemical
potential, and the critical endpoint(CEP) in the $T - \mu$ plane locates at
($\mu_B^c$=0.46 GeV, $T^c$=0.147 GeV), ($\mu_B^c$ = 0.74 GeV, $T^c$ = 0.094
GeV), and ($\mu_B^c$= 0.87 GeV,$T^c$ = 0.108 GeV), respectively. Additionally,
the thermodynamic quantities of the system for different flavors at finite
chemical potential are presented in this paper. It is observed that the
difference between the 2+1 flavor and 2+1+1 flavor systems is invisible at
vanishing chemical potential and low temperature. The location of CEP for 2+1+1
flavor system deviates explicitly from that of the 2+1 flavor system with the
increase of chemical potential. Both 2+1 flavor and 2+1+1 flavor systems differ
significantly from the 2-flavor system.
