john_1726

Untitled

Jul 3rd, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. ValueError Traceback (most recent call last)
  3. D:\Users\psalm\AppData\Local\Temp/ipykernel_34844/2351298916.py in <module>
  4. 1 from sklearn.metrics.cluster import v_measure_score
  5. 2
  6. ----> 3 v_measure_score(X, y)
  7.  
  8. C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
  9. 61 extra_args = len(args) - len(all_args)
  10. 62 if extra_args <= 0:
  11. ---> 63 return f(*args, **kwargs)
  12. 64
  13. 65 # extra_args > 0
  14.  
  15. C:\ProgramData\Anaconda3\lib\site-packages\sklearn\metrics\cluster\_supervised.py in v_measure_score(labels_true, labels_pred, beta)
  16. 708 0.0...
  17. 709 """
  18. --> 710 return homogeneity_completeness_v_measure(labels_true, labels_pred,
  19. 711 beta=beta)[2]
  20. 712
  21.  
  22. C:\ProgramData\Anaconda3\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
  23. 61 extra_args = len(args) - len(all_args)
  24. 62 if extra_args <= 0:
  25. ---> 63 return f(*args, **kwargs)
  26. 64
  27. 65 # extra_args > 0
  28.  
  29. C:\ProgramData\Anaconda3\lib\site-packages\sklearn\metrics\cluster\_supervised.py in homogeneity_completeness_v_measure(labels_true, labels_pred, beta)
  30. 451 v_measure_score
  31. 452 """
  32. --> 453 labels_true, labels_pred = check_clusterings(labels_true, labels_pred)
  33. 454
  34. 455 if len(labels_true) == 0:
  35.  
  36. C:\ProgramData\Anaconda3\lib\site-packages\sklearn\metrics\cluster\_supervised.py in check_clusterings(labels_true, labels_pred)
  37. 60 # input checks
  38. 61 if labels_true.ndim != 1:
  39. ---> 62 raise ValueError(
  40. 63 "labels_true must be 1D: shape is %r" % (labels_true.shape,))
  41. 64 if labels_pred.ndim != 1:
  42.  
  43. ValueError: labels_true must be 1D: shape is (150, 4)
  44.  
Advertisement
Add Comment
Please, Sign In to add comment