Using A Custom Threshold Value With Tf.contrib.learn.dnnclassifier?
I'm working on a binary classification problem and I'm using the tf.contrib.learn.DNNClassifier class within TensorFlow. When invoking this estimator for only 2 classes, it uses a
Solution 1:
The tf.contrib.learn.DNNClassifier
class has a method called predict_proba
which returns the probabilities belonging to each class for the given inputs. Then you can use something like, tf.round(prob+thres)
for binary thresholding with the custom parameter thres
.
Post a Comment for "Using A Custom Threshold Value With Tf.contrib.learn.dnnclassifier?"