public class MultilayerPerceptronClassificationModel extends ProbabilisticClassificationModel<Vector,MultilayerPerceptronClassificationModel> implements scala.Serializable, MLWritable
param: uid uid param: layers array of layer sizes including input and output layers param: weights the weights of layers
Modifier and Type | Method and Description |
---|---|
MultilayerPerceptronClassificationModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
int[] |
layers() |
static MultilayerPerceptronClassificationModel |
load(String path) |
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.
|
static MLReader<MultilayerPerceptronClassificationModel> |
read() |
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, setProbabilityCol, setThresholds, transform
setRawPredictionCol
setFeaturesCol, setPredictionCol, transformSchema
transform, transform, transform
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save
validateAndTransformSchema
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
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static MLReader<MultilayerPerceptronClassificationModel> read()
public static MultilayerPerceptronClassificationModel load(String path)
public String uid()
Identifiable
uid
in interface Identifiable
public int[] layers()
public Vector weights()
public int numFeatures()
PredictionModel
numFeatures
in class PredictionModel<Vector,MultilayerPerceptronClassificationModel>
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 int numClasses()
ClassificationModel
numClasses
in class ClassificationModel<Vector,MultilayerPerceptronClassificationModel>