It is strongly recommended to express MVAModel parameters in terms of high level types, for example, a spectrometer produces spectra that are YArrayItemType. The address space should expose a single parameter for it rather than N scalar values where N is the number of data points in the spectrum. This may imply that models shall be built using some convention rules, but doing so, really simplify the interaction with the prediction service of the ADI server. For example:

  • If all scalar variables defining an YArrayItemType are prefixed with something like "NIR_", then the SetConfiguration, LoadModel may easily detect it and create the right parameter type.
  • Use a convention where the first variable is the MainData variable or prefixing the MainData variable variables with the "MainData_" prefix may help to automatically find the MainDataIndex.

The Predict method should be able to extract the required range from a high level type input parameter. For example, if the input parameter is a spectrum with a X axis range of 400cm-1 to 5000cm-1, it shall be possible to pass a spectrum with a range of 200cm-1 to 6000cm-1 to the Predict method and the Predict method shall be able to extract the right region.

To guarantee the correctness of the predictions, the server should apply some validation rules to verify that the input parameters are compatible with the model, for example, for spectral data, the validation may include:

  • The alignment of the sampling grid of spectral data shall be compatible with the model.
  • The spectral range of the input spectrum is wide enough to cover the range expected by the model.

Inputs and Outputs parameters shall not be a brutal dump of the API of the vendor predictor, but rather express in terms of what an end user needs to see. It does not forbid exposing the API structures, but often these structures are very difficult to use for "process clients" like DCS or SCADA.