From d612987c84838d73ba6c4509ff2fddad70a52f56 Mon Sep 17 00:00:00 2001 From: Gao Enhao Date: Tue, 9 Jan 2024 16:24:52 +0800 Subject: [PATCH] [MNT] add a warning to predict_proba of BasicNN --- ablkit/learning/basic_nn.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ablkit/learning/basic_nn.py b/ablkit/learning/basic_nn.py index b783b49..5ad44f0 100644 --- a/ablkit/learning/basic_nn.py +++ b/ablkit/learning/basic_nn.py @@ -337,6 +337,12 @@ class BasicNN: X : List[Any], optional The input data. Defaults to None. + Warning + ------- + This method calculates the probability by applying a softmax function to the output + of the neural network. If your neural network already includes a softmax function + as its final activation, applying softmax again here will lead to incorrect probabilities. + Returns ------- numpy.ndarray