Comments (2)
Hey @bsxfan,
Thanks for reporting this.
Currently, the only alternative I see would be to cap inputs to log
at a small value to avoid the error, but that is guaranteed to affect sample statistics so I'm not sure it's a better solution.
I will double-check that the formula computed is correct (it's been a while since I looked at it) and if yes, I'll probably just add a few lines of documentation and suggest your workaround for such cases.
Update: on a separate note: do you know how the matlab implementation handles this? I don't have access to Matlab right now, but ideally we should handle this case in the same way.
from arspy.
- Sorry, my MATLAB license stayed behind with my previous employer. But as far as I remember from MATLAB, the default behaviour would be to quietly return -inf for log(0). So if the same thing happened in the MATLAB implementation, nobody would have noticed.
- I can mention that the problem seems rare. As you can see in my test code, I had to do 1000 invocations to make it happen. If I do just 10, chances are it does not occur.
from arspy.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arspy.