Guest User

Untitled

a guest
Jul 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. vars = {'Asymmetry' 'Border irregularity' 'colors' 'contrast' 'Co-relation'
  2. 'Homogeneity' 'Energy'};
  3. x = [0.148 0.298 3 0.027 0.959 0.992 0.692
  4. 0.248 0.462 3 0.015 0.997 0.996 0.837
  5. 0.683 0.827 3 0.030 0.974 0.989 0.634
  6. 0.170 0.509 3 0.065 0.964 0.977 0.399
  7. 0.663 0.764 3 0.061 0.945 0.983 0.645
  8. 0.641 0.671 3 0.050 0.953 0.987 0.703
  9. 0.653 0.796 2 0.062 0.961 0.981 0.528
  10. 0.458 0.704 2 0.019 0.934 0.993 0.852
  11. 0.555 0.729 2 0.087 0.976 0.980 0.380
  12. 0.454 0.657 2 0.059 0.953 0.982 0.467
  13. 0.379 0.497 2 0.058 0.976 0.979 0.445
  14. 0.443 0.486 2 0.034 0.896 0.998 0.810
  15. 0.194 0.342 2 0.012 0.956 0.997 0.895
  16. 0.248 0.462 3 0.015 0.977 0.996 0.837
  17. 0.155 0.340 2 0.010 0.930 0.966 0.911
  18. 0.458 0.704 2 0.019 0.934 0.993 0.852];
  19. y = {'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'Cancer';'non-Cancer';'non-Cancer';'non-Cancer';'non-Cancer'};
  20. t = fitctree(x,y,'PredictorNames',vars, ...
  21. 'CategoricalPredictors',{},'Prune','off');
  22. view(t);
  23. X1=[0.148 0.186 2 0.139 0.984 0.992 0.558]
  24. label = predict(t,X1);
  25. view(t,'mode','graph');
Add Comment
Please, Sign In to add comment