Skip to content

Commit

Permalink
fix: More unit tests, and a forecast fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robertleeplummerjr committed Nov 13, 2018
1 parent 2d5876a commit 8d00448
Show file tree
Hide file tree
Showing 4 changed files with 382 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/recurrent/rnn-time-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ export default class RNNTimeStep extends RNN {

forecast(input, count) {
if (this.inputSize === 1) {
this.run = this.forecastNumbers;
this.forecast = this.forecastNumbers;
return this.forecastNumbers(input, count);
}
this.run = this.forecastArrays;
this.forecast = this.forecastArrays;
return this.forecastArrays(input, count);
}

Expand Down
2 changes: 1 addition & 1 deletion src/recurrent/rnn.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default class RNN {
* @returns boolean
*/
get isRunnable(){
if(this.model.equations.length === 0){
if (this.model.equations.length === 0) {
console.error(`No equations bound, did you run train()?`);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion test/recurrent/equation.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('equation', () => {
});
});
describe('inputMatrixToRow', () => {
context('run', () => {
context('runIndex', () => {
it('can properly split up a matrix', () => {
var input = new Matrix(2, 2);
/**
Expand Down
Loading

0 comments on commit 8d00448

Please sign in to comment.