An apparatus for performing a localization of a movable treatment device having at least one inertial sensor and configured to treat the target surface. The apparatus has a motion pattern classification device configured to discriminate between two or more motion classes contained in a set of motion classes, and an interface for providing, from the inertial sensor to the motion pattern classification device, inertial sensor data representing a movement of the movable treatment device. The motion pattern classification device has a neural network configured to receive and classify inertial sensor data with respect to the motion classes associated with one or more different zones relating to the target surface so that the classification of inertial sensor data indicates an estimation of the location of the movable treatment device with respect to the one or more zones of the target surface.