You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While learning about Naive Bayes Classification I encountered a problem with bayespost function. When I rewrited this function in my jupyter notebook I got following error
AssertionError: Argument data must have NDArray type, but got ...
I wanted to fix this and change two lines in this function
def bayespost(data):
logpost = logpy.copy()
logpost += (logpx * x + logpxneg * (1 - x)).sum(0)
logpost -= nd.max(logpost)
post = nd.exp(logpost) # before was: post = nd.exp(logpost).asnumpy()
post /= nd.sum(post)
return post.asnumpy() # before was: post
I am also curious if only I got this error
The text was updated successfully, but these errors were encountered:
While learning about Naive Bayes Classification I encountered a problem with
bayespost
function. When I rewrited this function in my jupyter notebook I got following errorI wanted to fix this and change two lines in this function
I am also curious if only I got this error
The text was updated successfully, but these errors were encountered: