Supported Optional Parameters#

Note

This page lists optional parameters for C APIs only.

In all the following tables, \(\varepsilon\), refers to a safe machine precision (twice the actual machine precision) for the given floating point data type.

Linear models#

The following options are supported.

Table of options for Linear models.#

Option name

Type

Default

Description

Constraints

print level

integer

\(i=0\)

Set level of verbosity for the solver.

\(0 \le i \le 5\)

optim convergence tol

real

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

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

\(0 < r < 1\)

intercept

integer

\(i=0\)

Add intercept variable to the model.

\(0 \le i \le 1\)

optim method

string

\(s=\) auto

Select optimization method to use.

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

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\)

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.

print options

string

\(s=\) no

Print options.

\(s=\) no, or yes.

optim coord skip min

integer

\(i=2\)

Minimum times a coordinate change is smaller than coord skip tol to start skipping.

\(2 \le i\)

optim coord skip max

integer

\(i=100\)

Maximum times a coordinate can be skipped, after this the coordinate is checked.

\(10 \le i\)

debug

integer

\(i=0\)

Set debug level (internal use).

\(0 \le i \le 3\)

logistic constraint

string

\(s=\) ssc

Affects only multinomial logistic regression. Type of constraint put on coefficients. This will affect number of coefficients returned. RSC - means we choose a reference category whose coefficients will be set to all 0. This results in K-1 class coefficients for problems with K classes. SSC - means the sum of coefficients class-wise for each feature is 0. It will result in K class coefficients for problems with K classes.

\(s=\) reference category, rsc, ssc, symmetric, or symmetric side.

optim time limit

real

\(r=10^6\)

Maximum time limit (in seconds). Solver will exit with a warning after this limit. Valid only for iterative solvers, e.g. L-BFGS-B, Coordinate Descent, etc.

\(0 < r\)

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 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\)

Principal component analysis#

The following options are supported.

Table of options for Principal component analysis.#

Option name

Type

Default

Description

Constraints

svd solver

string

\(s=\) auto

Which LAPACK routine to use for the underlying singular value decomposition.

\(s=\) auto, gesdd, gesvd, gesvdx, or syevd.

degrees of freedom

string

\(s=\) unbiased

Whether to use biased or unbiased estimators for standard deviations and variances.

\(s=\) biased, or unbiased.

pca method

string

\(s=\) covariance

Compute PCA based on the covariance or correlation matrix.

\(s=\) correlation, covariance, or svd.

store u

integer

\(i=0\)

Whether or not to store the matrix U from the SVD.

\(0 \le i \le 1\)

n_components

integer

\(i=1\)

Number of principal components to compute. If 0, then all components will be kept.

\(0 \le i\)

k-means clustering#

The following options are supported.

Table of options for k-means clustering.#

Option name

Type

Default

Description

Constraints

algorithm

string

\(s=\) lloyd

Choice of underlying k-means algorithm.

\(s=\) elkan, hartigan-wong, lloyd, or macqueen.

initialization method

string

\(s=\) random

How to determine the initial cluster centres.

\(s=\) k-means++, random, random partitions, or supplied.

convergence tolerance

real

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

Convergence tolerance.

\(0 \le r\)

seed

integer

\(i=0\)

Seed for random number generation; set to -1 for non-deterministic results.

\(-1 \le i\)

max_iter

integer

\(i=300\)

Maximum number of iterations.

\(1 \le i\)

n_init

integer

\(i=10\)

Number of runs with different random seeds (ignored if you have specified initial cluster centres).

\(1 \le i\)

n_clusters

integer

\(i=1\)

Number of clusters required.

\(1 \le i\)

Decision trees#

The following options are supported.

Table of options for Decision trees.#

Option name

Type

Default

Description

Constraints

minimum split improvement

real

\(r=0.03\)

Minimum score improvement needed to consider a split from the parent node.

\(0 \le r\)

minimum split score

real

\(r=0.03\)

Minimum score needed for a node to be considered for splitting.

\(0 \le r \le 1\)

tree building order

string

\(s=\) depth first

Select in which order to explore the nodes.

\(s=\) breadth first, or depth first.

feature threshold

real

\(r=1e-06\)

Minimum difference in feature value required for splitting.

\(0 \le r\)

maximum features

integer

\(i=0\)

Set the number of features to consider when splitting a node. 0 means take all the features.

\(0 \le i\)

print timings

string

\(s=\) no

Print the timings of different parts of the fitting process.

\(s=\) no, or yes.

seed

integer

\(i=-1\)

Set the random seed for the random number generator. If the value is -1, a random seed is automatically generated. In this case the resulting classification will create non-reproducible results.

\(-1 \le i\)

maximum depth

integer

\(i=29\)

Set the maximum depth of trees.

\(0 \le i \le 29\)

predict probabilities

integer

\(i=1\)

evaluate class probabilities (in addition to class predictions).Needs to be 1 if calls to predict_proba or predict_log_probaare made after fit.

\(0 \le i \le 1\)

node minimum samples

integer

\(i=2\)

The minimum number of samples required to split an internal node.

\(2 \le i\)

scoring function

string

\(s=\) gini

Select scoring function to use.

\(s=\) cross-entropy, entropy, gini, misclass, misclassification, or misclassification-error.

Decision forests#

The following options are supported.

Table of options for Decision forests.#

Option name

Type

Default

Description

Constraints

block size

integer

\(i=256\)

