CNL Stat : Data Mining : kohonenSOM_forecast
kohonenSOM_forecast
Calculates forecasts using a trained Kohonen network.
Synopsis
#include <imsls.h>
int *imsls_f_kohonenSOM_forecast (Imsls_f_kohonenSOM *kohonen, int nobs, float data[], ..., 0)
The type double function is imsls_d_kohonenSOM_forecast.
Required Arguments
Imsls_f_kohonenSOM *kohonen (Input)
Pointer to a structure of type Imsls_f_kohonenSOM containing the trained Kohonen network. See the Remarks section of imsls_f_kohonenSOM_trainer for a description of this structure.
int nobs (Input)
The number of observations in data. nobs must be greater than zero.
float data[] (Input)
An nobs × dim array containing the input data for forecasts, where dim is the number of weights for each node in the node grid specified during training.
Return Value
An nobs × 2 array containing the (ij) index of the winning nodes for the input data. This space can be released by using the imsls_free function.
Synopsis with Optional Arguments
#include <imsls.h>
int *imsls_f_kohonenSOM_forecast (Imsls_f_kohonenSOM *kohonen, int nobs, float data[],
IMSLS_RETURN_USER, int forecasts[],
0)
Optional Arguments
IMSLS_RETURN_USER, int forecasts[] (Output)
If specified, the forecasts are returned in the user-supplied array forecasts.
Description
Function imsls_f_kohonenSOM_forecast calculates forecasts for a previously trained Kohonen network from imsls_f_kohonenSOM_trainer. The structure Imsls_f_kohonenSOM describes the network structure used to originally train the network. The weights, which are the key output from training, are used as input to this function. The weights are stored in the Imsls_f_kohonenSOM structure.
Example
Output