Commits

Matija Polajnar committed 9679301

Add names to reliability estimation learners.

Comments (0)

Files changed (1)

_reliability/__init__.py

     prediction.
     
     """
-    def __init__(self, m=50):
+    def __init__(self, m=50, name="bv"):
         self.m = m
+        self.name = name
 
     def __call__(self, instances, learner):
         classifiers = []
     3. :math:`LCV(x) = \\frac{ \sum_{(x_i, c_i) \in N} d(x_i, x) * E_i }{ \sum_{(x_i, c_i) \in N} d(x_i, x) }`
 
     """
-    def __init__(self, k=0, distance=hellinger_dist, distance_weighted=True):
+    def __init__(self, k=0, distance=hellinger_dist, distance_weighted=True, name="lcv"):
         self.k = k
         self.distance = distance
         self.distance_weighted = distance_weighted
+        self.name = name
 
     def __call__(self, instances, learner):
         nearest_neighbours_constructor = Orange.classification.knn.FindNearestConstructor()
     a greater value implies better prediction.
     
     """
-    def __init__(self, k=5, distance=hellinger_dist):
+    def __init__(self, k=5, distance=hellinger_dist, name = "cnk"):
         self.k = k
         self.distance = distance
+        self.name = name
 
     def __call__(self, instances, learner):
         nearest_neighbours_constructor = Orange.classification.knn.FindNearestConstructor()
     Returns a value that estimates a density of problem space around the
     instance being predicted.
     """
-    def __init__(self, K=gauss_kernel, d_measure=Orange.distance.Euclidean()):
+    def __init__(self, K=gauss_kernel, d_measure=Orange.distance.Euclidean(), name="density"):
         self.K = K
         self.d_measure = d_measure
+        self.name = name
 
     def __call__(self, instances):