  The classification of supernovae (SNe) and its impact on our understanding of
the explosion physics and progenitors have traditionally been based on the
presence or absence of certain spectral features. However, current and upcoming
wide-field time-domain surveys have increased the transient discovery rate far
beyond our capacity to obtain even a single spectrum of each new event. We must
therefore rely heavily on photometric classification, connecting SN light
curves back to their spectroscopically defined classes. Here we present
Superphot, an open-source Python implementation of the machine-learning
classification algorithm of Villar et al., and apply it to 2315 previously
unclassified transients from the Pan-STARRS1 Medium Deep Survey for which we
obtained spectroscopic host-galaxy redshifts. Our classifier achieves an
overall accuracy of 82%, with completenesses and purities of >80% for the best
classes (SNe Ia and superluminous SNe). For the worst performing SN class (SNe
Ibc), the completeness and purity fall to 37% and 21%, respectively. Our
classifier provides 1257 newly classified SNe Ia, 521 SNe II, 298 SNe Ibc, 181
SNe IIn, and 58 SLSNe. These are among the largest uniformly observed samples
of SNe available in the literature and will enable a wide range of statistical
studies of each class.
