Source code for ccobra.comparator

""" Contains different comparator classes for model output data structures.

"""

[docs]class CCobraComparator(): """ Comparator base class. """
[docs] def compare(self, prediction, target, response_type, choices): """ Base comparison method. Parameters ---------- prediction : object Prediction object for comparison. target : object Target object for comparison. response_type : string The response type of the prediction and target. choices : list(object) The choice options that were available for this comparison. Returns ------- float Comparison result. """ raise NotImplementedError()
[docs] def get_name(self): """ Returns the name of the comparator. Returns ------- string Comparator name. """ raise NotImplementedError()