# new Neural(fname)
Create a artificial neural network.
Note: Neural module must be loaded by calling LoadLibrary("neural") before using!
Parameters:
Name | Type | Description |
---|---|---|
fname |
string | file name of training data previously stored by Save() |
- See:
-
- LoadLibrary()
- Save()
Methods
# Run(inp) → {Array.<number>}
Run the network on some input and get a response.
Parameters:
Name | Type | Description |
---|---|---|
inp |
Array.<number> | DoubleArray | Input data. must contain at least the number of input values as specified when creating the ANN. |
The networks response to the input.
# Save(fname)
Store training data of the network to disk.
Parameters:
Name | Type | Description |
---|---|---|
fname |
string | The file name. |
# Train(inp, outp, rate)
Train the network with a single dataset.
Parameters:
Name | Type | Description |
---|---|---|
inp |
Array.<number> | DoubleArray | Input data. Must contain at least the number of input values as specified when creating the ANN. |
outp |
Array.<number> | DoubleArray | Expected output data. Must contain at least the number of output values as specified when creating the ANN. |
rate |
number | Learning rate (>0). |