Implement confusion matrix using D3.