Online nearest neighbor classification