Machine learning techniques have recently received significant attention as promising approaches to deal with the optical channel impairments, and in particular, the nonlinear effects. In this work, a machine learning-based classification technique, known as the Parzen window (PW) classifier, is applied to mitigate the nonlinear effects in the optical channel. The PW classifier is used as a detector with improved nonlinear decision boundaries more adapted to the nonlinear fiber channel. Performance improvement is observed when applying the PW in the context of dispersion managed and dispersion unmanaged systems.