IMSL C Stat Library
mlff_network_init
Initializes an Imsls_f_NN_Network data structure for use in training a neural network.
Synopsis
#include <imsls.h>
Imsls_f_NN_Network *imsls_f_mlff_network_init (int n_inputs, int n_outputs)
The type double function is imsls_d_mlff_network_init.
Required Arguments
int n_inputs (Input)
The number of network inputs. If the network uses nominal input attributes, the number of inputs equals the number of encoded columns used to represent these attributes plus the number of continuous and ordinal input attributes, if any.
int n_outputs (Input)
The number of network outputs. For neural networks used for forecasting continuous responses, n_outputs is equal to the number of variables being forecasted. Networks used for binary classification have only one output. Other classification networks have one output for every possible target category.
Return Value
An Imsls_f_NN_Network data structure initialized with the number of inputs and outputs specified by n_inputs and n_outputs. To release this space use imsls_f_mlff_network_free.
Description
The function imsls_f_mlff_network_init is used to initialize the network, the function imsls_f_mlff_network is used to build up the network in preparation for training, and the function imsls_f_mlff_network_free is used to free the internally allocated structure.
Function imsls_f_mlff_network_init initializes and returns an Imsls_f_NN_Network data structure.  This structure is required input to imsls_f_mlff_network and the network trainers. This function initializes the structure to accommodate a network with the number of inputs and outputs specified by n_inputs and n_outputs respectively. This function must be called prior to building the complete network architecture using imsls_f_mlff_network.
Function imsls_f_mlff_network modifies the structure initialized by this function and builds the network architecture consisting of hidden layers, perceptrons and links among these objects. This architecture is independent of the training data. Once the architecture is complete, the Imsls_f_NN_Network data structure can be used with imsls_f_mlff_network_trainer or imsls_f_classification_trainer to train the network.
After the network is trained, not only does the Imsls_f_NN_Network data structure contains a description of the network architecture, it also contains the network weights needed for neural network forecasting or classification.
Example
For details, see the Examples section of mlff_network.