Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-replace-private-preview-badge-man.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
stochasticLogisticRegression
Introduced in: v20.1.0 This function implements stochastic logistic regression. It can be used for binary classification problem, supports the same custom parameters asstochasticLinearRegression and works the same way.
Usage
The function is used in two steps:
- Fitting
train_data table.
The number of parameters is not fixed, it depends only on the number of arguments passed into logisticRegressionState.
They all must be numeric values.
Note that the column with target value (which we would like to learn to predict) is inserted as the first argument.
Predicted labels have to be in [-1, 1].
- Predicting
1.
evalMLMethod is an AggregateFunctionState object, next are columns of features.
We can also set a bound of probability, which assigns elements to different labels.
test_data is a table like train_data but may not contain target value.
Syntax
learning_rate— The coefficient on step length when gradient descent step is performed. A learning rate that is too big may cause infinite weights of the model. Default is0.00001.Float64l2_regularization_coef— L2 regularization coefficient which may help to prevent overfitting. Default is0.1.Float64mini_batch_size— Sets the number of elements which gradients will be computed and summed to perform one step of gradient descent. Pure stochastic descent uses one element, however having small batches (about 10 elements) makes gradient steps more stable. Default is15.UInt64method— Method for updating weights:Adam(by default),SGD,Momentum,Nesterov.MomentumandNesterovrequire a little bit more computations and memory, however they happen to be useful in terms of speed of convergence and stability of stochastic gradient methods.Stringtarget— Target binary classification labels. Must be in range [-1, 1].Floatx1, x2, ...— Feature values (independent variables). All must be numeric.Float
evalMLMethod for predictions which returns probabilities of object having label 1. Array(Float64)
Examples
Training a model
Query
Response
Query
Response
Query
Response