  We study the electronic structure change of yttrium trihydride
$\mathrm{YH_3}$ by applying a hydrostatic pressure. At zero pressure,
$\mathrm{YH_3}$ has the structure with energy favored symmetry group
$P\bar{3}c1$ (165). From first principle calculation, we argue that the band
crossings are caused by overlapping of an electron- and hole-like bands.
Besides the space inversion symmetry ($\mathcal{I}$) and the time reversal
symmetry, the band structure also exhibits an approximate particle-hole
symmetry. Thus, $\mathrm{YH_3}$ can be viewed as a pseudo nodal surface
semimetal belongs to class BDI of the ten-fold AZ+ $\mathcal{I}$
classifications of gapless topological matter. As pressure increases, the
approximate particle-hole symmetry is gradually broken and the pseudo nodal
surface turns into a nodal ring belonging to the class AI with fewer
non-spatial symmetries. Also, the nodal ring is shrinking in the process. At
about $31$ GPa, which is higher than the reported structure phase transition
pressure $21$ GPa, the nodal ring shrinks to a nodal point. When above $31$
GPa, all band crossings are gapped out and $\mathrm{YH_3}$ becomes a trivial
insulator eventually.
