Numpy rounds very small number to zeros - Markov Chain Python

0 votes
While using the numpy module for Markov Chain, I saw that very tiny float values are getting converted to zero. Why is that happening?
Aug 2, 2019 in Machine Learning by Nisha
5,897 views

1 answer to this question.

0 votes

Use higher-precision floats, if available on your system. For example, if you have float128:

import numpy as np
print(np.exp(np.float128(-1000))) 
print(np.exp(np.float128(-10000)))
answered Aug 2, 2019 by Harry

Related Questions In Machine Learning

0 votes
1 answer

Markov chain using processing - Python

Try something like this @Gujjar HashMap<String, int> wordCount; int ...READ MORE

answered Aug 2, 2019 in Machine Learning by Ashish
917 views
0 votes
1 answer
0 votes
0 answers
0 votes
1 answer
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Example to run KNN algorithm using python

Have a look at this one: from sklearn.datasets ...READ MORE

answered May 9, 2019 in Machine Learning by Harvy
1,581 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP