Developer Guide for Intel® Data Analytics Acceleration Library 2019 Update 2

Batch Processing

Logistic regression algorithm follows the general workflow described in Training and Prediction > Classification > Usage Model

Training

For a description of the input and output, refer to Usage Model: Training and Prediction.

In addition to the parameters of classifier described in Training and Prediction > Classification > Usage Model, the logistic regression batch training algorithm has the following parameters:

Parameter

Default Value

Description

algorithmFPType

float

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

defaultDense

The computation method used by the decision forest regression. The only training method supported so far is the default dense method.

interceptFlag

True

A flag that indicates a need to compute θ0 j

penaltyL1

0

L1 regularization coefficient

penaltyL2

0

L2 regularization coefficient

optimizationSolver

SGD solver

Optimization procedure used at the training stage

Prediction

For a description of the input, refer to Usage Model: Training and Prediction.

A t the training stage logistic regression batch algorithm has the following parameters:

Parameter

Default Value

Description

algorithmFPType

float

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

defaultDense

The computation method used by the decision forest regression. The only training method supported so far is the default dense method.

resultsToCompute

computeClassesLabels

The 64-bit integer flag that specifies which extra characteristics of the logistic regression to compute. Provide one of the following values to request a single characteristic or use bitwise OR to request a combination of the characteristics:

  • computeClassesLabels
  • computeClassesProbabilities
  • computeClassesLogProbabilities

Output

In addition to classifier output, logistic regression prediction calculates the result described below. Pass the Result ID as a parameter to the methods that access the results of your algorithm. For more details, seeAlgorithms.

Result ID

Result

probabilities

Numeric table of size:

  • n x 1, if nClasses = 2
  • n x nClasses, if nClasses > 2
containing probabilities of classes computed when computeClassesProbabilities option is enabled. In case nClasses = 2, the table contains probabilities of class "1. By default, this result is an object of the HomogenNumericTable class, but you can define the result as an object of any class derived from NumericTable except for PackedSymmetricMatrix and PackedTriangularMatrix.

logProbabilities

Numeric table of size:
  • n x 1, if nClasses = 2
  • n x nClasses, if nClasses > 2

containing logarithms of classes' probabilities computed when computeClassesLogProbabilities option is enabled. In case nClasses = 2 the table contains logarithms of class "1" probabilities. By default, this result is an object of the HomogenNumericTable class, but you can define the result as an object of any class derived from NumericTable except for PackedSymmetricMatrix and PackedTriangularMatrix.

Examples

C++:

Java*:

Python*: