Reputation: 3652
I am doing binary classification using Spark ML Multilayer Perceptron Classifier.
mlp = MultilayerPerceptronClassifier(labelCol="evt", featuresCol="features", layers=[inputneurons,(inputneurons*2)+1,2])
The output layer has of two neurons as it is a binary classification problem. Now I would like get the values two neurons for each of the rows in the test set instead of just getting the prediction column containing either 0 or 1.
I could not find anything to get that in the API document.
Upvotes: 3
Views: 2482
Reputation: 1140
According to the documentation, Spark ML package does offer MLP (Multilayer Perceptron) as classifier only (no regression), and as a result it pushes output layer values to a softmax function to generate binary output value:
Nodes in the output layer use softmax function
Upvotes: 2