Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.2K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Apply IndeterminateThreshold to a neural net classifier?

Posted 7 years ago
POSTED BY: Jeff Burns
2 Replies
Posted 7 years ago
POSTED BY: Jeff Burns

Use Classify to convert your net into a ClassifierFunction.

class = (Classify@myClassifier)[myDataItem, IndeterminateThreshold -> 0.8]

Example:

net = NetChain[
   {10, 2, SoftmaxLayer[]},
   "Input" -> 5, "Output" -> NetDecoder[{"Class", {0, 1}}]
   ] // NetInitialize

c = Classify@net;

c[Range[5], "Probabilities"]
(* <|0 -> 0.365243, 1 -> 0.634757|> *)

c[RangIndeterminateThreshold -> 0.8]
(* Indeterminate *)

c[Range[5], IndeterminateThreshold -> 0.6]
(* 1 *)
POSTED BY: Alexey Golyshev
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard