In the context of k-NN, predicting the class means, typically, that the instance is the closest neighbor for a new instance.
the CPS function is defined as the ratio of the number of times our instance is the closest neighbor for an instance of the same class and the number of times our instance is the closest neighbor for another instance regardless of its class.