of $g-r < -0.01*(M_r+21) + 0.65$. If a galaxy has one or more blue companions which lie within one beam radius (1.9 arcminutes) and within a relative velocity of 250 km s$^{-1}$, we conclude that there is a risk of significant HI contamination, and remove the galaxy from our training set. A total of 431 galaxies were removed from our training set for this reason.

Second, we remove galaxies which lie within one beam radius and 250 km s$^{-1}$ of a known ALFALFA source. While approximately half of these sources have already been removed in the previous step, a comparable number remain due to spectroscopic incompleteness in SDSS. In particular, fibre collisions lead to a high rate of spectroscopic incompleteness at angular separations less than 55 arcsec (Blanton et al. 2003, Patton & Atfield 2008). A total of 27 additional galaxies are removed from our training set for this reason.

Finally, we address the possibility of contamination by companions whose centres lie outside the ALFALFA beam and yet whose HI flux is likely to overlap the beam. We use ALFALFA HI gas fractions and the Mendel et al. (2014) stellar masses to compute the HI mass of all companions which 