1. An apparatus for applying compensation to samples received from an optical channel comprising at least one optical fiber, the apparatus comprising: an equalizer having an equalizer response spectrally shaping the samples for compensation to generate a sequence of equalized samples; an error generator generating an error for a current sample based on the difference between 1) an equalized current sample and 2) a decision for the current sample adjusted for a target response, wherein the target response is based on a response of the at least one optical fiber; and a combiner configured to combine the error with one or more samples to provide an update signal, wherein the equalizer employs the update signal to adjust the equalizer response to the target response; a detector generating decoded data from the sequence of equalized samples using an algorithm; and an accumulator configured to accumulate the square of each error value, wherein the accumulation of the squared error values relates to a parameter of the target response, and the algorithm adjusts its transitions by adaptation of the parameter of the target response.