# new Neural(inputs, num_hidden, hidden, outputs)
Create a artificial neural network.
Note: Neural module must be loaded by calling LoadLibrary("neural") before using!
Parameters:
Name | Type | Description |
---|---|---|
inputs |
number
|
size of input layer |
num_hidden |
number
|
number of hidden layers |
hidden |
number
|
size of the hidden layers |
outputs |
number
|
size of output layer |
- See:
-
- LoadLibrary()
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.
Array.<number>
# 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). |