  We present two approaches to determine the dynamical stability of a
hierarchical triple-star system. The first is an improvement on the
Mardling-Aarseth stability formula from 2001, where we introduce a dependence
on inner orbital eccentricity and improve the dependence on mutual orbital
inclination. The second involves a machine learning approach, where we use a
multilayer perceptron (MLP) to classify triple-star systems as `stable' and
`unstable'. To achieve this, we generate a large training data set of 10^6
hierarchical triples using the N-body code MSTAR. Both our approaches perform
better than previous stability criteria, with the MLP model performing the
best. The improved stability formula and the machine learning model have
overall classification accuracies of 93 % and 95 % respectively. Our MLP model,
which accurately predicts the stability of any hierarchical triple-star system
within the parameter ranges studied with almost no computation required, is
publicly available on Github in the form of an easy-to-use Python script.
