MultinomialNB error: “Unknown Label Type”

前端 未结 2 747
情书的邮戳
情书的邮戳 2021-01-05 01:33

I have two numpy arrays, X_train and Y_train, where the first of dimensions (700,1000) is populated by the values 0, 1, 2, 3, 4, and 10. The second of dimensions (700,) is p

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 02:10

    I also faced the same problem. Numpy sometimes fails t detect datatype of array. So, we give it explicitly. here is the documentation of all the types by numpy. Select datatype according to your requirement and provide it as "dtype=" attribute.

提交回复
热议问题