Extends
Methods
(static) load(path) → {module:eclairjs/mllib/classification.NaiveBayesModel}
Parameters:
Name | Type | Description |
---|---|---|
path |
Promise.<string> |
Returns:
(static) read() → {module:eclairjs/ml/util.MLReader}
Returns:
- Type
- module:eclairjs/ml/util.MLReader
copy(extra) → {module:eclairjs/mllib/classification.NaiveBayesModel}
Parameters:
Name | Type | Description |
---|---|---|
extra |
module:eclairjs/ml/param.ParamMap |
- Overrides:
- Source:
Returns:
featuresCol() → {module:eclairjs/ml/param.Param}
Param for features column name.
- Inherited From:
- Source:
Returns:
getFeaturesCol() → {string}
- Inherited From:
- Source:
Returns:
- Type
- string
getLabelCol() → {Promise.<string>}
- Inherited From:
- Source:
Returns:
- Type
- Promise.<string>
getModelType() → {Promise.<string>}
Returns:
- Type
- Promise.<string>
getPredictionCol() → {Promise.<string>}
- Inherited From:
- Source:
Returns:
- Type
- Promise.<string>
getRawPredictionCol() → {Promise.<string>}
Returns:
- Type
- Promise.<string>
getSmoothing() → {Promise.<Number>}
Returns:
- Type
- Promise.<Number>
hasParent() → {Promise.<boolean>}
Indicates whether this Model has a corresponding parent.
- Inherited From:
- Source:
Returns:
- Type
- Promise.<boolean>
labelCol() → {module:eclairjs/ml/param.Param}
Param for label column name.
- Inherited From:
- Source:
Returns:
modelType() → {module:eclairjs/ml/param.Param}
The model type which is a string (case-sensitive). Supported options: "multinomial" and "bernoulli". (default = multinomial)
Returns:
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/ml.Estimator}
- Inherited From:
- Source:
Returns:
pi() → {module:eclairjs/mllib/linalg.Vector}
Returns:
predictionCol() → {module:eclairjs/ml/param.Param}
Param for prediction column name.
- Inherited From:
- Source:
Returns:
rawPredictionCol() → {module:eclairjs/ml/param.Param}
Param for raw prediction (a.k.a. confidence) column name.
Returns:
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:
setRawPredictionCol(value) → {module:eclairjs/ml/classification.ClassificationModel}
Parameters:
Name | Type | Description |
---|---|---|
value |
string |
- Inherited From:
- Source:
Returns:
setThresholds(value) → {module:eclairjs/ml/classification.ProbabilisticClassificationModel}
Parameters:
Name | Type | Description |
---|---|---|
value |
Array.<number> |
- Inherited From:
- Source:
Returns:
smoothing() → {module:eclairjs/ml/param.DoubleParam}
The smoothing parameter. (default = 1.0).
Returns:
theta() → {module:eclairjs/mllib/linalg.Matrix}
Returns:
toString() → {Promise.<string>}
Returns:
- Type
- Promise.<string>
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
transformSchema(schema) → {module:eclairjs/sql/types.StructType}
Parameters:
Name | Type | Description |
---|---|---|
schema |
module:eclairjs/sql/types.StructType |
- Inherited From:
- Source:
Returns:
uid() → {Promise.<string>}
An immutable unique ID for the object and its derivatives.
Returns:
- Type
- Promise.<string>
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 |
- Overrides:
- Source:
Returns:
write() → {module:eclairjs/ml/util.MLWriter}
Returns:
- Type
- module:eclairjs/ml/util.MLWriter