  The search for fast optical transients, such as the expected electromagnetic
counterparts to binary neutron star mergers, is riddled with false positives
ranging from asteroids to stellar flares. While moving objects are readily
rejected via image pairs separated by $\sim$1 hr, stellar flares represent a
challenging foreground that significantly outnumber rapidly-evolving
explosions. Identifying stellar sources close to and fainter than the transient
detection limit can eliminate these false positives. Here, we present a method
to reliably identify stars in deep co-adds of Palomar Transient Factory (PTF)
imaging. Our machine-learning methodology utilizes the random forest (RF)
algorithm, which is trained using $> 3\times{10}^6$ sources with Sloan Digital
Sky Survey (SDSS) spectra. When evaluated on an independent test set, the PTF
RF model outperforms the SExtractor star classifier by $\sim$4%. For faint
sources ($r'\ge{21}$ mag), which dominate the field population, the PTF RF
model produces a $\sim$19% improvement over SExtractor. To avoid false
negatives in the PTF transient-candidate stream, we adopt a conservative
stellar classification threshold, corresponding to a galaxy misclassification
rate = 0.005. Ultimately, $\sim$$1.70\times{10}^8$ objects are included in our
PTF point-source catalog, of which only $\sim$$10^6$ are expected to be
galaxies. We demonstrate that the PTF RF catalog reveals transients that
otherwise would have been missed. To leverage its superior image quality, we
additionally create an SDSS point-source catalog, which is also tuned to have a
galaxy misclassification rate = 0.005. These catalogs have been incorporated
into the PTF real-time pipelines to automatically reject stellar sources as
non-extragalactic transients.
