Class: LogisticRegressionModel

eclairjs/ml/classification.LogisticRegressionModel

Constructor

new LogisticRegressionModel()

Source:

Extends

Methods

(static) load(path) → {module:eclairjs/mllib/classification.LogisticRegressionModel}

Parameters:
Name Type Description
path string
Source:
Returns:
Type
module:eclairjs/mllib/classification.LogisticRegressionModel

(static) read() → {MLReader}

Source:
Returns:
Type
MLReader

coefficients() → {module:eclairjs/mllib/linalg.Vector}

Source:
Returns:
Type
module:eclairjs/mllib/linalg.Vector

copy(extra) → {module:eclairjs/mllib/classification.LogisticRegressionModel}

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

evaluate(dataset) → {LogisticRegressionSummary}

Evaluates the model on a test dataset.
Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset Test dataset to evaluate model on.
Source:
Returns:
Type
LogisticRegressionSummary

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

Param for features column name.
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

getFeaturesCol() → {string}

Inherited From:
Source:
Returns:
Type
string

getLabelCol() → {Promise.<string>}

Inherited From:
Source:
Returns:
Type
Promise.<string>

getPredictionCol() → {Promise.<string>}

Inherited From:
Source:
Returns:
Type
Promise.<string>

getThreshold() → {Promise.<number>}

Source:
Returns:
Type
Promise.<number>

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

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

hasParent() → {Promise.<boolean>}

Indicates whether this Model has a corresponding parent.
Inherited From:
Source:
Returns:
Type
Promise.<boolean>

hasSummary() → {Promise.<boolean>}

Indicates whether a training summary exists for this model instance.
Source:
Returns:
Type
Promise.<boolean>

intercept() → {Promise.<number>}

Source:
Returns:
Type
Promise.<number>

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

Param for label column name.
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

numClasses() → {Promise.<number>}

Number of classes (values which the label can take).
Inherited From:
Source:
Returns:
Type
Promise.<number>

numFeatures() → {Promise.<number>}

Returns the number of features the model was trained on. If unknown, returns -1
Inherited From:
Source:
Returns:
Type
Promise.<number>

parent() → {module:eclairjs/mllib/classification.LogisticRegression}

Overrides:
Source:
Returns:
Type
module:eclairjs/mllib/classification.LogisticRegression

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

Param for prediction column name.
Inherited From:
Source:
Returns:
Type
module:eclairjs/ml/param.Param

setFeaturesCol(value) → {object}

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

setParent(parent) → {object}

Sets the parent of this model.
Parameters:
Name Type Description
parent module:eclairjs/ml.Estimator
Inherited From:
Source:
Returns:
Type
object

setPredictionCol(value) → {object}

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

setProbabilityCol(value) → {module:eclairjs/ml/classification.ProbabilisticClassificationModel}

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

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

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

setThreshold(value) → {module:eclairjs/mllib/classification.LogisticRegressionModel}

Parameters:
Name Type Description
value number
Source:
Returns:
Type
module:eclairjs/mllib/classification.LogisticRegressionModel

setThresholds(value) → {module:eclairjs/mllib/classification.LogisticRegressionModel}

Parameters:
Name Type Description
value Array.<number>
Overrides:
Source:
Returns:
Type
module:eclairjs/mllib/classification.LogisticRegressionModel

summary() → {module:eclairjs/ml/classification.LogisticRegressionTrainingSummary}

Gets summary of model on training set. An exception is thrown if `trainingSummary == None`.
Source:
Returns:
Type
module:eclairjs/ml/classification.LogisticRegressionTrainingSummary

transform(dataset) → {module:eclairjs/sql.Dataset}

Transforms dataset by reading from featuresCol, and appending new columns as specified by parameters: - predicted labels as [[predictionCol]] of type Double - raw predictions (confidences) as [[rawPredictionCol]] of type Vector - probability of each class as [[probabilityCol]] of type Vector.
Parameters:
Name Type Description
dataset module:eclairjs/sql.Dataset input dataset
Inherited From:
Source:
Returns:
transformed dataset
Type
module:eclairjs/sql.Dataset

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

validateAndTransformSchema(schema, fitting, featuresDataType) → {module:eclairjs/sql/types.StructType}

Validates and transforms the input schema with the provided param map.
Parameters:
Name Type Description
schema module:eclairjs/sql/types.StructType
fitting boolean whether this is in fitting
featuresDataType module:eclairjs/sql/types.DataType SQL DataType for FeaturesType. E.g., module:eclairjs/sql/types.VectorUDTfor vector features
Inherited From:
Source:
Returns:
Type
module:eclairjs/sql/types.StructType

write() → {MLWriter}

Returns a MLWriter instance for this ML instance. For [[LogisticRegressionModel]], this does NOT currently save the training summary. An option to save summary may be added in the future. This also does not save the parent currently.
Source:
Returns:
Type
MLWriter