  The electronic properties graphene nanoflakes (GNFs) with embedded hexagonal
boron nitride (hBN) domains are investigated by combined {\it ab initio}
density functional theory calculations and machine learning techniques. The
energy gaps of the quasi-0D graphene based systems, defined as the differences
between LUMO and HOMO energies, depend on the sizes of the hBN domains relative
to the size of the pristine graphene nanoflake, but also on the position of the
hBN domain. The range of the energy gaps for different configurations is
increasing as the hBN domains get larger. We develop two artificial neural
network (ANN) models able to reproduce the gap energies with high accuracies
and investigate the tunability of the energy gap, by considering a set of GNFs
with embedded rectangular hBN domains. In one ANN model, the input is in
one-to-one correspondence with the atoms in the GNF, while in the second model
the inputs account for basic structures in the GNF, allowing potential use in
up-scaled structures. We perform a statistical analysis over different
configurations of ANNs to optimize the network structure. The trained ANNs
provide a correlation between the atomic system configuration and the magnitude
of the energy gaps, which may be regarded as an efficient tool for optimizing
the design of nanostructured graphene based materials for specific electronic
properties.
