NeuralNetwork
Class representing a Neural Network
Constructor Summary
Public Constructor | ||
public |
constructor(inputNodes: Int, hiddenNodes: Int, outputNodes: Int, learningRate: Int) Create a NeuralNetwork |
Method Summary
Public Methods | ||
public |
Returns a copy of the NeuralNetwork |
|
public |
Evaluate inputs based on the current state of the NeuralNetwork |
|
public |
Train the NeuralNetwork |
Public Constructors
public constructor(inputNodes: Int, hiddenNodes: Int, outputNodes: Int, learningRate: Int) source
Create a NeuralNetwork
Params:
Name | Type | Attribute | Description |
inputNodes | Int | The number of input nodes |
|
hiddenNodes | Int | The number of hidden nodes |
|
outputNodes | Int | The number of output nodes |
|
learningRate | Int | The learning rate for training |
Public Methods
public eval(inputArr: array[number]): object source
Evaluate inputs based on the current state of the NeuralNetwork
Params:
Name | Type | Attribute | Description |
inputArr | array[number] | A single dimensional array of number inputs |
Return:
object | An object containing matricies representing the input, hidden node outputs, and final outputs |
public train(inputArr: array[number], targetArr: array[number]): object source
Train the NeuralNetwork
Params:
Name | Type | Attribute | Description |
inputArr | array[number] | A single dimensional array of number inputs |
|
targetArr | array[number] | A single dimensional array of numbers representing expected outputs |
Return:
object | An object containing properties representing errors between the Network's output and target outputs and errors in the hidden node layer |