Home > Net >  Can I get signed distance from decision boundary for MLP model?
Can I get signed distance from decision boundary for MLP model?

Time:10-02

I have a three-layer MLP classifier model.(Input layer - hidden layer - output layer).

And I'd like to calculate the signed distance of data points from the decision boundary.

In the case of SVM or logistic regression, getting the signed distance is not that difficult.

But how about the MLP?

I'd like to check "how far is a new data from the decision boundary", without the true label of the new data.

CodePudding user response:

Basically, the output of the classifier model represents the signed distance from the decision boundary if you don't use sigmoid activation in the output layer. If you do use sigmoid activation in the output layer, you can just use inverse sigmoid to find the signed distance using the following formula. If p is the output of the classifier model with sigmoid activation in the final layer, signed_distance = -ln((1 / (p 1e-8)) - 1)

  • Related