ClassifySpectrum

Declaration: TRndForest.ClassifySpectrum (const Spec: TDoubleArray; const MetaData: TMetaData; var CFResult: TDoubleArray): integer;
The method ClassifySpectrum classifies a single spectrum which is contained in the parameter Spec. The parameter MetaData contains the corresponding meta information. The results of the classification are stored in the variable array CFResult which is automatically resized to hold the estimates for all defined classes (NClasses). Please note that the CFResult array is zero based (the index is class number - 1).

The function returns the following error codes:

 0 ... everything is OK, the spectrum has been classified
-1 ... the size of Spec does not match MetaData