Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkaliski committed Jul 12, 2018
1 parent 2a2e8ec commit 7a9be40
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/statistic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,13 @@ suite('numbers', function () {
test('should return a function to calculate the exponential regression of an array of numbers', function (done) {
var input = [10, 9, 8, 8, 7, 7, 6, 6.5, 6.4, 6.3, 6.2];
var output = [
9.077131929916444, 8.66937771538526, 8.279940244595563, 7.907996710352883,
7.552761266818376, 7.213483369166244, 6.8894461878255076, 6.579965093955639,
9.077131929916444, 8.66937771538526, 8.279940244595563, 7.907996710352884,
7.552761266818374, 7.213483369166245, 6.8894461878255076, 6.579965093955639,
6.284386212956255, 6.002085042954625, 5.732465135352174
];

var regression_function = statistic.exponentialRegression(input);

assert.equal(regression_function.rSquared, 0.8491729985314136);
assert.equal(regression_function.rSquared, 0.8491729985314137);

assert.deepEqual(regression_function(basic.range(1, input.length)), output);
assert.equal(regression_function(1), 9.077131929916444);
Expand Down

0 comments on commit 7a9be40

Please sign in to comment.