measure_accuracy function

Estimate the classification accuracy