Class: StochasticNetwork

StochasticNetwork

new StochasticNetwork()

Network that samples training data into mini batches, in order to learn more quickly with less processing without sacrificing significant accuracy.
Implements:
Source:

Methods

train(training_data, options) → {array}

Given training data, a number of epochs, and a learning rate, trains the network to more accurately predict correct outputs for given inputs. The second parameter accepts an object containing custom training settings, specifically: epochs: number of rounds to train against the data. Defaults to 20,000. learning_rate: value between 0 and 1 representing how quickly the network learns. Defaults to 0.3. threshold: error threshold. if the network attains an error rate under this threshold, it stops training early. Defaults to 0.005.
Parameters:
Name Type Description
training_data array array of [input, correct_output] pairs used to train the network
options object options object.
Implements:
Source:
Returns:
[i, error] where i is the number of iterations it took to reach the returned error rate
Type
array