In the field of radio astronomy the presence of “radio frequency interference” (RFI) has been a constant and growing problem. RFI is human-made radio frequency interference that is emitted by aircraft,wireless internet, satellites,power lines and other telecommunication services. There are various techniques in use to mitigate the impact of RFI on astronomical data, such as automatic detection of statistical outliers, but these can come with certain weaknesses. For example, most approaches are applied in post-processing, after data have been integrated for up to several seconds. RFI can occur on shorter timescales but contaminate an entire integration, resulting in the loss of both good and bad data. We explore a new technique for identifying and removing RFI in Nyquist-sampled baseband data. This technique uses a machine learning algorithm to flag individual samples and replace them with zeros or statistical noise before the data are further integrated. This has the potential to recover data that would have otherwise been lost, but has the disadvantage of permanently altering the data in an unrecoverable way. It is therefore crucial to fully verify that the technique preserves data quality and does not impact the measurement of astrophysically relevant parameters. We analyze archived baseband data of a well-studied pulsar using both this machine learning algorithm and traditional RFI excision techniques, performing a detailed comparison of the intermediate and final data products.