Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const preds = model.predict(xTest).argMax(-1);
  2. const labels = yTest.argMax(-1);
  3.  
  4. const confusionMatrix = await tfvis.metrics.confusionMatrix(labels, preds);
  5.  
  6. const container = document.getElementById("confusion-matrix");
  7.  
  8. tfvis.render.confusionMatrix(container, {
  9. values: confusionMatrix,
  10. tickLabels: ["Healthy", "Diabetic"]
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement