Computation

Algorithm Input

The logistic loss algorithm accepts the input described below. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.

Input ID

Input

argument

Numeric table of size ( p + 1) x 1 with the input argument θ of the objective function.

Note

Sizes of argument, gradient, and hessian numeric tables do not depend on intercept flag. In case when intercept flag is set to false, computation of θ0 value will be skipped, but sizes of tables should remain the same.

data

Numeric table of size n x p with the data x ij . This parameter can be an object of any class derived from NumericTable.

dependentVariables

Numeric table of size n x 1 with dependent variables yi. This parameter can be an object of any class derived from NumericTable, except for PackedTriangularMatrix , PackedSymmetricMatrix , and CSRNumericTable.

Algorithm Parameters

The logistic loss algorithm has the following parameters. Some of them are required only for specific values of the computation method parameter method:

Parameter

Default Value

Description

algorithmFPType

float

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

method

defaultDense

Performance-oriented computation method.

numberOfTerms

Not applicable

The number of terms in the objective function.

batchIndices

NULL

The numeric table of size 1 x m, where m is the batch size, with a batch of indices to be used to compute the function results. If no indices are provided, the implementation uses all the terms in the computation.

This parameter can be an object of any class derived from NumericTable except PackedTriangularMatrix and PackedSymmetricMatrix .

resultsToCompute

gradient

The 64-bit integer flag that specifies which characteristics of the objective function to compute.

Provide one of the following values to request a single characteristic or use bitwise OR to request a combination of the characteristics:

value

Value of the objective function

nonSmoothTermValue

Value of non-smooth term of the objective function

gradient

Gradient of the smooth term of the objective function

hessian

Hessian of smooth term of the objective function

proximalProjection

Projection of proximal operator for non-smooth term of the objective function

lipschitzConstant

Lipschitz constant of the smooth term of the objective function

interceptFlag

true

A flag that indicates a need to compute θ0

penaltyL1

0

L1 regularization coefficient

penaltyL2

0

L2 regularization coefficient

Algorithm Output

For the output of the logistic loss algorithm, see Output for objective functions.

Examples

C++: sgd_log_loss_dense_batch.cpp

Java*: SgdLogLossDenseBatch.java

Python*: sgd_log_loss_dense_batch.py

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