Linear model options - Linear model options - 5.3 English - 68552

AOCL API Guide (68552)

Document_ID
68552
Release_Date
2026-05-13
Version
5.3 English

The available Python options are detailed in the aoclda.linear_model.linmod() class constructor.

Various options can be set to customize the linear models by calling one of these functions. The following table details the available options, where \(\epsilon\) represents the machine precision.

Table 4.27 Linear models options#

Option name

Type

Default

Description

Constraints

optim method

string

\(s=\) auto

Select optimization method to use.

\(s=\) auto, bfgs, cg, chol, cholesky, coord, lbfgs, lbfgsb, qr, sparse_cg, or svd.

scaling

string

\(s=\) auto

Scale or standardize feature matrix and response vector. Matrix is copied and then rescaled. Option key value auto indicates that rescaling type is chosen by the solver (this also includes no scaling).

\(s=\) auto, centering, no, none, scale, scale only, standardise, or standardize.

optim progress factor

real

\(r=\frac{10}{\sqrt{2\,\varepsilon}}\)

Factor used to detect convergence of the iterative optimization step. See option in the corresponding optimization solver documentation.

\(0 \le r\)

optim convergence tol

real

\(r=10^{-4}\)

Tolerance to declare convergence for the iterative optimization step. See option in the corresponding optimization solver documentation.

\(0 < r < 1\)

print options

string

\(s=\) no

Print options.

\(s=\) no, or yes.

lambda

real

\(r=0\)

Penalty coefficient for the regularization terms: lambda( (1-alpha)/2 L2 + alpha L1 ).

\(0 \le r\)

alpha

real

\(r=0\)

Coefficient of alpha in the regularization terms: lambda( (1-alpha)/2 L2 + alpha L1 ).

\(0 \le r \le 1\)

optim iteration limit

integer

\(i=10000\)

Maximum number of iterations to perform in the optimization phase. Valid only for iterative solvers, e.g. L-BFGS-B, Coordinate Descent, etc.

\(1 \le i\)

intercept

integer

\(i=0\)

Add intercept variable to the model.

\(0 \le i \le 1\)

print level

integer

\(i=0\)

Set level of verbosity for the solver.

\(0 \le i \le 5\)

check data

string

\(s=\) no

Check input data for NaNs prior to performing computation.

\(s=\) no, or yes.

storage order

string

\(s=\) column-major

Whether data is supplied and returned in row- or column-major order.

\(s=\) c, column-major, f, fortran, or row-major.

mixed precision

string

\(s=\) no

Whether to use mixed precision iterative refinement, in which lower precision arithmetic is used before switching to the working precision for the final iterations.

\(s=\) no, or yes.

low precision convergence tol

real

\(r=10^{-3}\)

If mixed precision iterative refinement is enabled, convergence tolerance for the low precision phase.

\(0 \le r\)

low precision iteration limit

integer

\(i=5000\)

If mixed precision iterative refinement is enabled, maximum number of iterations for the low precision phase.

\(1 \le i\)

For the complete list of optional parameters see linear model options.

The option mixed precision switches on an experimental mode for iterative methods (such as L-BFGS-B, coordinate descent and conjugate gradient) in which early iterations are performed in lower precision before refining the result in the working precision. The option low precision iteration limit sets the maximum number of iterations for the low-precision phase, and low precision convergence tol sets the convergence tolerance for the low-precision phase.