Advertisement
Armandobs14

fisher and chi-square analysis

Jan 19th, 2017
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 1.44 KB | None | 0 0
  1. #C1
  2. #-----------------------------------
  3. #  Nível, precision, recall, f-measure
  4. #Proposta, 1, 0.875, 0.933
  5. #AML, 0.966, 0.875, 0.918
  6. #RiMOM, 0.813, 0.813, 0.813
  7.  
  8. #C2
  9. #-----------------------------------
  10. #  Nível, precision, recall, f-measure
  11. #AML, 0.921, 0.854, 0.886
  12. #Proposta, 0.906, 0.707, 0.794
  13. #RiMOM, 0.707, 0.707, 0.707
  14.  
  15. #nivel = c("Proposta","AML","RiMOM")
  16. #precision_1 = c(1,0.966,0.813)
  17. #recall_1 = c(0.875,0.875, 0.813)
  18. #f1 = c(0.933,0.918, 0.813)
  19. #df = data.frame(precision,recall,f1)
  20.  
  21. #proposta, aml - C1
  22. precision_1 = c(1,0.966)
  23. recall_1 = c(0.875,0.875)
  24.  
  25. df_1 = data.frame(precision_1,recall_1)
  26.  
  27. chisq.test(df_1)
  28.  
  29. fisher.test(df_1, alternative = "less")
  30. fisher.test(df_1, alternative = "greater")
  31.  
  32.  
  33.  
  34. #proposta, aml - C2
  35. precision_1 = c(0.906, 0.921)
  36. recall_1 = c(0.707,0.854)
  37.  
  38. df_1 = data.frame(precision_1,recall_1)
  39.  
  40. chisq.test(df_1)
  41.  
  42. fisher.test(df_1, alternative = "less")
  43. fisher.test(df_1, alternative = "greater")
  44.  
  45.  
  46. #proposta, rimom - C1
  47. precision_2 = c(1,0.813)
  48. recall_2 = c(0.875,0.813)
  49.  
  50. df_2 = data.frame(precision_2,recall_2)
  51.  
  52. chisq.test(df_2)
  53.  
  54. fisher.test(df_2, alternative = "less")
  55. fisher.test(df_2, alternative = "greater")
  56.  
  57.  
  58. #proposta, rimom - C2
  59. precision_2 = c(0.906,0.707)
  60. recall_2 = c(0.707,0.707)
  61.  
  62. df_2 = data.frame(precision_2,recall_2)
  63.  
  64. chisq.test(df_2)
  65.  
  66. fisher.test(df_2, alternative = "less")
  67. fisher.test(df_2, alternative = "greater")
  68.  
  69.  
  70. p-value = 0.8333
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement