test function for error rate
function for optimizing random forest