# Logistic Regression Details

`feature vectors ofn`

`n`

`-dimensional feature vectors a vector of class labelsp`

*= (y*

*y*

_{1},…,

*), wherey*

_{n}

*∈ {0, 1, ...,y*

_{i}

*- 1} andK*

*is the number of classes, describes the class to which the feature vectorK*

*belongs, the problem is to train a logistic regression model.x*

_{i}

_{ 1},…,x

_{ p}) and class label y ∈ {0, 1, ...,

*- 1} for each k =0,…,K-1. [Hastie2009].K*

** Training Stage**

** Training Stage**

`values),β`

*λ*

_{1}and

*λ*

_{2}are non-negative regularization parameters applied to L1 and L2 norm of vectors in β.

`. See Analysis > Optimization Solvers > Iterative Solversdaal::algorithms::iterative_solver`

** Prediction Stage**

** Prediction Stage**

*x*

_{1}, ...,

*x*

_{r}, the problem is to calculate the responses for those vectors, and their probabilities and logarithms of probabilities if required. The computation is based on formula (1) in multinomial case and on formula (2) in binary case.

## Training Alternative

_{ij}}, you can use the Model Builder class to get a trained Intel DAAL Logistic Regression model with these coefficients. After the model is built, you can proceed to the prediction stage.

`vectorsK`

_{i}, where

`is the number of responses, or a single vectorK`

_{0}(if there are only two classes). If the number of classes is equal to two, vector

_{0}contains coefficients corresponding to the class with label

`=1. Each vectory`

_{i}should be either of dimension

`+1 (for vectors that include an intercept) or of dimensionp`

`otherwise, wherep`

`is the number of features. Note that the intercept value is stored as the zeroth component ofp`

_{i}.