public class MultilayerPerceptronClassifier extends ProbabilisticClassifier<Vector,MultilayerPerceptronClassifier,MultilayerPerceptronClassificationModel> implements MultilayerPerceptronParams, DefaultParamsWritable
Constructor and Description |
---|
MultilayerPerceptronClassifier() |
MultilayerPerceptronClassifier(String uid) |
Modifier and Type | Method and Description |
---|---|
IntParam |
blockSize()
Param for block size for stacking input data in matrices.
|
MultilayerPerceptronClassifier |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
Param<Vector> |
initialWeights()
The initial weights of the model.
|
IntArrayParam |
layers()
Layer sizes including input size and output size.
|
static MultilayerPerceptronClassifier |
load(String path) |
IntParam |
maxIter()
Param for maximum number of iterations (>= 0).
|
static MLReader<T> |
read() |
LongParam |
seed()
Param for random seed.
|
MultilayerPerceptronClassifier |
setBlockSize(int value)
Sets the value of param
blockSize . |
MultilayerPerceptronClassifier |
setInitialWeights(Vector value)
Sets the value of param
initialWeights . |
MultilayerPerceptronClassifier |
setLayers(int[] value)
Sets the value of param
layers . |
MultilayerPerceptronClassifier |
setMaxIter(int value)
Set the maximum number of iterations.
|
MultilayerPerceptronClassifier |
setSeed(long value)
Set the seed for weights initialization if weights are not set
|
MultilayerPerceptronClassifier |
setSolver(String value)
Sets the value of param
solver . |
MultilayerPerceptronClassifier |
setStepSize(double value)
Sets the value of param
stepSize (applicable only for solver "gd"). |
MultilayerPerceptronClassifier |
setTol(double value)
Set the convergence tolerance of iterations.
|
Param<String> |
solver()
The solver algorithm for optimization.
|
DoubleParam |
stepSize()
Param for Step size to be used for each iteration of optimization (> 0).
|
DoubleParam |
tol()
Param for the convergence tolerance for iterative algorithms (>= 0).
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
probabilityCol, setProbabilityCol, setThresholds, thresholds
rawPredictionCol, setRawPredictionCol
featuresCol, fit, labelCol, predictionCol, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
params
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInitialWeights, getLayers
validateAndTransformSchema
extractInstances
extractInstances, extractInstances
getLabelCol, labelCol
featuresCol, getFeaturesCol
getPredictionCol, predictionCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
toString
getRawPredictionCol, rawPredictionCol
getProbabilityCol, probabilityCol
getThresholds, thresholds
getMaxIter
getStepSize
getBlockSize
write
save
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public MultilayerPerceptronClassifier(String uid)
public MultilayerPerceptronClassifier()
public static MultilayerPerceptronClassifier load(String path)
public static MLReader<T> read()
public final IntArrayParam layers()
MultilayerPerceptronParams
layers
in interface MultilayerPerceptronParams
public final Param<String> solver()
MultilayerPerceptronParams
solver
in interface MultilayerPerceptronParams
solver
in interface HasSolver
public final Param<Vector> initialWeights()
MultilayerPerceptronParams
initialWeights
in interface MultilayerPerceptronParams
public final IntParam blockSize()
HasBlockSize
blockSize
in interface HasBlockSize
public DoubleParam stepSize()
HasStepSize
stepSize
in interface HasStepSize
public final DoubleParam tol()
HasTol
public final IntParam maxIter()
HasMaxIter
maxIter
in interface HasMaxIter
public final LongParam seed()
HasSeed
public String uid()
Identifiable
uid
in interface Identifiable
public MultilayerPerceptronClassifier setLayers(int[] value)
layers
.
value
- (undocumented)public MultilayerPerceptronClassifier setBlockSize(int value)
blockSize
.
Default is 128.
value
- (undocumented)public MultilayerPerceptronClassifier setSolver(String value)
solver
.
Default is "l-bfgs".
value
- (undocumented)public MultilayerPerceptronClassifier setMaxIter(int value)
value
- (undocumented)public MultilayerPerceptronClassifier setTol(double value)
value
- (undocumented)public MultilayerPerceptronClassifier setSeed(long value)
value
- (undocumented)public MultilayerPerceptronClassifier setInitialWeights(Vector value)
initialWeights
.
value
- (undocumented)public MultilayerPerceptronClassifier setStepSize(double value)
stepSize
(applicable only for solver "gd").
Default is 0.03.
value
- (undocumented)public MultilayerPerceptronClassifier copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Predictor<Vector,MultilayerPerceptronClassifier,MultilayerPerceptronClassificationModel>
extra
- (undocumented)