Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. from sklearn import preprocessing
  2.  
  3. lb = preprocessing.LabelBinarizer()
  4. #fit all the possible label codes
  5. lb.fit(icd10['ICD10'])
  6. temp = lb.transform(infoDF['Target'])
  7. for i,x in enumerate(lb.classes_):
  8. infoDF[x] = temp[ : , i]
  9.  
  10. File "<ipython-input-42-2b1db450b16e>", line 3, in <module>
  11. lb.fit(icd10['ICD10'])
  12.  
  13. File "C:Usersana.stanAppDataLocalContinuumanaconda3libsite-packagessklearnpreprocessinglabel.py", line 413, in fit
  14. self.classes_ = unique_labels(y)
  15.  
  16. File "C:Usersana.stanAppDataLocalContinuumanaconda3libsite-packagessklearnutilsmulticlass.py", line 96, in unique_labels
  17. raise ValueError("Unknown label type: %s" % repr(ys))
  18.  
  19. ValueError: Unknown label type: (0 1
  20. 1 2
  21. 2 3
  22. 3 4
  23. 4 5
  24. 5 6
  25. 6 7
  26. 7 8
  27. 8 9
  28. 9 10
  29. 10 11
  30. 11 12
  31. 12 13
  32. 13 14
  33. 14 15
  34. 15 16
  35. 16 17
  36. 17 18
  37. 18 19
  38. 19 20
  39. 20 21
  40. 21 22
  41. 22 A00
  42. 23 A000
  43. 24 A001
  44. 25 A009
  45. 26 A00–A09
  46. 27 A01
  47. 28 A010
  48. 29 A011
  49.  
  50. 19433 Z960
  51. 19434 Z961
  52. 19435 Z962
  53. 19436 Z963
  54. 19437 Z964
  55. 19438 Z965
  56. 19439 Z966
  57. 19440 Z967
  58. 19441 Z968
  59. 19442 Z969
  60. 19443 Z97
  61. 19444 Z970
  62. 19445 Z971
  63. 19446 Z972
  64. 19447 Z973
  65. 19448 Z974
  66. 19449 Z975
  67. 19450 Z978
  68. 19451 Z98
  69. 19452 Z980
  70. 19453 Z981
  71. 19454 Z982
  72. 19455 Z988
  73. 19456 Z99
  74. 19457 Z990
  75. 19458 Z991
  76. 19459 Z992
  77. 19460 Z993
  78. 19461 Z998
  79. 19462 Z999
  80. Name: ICD10, Length: 19463, dtype: object,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement