Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (18.4k points)

I am working on sklearn for model prediction using the code below:

clf = MultinomialNB()

clf.fit(Xtrain,Ytrain)

Yans=clf.predict(Xtest)

I am getting a warning as shown below:

/usr/local/lib/python3.4/dist-packages/numpy/core/fromnumeric.py:2641: VisibleDeprecationWarning: `rank` is deprecated; use the `ndim` attribute or function instead. To find the rank of a matrix see `numpy.linalg.matrix_rank`.

  VisibleDeprecationWarning)

I am not able to the desired results due to this. how can I solve it?

1 Answer

0 votes
by (36.8k points)

As per my knowledge the issue is with scipy.  Try upgrading it using the below command:

pip3 install --upgrade scipy

If you want to know more about the Data Science then do check out the following Data Science which will help you in understanding Data Science from scratch 

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...