Commits

Matija Polajnar  committed 4295fbc

Fix incorrect (incomplete) merge.

  • Participants
  • Parent commits e412389

Comments (0)

Files changed (1)

File _reliability/__init__.py

         return BaggingVarianceClassifier(classifiers, classifier)
 
 class BaggingVarianceClassifier:
-    def __init__(self, classifiers):
+    def __init__(self, classifiers, classifier=None):
         self.classifiers = classifiers
-
-    def __call__(self, instance, *args):
-        def __init__(self, classifiers, classifier=None):
-            self.classifiers = classifiers
-            self.classifier = classifier
+        self.classifier = classifier
 
     def __call__(self, instance, *args):
         BAGV = 0
         return CNeighboursClassifier(nearest_neighbours, self.k, distance=self.distance)
 
 class CNeighboursClassifier:
-    def __init__(self, nearest_neighbours, k):
+    def __init__(self, nearest_neighbours, k, distance):
         self.nearest_neighbours = nearest_neighbours
         self.k = k
+        self.distance = distance
 
     def __call__(self, instance, predicted, probabilities):
         CNK = 0