Performance metrics ported from scikit-learn to R.