Class: MultilayerPerceptronClassifier

eclairjs/ml/classification. MultilayerPerceptronClassifier

Classifier trainer based on the Multilayer Perceptron. Each layer has sigmoid activation function, output layer has softmax. Number of inputs has to be equal to the size of feature vectors. Number of outputs has to be equal to the total number of labels.

Constructor

new MultilayerPerceptronClassifier(uidopt)

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

Extends

Methods

blockSize() → {module:eclairjs/ml/param.IntArrayParam}

Block size for stacking input data in matrices to speed up the computation. Data is stacked within partitions. If block size is more than remaining data in a partition then it is adjusted to the size of this data. Recommended size is between 10 and 1000. Default: 128
Source:
Returns:
Type
module:eclairjs/ml/param.IntArrayParam

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

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

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

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

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

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

fit(dataset, paramMapopt) → {module:eclairjs/ml.Estimator|module:eclairjs/ml/feature.Bucketizer}

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

getBlockSize() → {integer}

Source:
Returns:
Type
integer

getFeaturesCol() → {string}

Source:
Returns:
Type
string

getLabelCol() → {string}

Source:
Returns:
Type
string

getLayers() → {Array.<integer>}

Source:
Returns:
Type
Array.<integer>

getPredictionCol() → {string}

Source:
Returns:
Type
string

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

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

layers() → {module:eclairjs/ml/param.IntArrayParam}

Layer sizes including input size and output size. Default: Array(1, 1)
Source:
Returns:
Type
module:eclairjs/ml/param.IntArrayParam

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

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

setBlockSize(value) → {module:eclairjs/ml/classification.MultilayerPerceptronClassifier}

Parameters:
Name Type Description
value integer
Source:
Returns:
Type
module:eclairjs/ml/classification.MultilayerPerceptronClassifier

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

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

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

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

setLayers(value) → {module:eclairjs/ml/classification.MultilayerPerceptronClassifier}

Parameters:
Name Type Description
value Array.<integer>
Source:
Returns:
Type
module:eclairjs/ml/classification.MultilayerPerceptronClassifier

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

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

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

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

setSeed(value) → {module:eclairjs/ml/classification.MultilayerPerceptronClassifier}

Set the seed for weights initialization.
Parameters:
Name Type Description
value integer
Source:
Returns:
Type
module:eclairjs/ml/classification.MultilayerPerceptronClassifier

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

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

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() → {string}

An immutable unique ID for the object and its derivatives.
Source:
Returns:
Type
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
Source:
Returns:
Type
module:eclairjs/sql/types.StructType