Class: LogisticRegression

eclairjs/ml/classification.LogisticRegression

Logistic regression. Currently, this class only supports binary classification. It will support multiclass in the future.

Constructor

new LogisticRegression(uidopt)

Parameters:
Name Type Attributes Description
uid string <optional>
Source:

Extends

Methods

(static) load(path) → {module:eclairjs/ml/classification.LogisticRegression}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

copy(extra) → {module:eclairjs/ml/classification.LogisticRegression}

Parameters:
Name Type Description
extra module:eclairjs/ml/param.ParamMap
Overrides:
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

explainParams() → {Promise.<string>}

FIXME from Param
Source:
Returns:
Type
Promise.<string>

extractParamMap() → {module:eclairjs/ml/param.ParamMap}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.ParamMap

fit(dataset, paramMapopt) → {module:eclairjs/ml/classification.LogisticRegressionModel}

Fits a model to the input data.
Parameters:
Name Type Attributes Description
dataset module:eclairjs/sql.DataFrame
paramMap module:eclairjs/ml/param.ParamMap <optional>
Parameter map. These values override any specified in this Estimator's embedded ParamMap.
Overrides:
Source:
Returns:
fitted model
Type
module:eclairjs/ml/classification.LogisticRegressionModel

getThreshold() → {Promise.<float>}

Source:
Returns:
Type
Promise.<float>

getThresholds() → {Promise.<Array.<float>>}

Source:
Returns:
Type
Promise.<Array.<float>>

maxIter() → {module:eclairjs/ml/param.Param}

Source:
Returns:
Type
module:eclairjs/ml/param.Param

probabilityCol() → {module:eclairjs/ml/param.Param}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

regParam() → {module:eclairjs/ml/param.Param}

Source:
Returns:
Type
module:eclairjs/ml/param.Param

setElasticNetParam(value) → {module:eclairjs/ml/classification.LogisticRegression}

Set the ElasticNet mixing parameter. For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty. For 0 < alpha < 1, the penalty is a combination of L1 and L2. Default is 0.0 which is an L2 penalty.
Parameters:
Name Type Description
value float
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setFeaturesCol(value) → {module:eclairjs/ml.Predictor}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.Predictor

setFitIntercept(value) → {module:eclairjs/ml/classification.LogisticRegression}

Whether to fit an intercept term. Default is true.
Parameters:
Name Type Description
value boolean
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setLabelCol(value) → {module:eclairjs/ml.Predictor}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.Predictor

setMaxIter(value) → {module:eclairjs/ml/classification.LogisticRegression}

Set the maximum number of iterations. Default is 100.
Parameters:
Name Type Description
value integer
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setPredictionCol(value) → {module:eclairjs/ml.Predictor}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml.Predictor

setProbabilityCol(value) → {object}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
object

setRawPredictionCol(value) → {module:eclairjs/ml/classification.Classifier}

Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/classification.Classifier

setRegParam(value) → {module:eclairjs/ml/classification.LogisticRegression}

Set the regularization parameter. Default is 0.0.
Parameters:
Name Type Description
value float
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setStandardization(value) → {module:eclairjs/ml/classification.LogisticRegression}

Whether to standardize the training features before fitting the model. The coefficients of models will be always returned on the original scale, so it will be transparent for users. Note that with/without standardization, the models should be always converged to the same solution when no regularization is applied. In R's GLMNET package, the default behavior is true as well. Default is true.
Parameters:
Name Type Description
value boolean
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setThreshold(value) → {module:eclairjs/ml/classification.LogisticRegression}

Parameters:
Name Type Description
value float
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setThresholds(value) → {module:eclairjs/ml/classification.LogisticRegression}

Parameters:
Name Type Description
value Array.<float>
Overrides:
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setTol(value) → {module:eclairjs/ml/classification.LogisticRegression}

Set the convergence tolerance of iterations. Smaller value will lead to higher accuracy with the cost of more iterations. Default is 1E-6.
Parameters:
Name Type Description
value float
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

setWeightCol(value) → {module:eclairjs/ml/classification.LogisticRegression}

Whether to over-/under-sample training instances according to the given weights in weightCol. If not set or empty String, all instances are treated equally (weight 1.0). Default is not set, so all instances have weight one.
Parameters:
Name Type Description
value string
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegression

threshold() → {module:eclairjs/ml/param.Param}

Source:
Returns:
Type
module:eclairjs/ml/param.Param

thresholds() → {module:eclairjs/ml/param.Param}

Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

transformSchema(schema) → {module:eclairjs/sql/types.StructType}

Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
Inherited From:
Source:
Returns:
Type
module:eclairjs/sql/types.StructType

uid() → {Promise.<string>}

An immutable unique ID for the object and its derivatives.
Source:
Returns:
Type
Promise.<string>