  Automated classification of supernovae (SNe) based on optical photometric
light curve information is essential in the upcoming era of wide-field time
domain surveys, such as the Legacy Survey of Space and Time (LSST) conducted by
the Rubin Observatory. Photometric classification can enable real-time
identification of interesting events for extended multi-wavelength follow-up,
as well as archival population studies. Here we present the complete sample of
5,243 "SN-like" light curves (in griz) from the Pan-STARRS1 Medium-Deep Survey
(PS1-MDS). The PS1-MDS is similar to the planned LSST Wide-Fast-Deep survey in
terms of cadence, filters and depth, making this a useful training set for the
community. Using this dataset, we train a novel semi-supervised machine
learning algorithm to photometrically classify 2,315 new SN-like light curves
with host galaxy spectroscopic redshifts. Our algorithm consists of a random
forest supervised classification step and a novel unsupervised step in which we
introduce a recurrent autoencoder neural network (RAENN). Our final pipeline,
dubbed SuperRAENN, has an accuracy of 87% across five SN classes (Type Ia, Ibc,
II, IIn, SLSN-I). We find the highest accuracy rates for Type Ia SNe and SLSNe
and the lowest for Type Ibc SNe. Our complete spectroscopically- and
photometrically-classified samples break down into: 62.0% Type Ia (1839
objects), 19.8% Type II (553 objects), 4.8% Type IIn (136 objects), 11.7% Type
Ibc (291 objects), and 1.6% Type I SLSNe (54 objects). Finally, we discuss how
this algorithm can be modified for online LSST data streams.

High Energy Astrophysical Phenomena;Instrumentation and Methods for Astrophysics