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 in Machine Learning by Nisha
78 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 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 in Machine Learning by Ashish
41 views
0 votes
1 answer
0 votes
1 answer
+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 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 348 views
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 8 in Machine Learning by Harvy
138 views