Controlled thermonuclear fusion is a very attractive energy source for mankind, as it can provide virtually limitless, affordable, sustainable and safe energy with no carbon emission. The tokamak is one of the leading concept for a thermonuclear fusion pilot plant, which confines the 100 million degree plasma in a magnetic field shaped as a donut. Tokamak plasmas require a variety of internal instabilities to be controlled, including the naturally growing Neoclassical Tearing Modes which tear the magnetic fabric of the confinement and manipulate it into undesirable island shapes that can cause rapid and violent plasma termination. Experiments conducted at the DIII-D National Fusion Facility in San Diego demonstrate that the tearing modes are often triggered by non-linear interactions of otherwise harmless magnetohydrodynamic modes that are already present in the fusion plasma core. Statistical analysis of the onset time of the tearing instabilities reveals what their destabilization depends on and what not, and how to avoid them. Machine learning ranks the tearing sensitive parameters in a database of over 13,000 experiments and reveals that the stable operational time of the plasma can be increased by tailoring the density, impurity content, rotation profile and the magnetic equilibrium shape.