/// <summary> /// Does cls currently map to a negative example in this classifier? /// </summary> public static bool IsNegative(this IBinaryClassifier classifier, int cls) { bool?isPositive = classifier.GetBinaryClass(cls); if (isPositive.HasValue) { return(!isPositive.Value); } throw new Exception("Classifier does not contain a mapping for cls"); }
public BinaryClassifierTests() { _binaryClassifier = new AccordBinaryClassifier(); }
/// <summary> /// As <code>classifier.IsNegative(classifier, example.Class)</code> /// </summary> public static bool IsNegative(this IBinaryClassifier classifier, Example example) { return(classifier.IsNegative(example.Class)); }