Comments (3)
I'll hopefully be working on this in the next while
from numbers.js.
so many other tests are failing. I thought it was just that one, it seemed to have been giving us the most problems but apparently that's not the case. I'm just going to skew the error bounds on the tests so that it has a better chance of passing. it may be hacky but random numbers are wonky so whatever.
from numbers.js.
I tried the latest code from master with your changes but it didn't really help to lower the error rate.
I think this is the real problem.
In order for the random functions to be testable, a predetermined seed value for the pseudo random number generator must be used.
Currently, there's no way to achieve this.
Here's one possible solution.
In the random
module, add a setter for the random number generator instead of hard coding to Math.random()
.
I see two benefits here.
- Users could replace
Math.random()
with a cryptographic-grade random number generator. - Test cases would become predictable.
During testing, we could use an alternative to the plain oldMath.random()
.
Possible options:
- seedrandom
function(){ return CONSTANT }
I'll try to submit a pull request soon.
from numbers.js.
Related Issues (20)
- Use Gulp instead of make HOT 3
- Duplicated method: random.sample() and statistic.randomSample()
- Fix issues found by jshint HOT 2
- can't format HOT 4
- Chi square HOT 4
- matrix.transpose doesn't work correctly on vectors HOT 2
- min / max consumes O(n) memory HOT 6
- New Organization! HOT 3
- standalone components HOT 5
- in-place operations occur in matrix.js
- add section to readme about row vector format HOT 2
- Exponential Regression Test Failing HOT 1
- use npm as a build tool instead of gulp
- Error in Documentation Link on Official NPMjs.com/packages/numbers HOT 2
- Typescript definition file HOT 1
- Request to add git tag HOT 2
- How to use number.js in simpe html file, not node dev? HOT 1
- row654 of matrix.js should insert 'm = matrix.deepCopy(m);'
- Determinant is wrong for matrix n > 3
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 numbers.js.