public class MultilayerPerceptronClassificationModel extends ProbabilisticClassificationModel<Vector,MultilayerPerceptronClassificationModel> implements MultilayerPerceptronParams, scala.Serializable, MLWritable, HasTrainingSummary<MultilayerPerceptronClassificationTrainingSummary>
param: uid uid param: weights the weights of layers
Modifier and Type | Method and Description |
---|---|
IntParam |
blockSize()
Param for block size for stacking input data in matrices.
|
MultilayerPerceptronClassificationModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
MultilayerPerceptronClassificationSummary |
evaluate(Dataset<?> dataset)
Evaluates the model on a test dataset.
|
Param<Vector> |
initialWeights()
The initial weights of the model.
|
IntArrayParam |
layers()
Layer sizes including input size and output size.
|
static MultilayerPerceptronClassificationModel |
load(String path) |
IntParam |
maxIter()
Param for maximum number of iterations (>= 0).
|
int |
numClasses()
Number of classes (values which the label can take).
|
int |
numFeatures()
Returns the number of features the model was trained on.
|
double |
predict(Vector features)
Predict label for the given features.
|
Vector |
predictRaw(Vector features)
Raw prediction for each possible label.
|
static MLReader<MultilayerPerceptronClassificationModel> |
read() |
LongParam |
seed()
Param for random seed.
|
Param<String> |
solver()
The solver algorithm for optimization.
|
DoubleParam |
stepSize()
Param for Step size to be used for each iteration of optimization (> 0).
|
MultilayerPerceptronClassificationTrainingSummary |
summary()
Gets summary of model on training set.
|
DoubleParam |
tol()
Param for the convergence tolerance for iterative algorithms (>= 0).
|
String |
toString() |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
Vector |
weights() |
MLWriter |
write()
Returns an
MLWriter instance for this ML instance. |
normalizeToProbabilitiesInPlace, predictProbability, probabilityCol, setProbabilityCol, setThresholds, thresholds, transform, transformSchema
rawPredictionCol, setRawPredictionCol, transformImpl
featuresCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol
transform, transform, transform
params
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
getRawPredictionCol, rawPredictionCol
getProbabilityCol, probabilityCol
getThresholds, thresholds
getMaxIter
getStepSize
getBlockSize
save
hasSummary, setSummary
$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 static MLReader<MultilayerPerceptronClassificationModel> read()
public static MultilayerPerceptronClassificationModel load(String path)
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 Vector weights()
public int numFeatures()
PredictionModel
numFeatures
in class PredictionModel<Vector,MultilayerPerceptronClassificationModel>
public MultilayerPerceptronClassificationTrainingSummary summary()
hasSummary
is false.summary
in interface HasTrainingSummary<MultilayerPerceptronClassificationTrainingSummary>
public MultilayerPerceptronClassificationSummary evaluate(Dataset<?> dataset)
dataset
- Test dataset to evaluate model on.public double predict(Vector features)
transform()
and output predictionCol
.predict
in class ClassificationModel<Vector,MultilayerPerceptronClassificationModel>
features
- (undocumented)public MultilayerPerceptronClassificationModel copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Model<MultilayerPerceptronClassificationModel>
extra
- (undocumented)public MLWriter write()
MLWritable
MLWriter
instance for this ML instance.write
in interface MLWritable
public Vector predictRaw(Vector features)
ClassificationModel
transform()
and output rawPredictionCol
.
predictRaw
in class ClassificationModel<Vector,MultilayerPerceptronClassificationModel>
features
- (undocumented)public int numClasses()
ClassificationModel
numClasses
in class ClassificationModel<Vector,MultilayerPerceptronClassificationModel>
public String toString()
toString
in interface Identifiable
toString
in class Object