Usage of Training Alternative

To build a Logistic Regression model using methods of the Model Builder class of Logistic Regression, complete the following steps:

  • Create a Logistic Regression model builder using a constructor with the required number of responses and features.
  • Use the setBeta method to add the set of pre-calculated coefficients to the model. Specify random access iterators to the first and the last element of the set of coefficients [ISO/IEC 14882:2011 §24.2.7].


    If your set of coefficients does not contain an intercept, interceptFlag is automatically set to False, and to True, otherwise.
  • Use the getModel method to get the trained Logistic Regression 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).


If after calling the getModel method you use the setBeta method to update coefficients, the initial model will be automatically updated with the new β coefficients.

Optimization Notice: 
For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)