Set the size of the blocks for parallel computations.

\(1 \le i \le 2147483647\)

node minimum samples

integer

\(i=2\)

Minimum number of samples to consider a node for splitting.

\(2 \le i\)

scoring function

string

\(s=\) gini

Select scoring function to use.

\(s=\) cross-entropy, entropy, gini, misclass, misclassification, or misclassification-error.

maximum depth

integer

\(i=29\)

Set the maximum depth of trees.

\(0 \le i \le 29\)

seed

integer

\(i=-1\)

Set random seed for the random number generator. If the value is -1, a random seed is automatically generated. In this case the resulting classification will create non-reproducible results.

\(-1 \le i\)

tree building order

string

\(s=\) depth first

Select in which order to explore the nodes.

\(s=\) breadth first, or depth first.

feature threshold

real

\(r=1e-06\)

Minimum difference in feature value required for splitting.

\(0 \le r\)

bootstrap

string

\(s=\) yes

Select whether to bootstrap the samples in the trees.

\(s=\) no, or yes.

bootstrap samples factor

real

\(r=0.8\)

Proportion of samples to draw from the data set to build each tree if ‘bootstrap’ was set to ‘yes’.

\(0 < r \le 1\)

features selection

string

\(s=\) sqrt

Select how many features to use for each split.

\(s=\) all, custom, log2, or sqrt.

number of trees

integer

\(i=100\)

Set the number of trees to compute.

\(1 \le i\)

minimum split score

real

\(r=0.03\)

Minimum score needed for a node to be considered for splitting.

\(0 \le r \le 1\)

maximum features

integer

\(i=0\)

Set the number of features to consider when splitting a node. 0 means take all the features.

\(0 \le i\)

minimum split improvement

real

\(r=0.03\)

Minimum score improvement needed to consider a split from the parent node.

\(0 \le r\)

k-nearest neighbors#

The following options are supported.

Table of options for k-nearest neighbors.#

Option name

Type

Default

Description

Constraints

weights

string

\(s=\) uniform

Weight function used to compute the k-nearest neighbors.

\(s=\) distance, or uniform.

metric

string

\(s=\) euclidean

Metric used to compute the pairwise distance matrix.

\(s=\) euclidean, or sqeuclidean.

algorithm

string

\(s=\) brute

Algorithm used to compute the k-nearest neighbors.

\(s=\) brute.

number of neighbors

integer

\(i=5\)

Number of neighbors considered for k-nearest neighbors.

\(1 \le i\)

Datastore handle da_datastore#

The following options are supported.

Table of options for da_datastore.#

Option name

Type

Default

Description

Constraints

csv integers as floats

integer

\(i=0\)

Whether or not to interpret integers as floating point numbers when using autodetection.

\(0 \le i \le 1\)

csv datastore precision

string

\(s=\) double

The precision used when reading floating point numbers using autodetection.

\(s=\) double, or single.

csv use header row

integer

\(i=0\)

Whether or not to interpret the first row as a header.

\(0 \le i \le 1\)

csv warn for missing data

integer

\(i=0\)

If set to 0, return error if missing data is encountered; if set to 1, issue a warning and store missing data as either a NaN (for floating point data) or the maximum value of the integer type being used.

\(0 \le i \le 1\)

csv skip footer

integer

\(i=0\)

Whether or not to ignore the last line when reading a CSV file.

\(0 \le i \le 1\)

csv delimiter

string

\(s=\) ,

The delimiter used when reading CSV files.

csv whitespace delimiter

integer

\(i=0\)

Whether or not to use whitespace as the delimiter when reading CSV files.

\(0 \le i \le 1\)

csv decimal

string

\(s=\) .

The character used to denote a decimal point in CSV files.

csv skip initial space

integer

\(i=0\)

Whether or not to ignore initial spaces in CSV file lines.

\(0 \le i \le 1\)

csv line terminator

string

empty

The character used to denote line termination in CSV files (leave this empty to use the default).

csv row start

integer

\(i=0\)

Ignore the specified number of lines from the top of the file (note that line numbers in CSV files start at 1).

\(0 \le i\)

csv comment

string

\(s=\) #

The character used to denote comments in CSV files (note, if a line in a CSV file is to be interpreted as only containing a comment, the comment character should be the first character on the line).

csv quote character

string

\(s=\) “

The character used to denote quotations in CSV files.

csv scientific notation character

string

\(s=\) e

The character used to denote powers of 10 in floating point values in CSV files.

csv escape character

string

\(s=\) \

The escape character in CSV files.

csv thousands

string

empty

The character used to separate thousands when reading numeric values in CSV files.

csv skip rows

string

empty

A comma- or space-separated list of rows to ignore in CSV files.

csv datatype

string

\(s=\) auto

If a CSV file is known to be of a single datatype, set this option to disable autodetection and make reading the file quicker.

\(s=\) auto, boolean, double, float, integer, or string.

csv data storage

string

\(s=\) column major

Whether to store data from CSV files in row or column major format.

\(s=\) column major, or row major.

csv skip empty lines

integer

\(i=0\)

Whether or not to ignore empty lines in CSV files (note that caution should be used when using this in conjunction with options such as CSV skip rows since line numbers may no longer correspond to the original line numbers in the CSV file).

\(0 \le i \le 1\)

csv double quote

integer

\(i=0\)

Whether or not to interpret two consecutive quotechar characters within a field as a single quotechar character.

\(0 \le i \le 1\)