To build a Multi-class Classifier model using methods of the Model Builder class of Multi-class Classifier, complete the following steps:
- Create a Multi-class Classifier model builder using a constructor with the required number of features and classes.
- Use the
setTwoClassClassifierModel method for each pair of classes to add the pre-trained two-class classifiers to the model. In the parameters to the method specify the classes' indices and the pointer to the pre-trained two-class classifier for this pair of classes. You need to do this for each pair of classes, because the One-Against-One strategy is used.
- Use the
getModel method to get the trained Multi-class Classifier model.
- Use the
getStatus method to check the status of the model building process. If
DAAL_NOTHROW_EXCEPTIONS macro is defined, the status report contains the list of errors that describe the problems API encountered (in case of API runtime failure).
Examples
C++:
Java*:
Python*: