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, probabilityCol, setProbabilityCol, setThresholds, thresholds, transformrawPredictionCol, setRawPredictionCol, transformImplfeaturesCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol, transformSchematransform, transform, transformparamsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsavevalidateAndTransformSchemaextractInstancesextractInstances, extractInstancesgetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringgetRawPredictionCol, rawPredictionColgetProbabilityColgetThresholdsinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic static MLReader<MultilayerPerceptronClassificationModel> read()
public static MultilayerPerceptronClassificationModel load(String path)
public String uid()
Identifiableuid in interface Identifiablepublic int[] layers()
public Vector weights()
public int numFeatures()
PredictionModelnumFeatures 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)
ParamsdefaultCopy().copy in interface Paramscopy in class Model<MultilayerPerceptronClassificationModel>extra - (undocumented)public MLWriter write()
MLWritableMLWriter instance for this ML instance.write in interface MLWritablepublic int numClasses()
ClassificationModelnumClasses in class ClassificationModel<Vector,MultilayerPerceptronClassificationModel>