Logistic regression, neural networks and support vector machines are tested for their effectiveness in isolating surface waves in seismic shot records. To distinguish surface waves from other arrivals, we train the algorithms on three distinguishing features of surface-wave dispersion curves in the (Formula presented.) domain: spectrum coherency of the trace's magnitude spectrum, local dip and the frequency range for a fixed wavenumber k in the spectrum. Numerical tests on synthetic data show that the kernel-based support vector machines algorithm gives the highest accuracy in predicting the surface-wave window in the (Formula presented.) domain compared to neural networks and logistic regression. This window is also used to automatically pick the fundamental dispersion curve. The other two methods correctly pick the low-frequency part of the dispersion curve but fail at higher frequencies where there is interference with higher-order modes.