We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ClassificationScoreVisualizers should return accuracy
See #358 and #213  -- classification score visualizers should return accuracy when `score()` is called. If F1 or accuracy is not in the figure it should also be included in the figure. 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `yellowbrick/classifier/base.py`
Content:
```
1 # yellowbrick.classifier.base
2 # API for classification visualizer hierarchy.
3 #
4 # Author:   Rebecca Bilbro <rbilbro@districtdatalabs.com>
5 # Author:   Benjamin Bengfort <bbengfort@districtdatalabs.com>
6 # Author:   Neal Humphrey
7 # Created:  Wed May 18 12:39:40 2016 -0400
8 #
9 # Copyright (C) 2016 District Data Labs
10 # For license information, see LICENSE.txt
11 #
12 # ID: base.py [5388065] neal@nhumphrey.com $
13 
14 """
15 API for classification visualizer hierarchy.
16 """
17 
18 ##########################################################################
19 ## Imports
20 ##########################################################################
21 
22 import numpy as np
23 
24 from ..utils import isclassifier
25 from ..base import ScoreVisualizer
26 from ..style.palettes import color_palette
27 from ..exceptions import YellowbrickTypeError
28 
29 
30 ##########################################################################
31 ## Base Classification Visualizer
32 ##########################################################################
33 
34 class ClassificationScoreVisualizer(ScoreVisualizer):
35 
36     def __init__(self, model, ax=None, classes=None, **kwargs):
37         """
38         Check to see if model is an instance of a classifer.
39         Should return an error if it isn't.
40 
41         .. todo:: document this class.
42         .. tood:: accept as input classes as all visualizers need this.
43         """
44         # A bit of type checking
45         if not isclassifier(model):
46             raise YellowbrickTypeError(
47                 "This estimator is not a classifier; "
48                 "try a regression or clustering score visualizer instead!"
49         )
50 
51         # Initialize the super method.
52         super(ClassificationScoreVisualizer, self).__init__(model, ax=ax, **kwargs)
53 
54         # Convert to array if necessary to match estimator.classes_
55         if classes is not None:
56             classes = np.array(classes)
57 
58         # Set up classifier score visualization properties
59         if classes is not None:
60             n_colors = len(classes)
61         else:
62             n_colors = None
63 
64         self.colors    = color_palette(kwargs.pop('colors', None), n_colors)
65         self.classes_  = classes
66 
67     @property
68     def classes_(self):
69         """
70         Proxy property to smartly access the classes from the estimator or
71         stored locally on the score visualizer for visualization.
72         """
73         if self.__classes is None:
74             try:
75                 return self.estimator.classes_
76             except AttributeError:
77                 return None
78         return self.__classes
79 
80     @classes_.setter
81     def classes_(self, value):
82         self.__classes = value
83 
84     def fit(self, X, y=None, **kwargs):
85         """
86         Parameters
87         ----------
88 
89         X : ndarray or DataFrame of shape n x m
90             A matrix of n instances with m features
91 
92         y : ndarray or Series of length n
93             An array or series of target or class values
94 
95         kwargs: keyword arguments passed to Scikit-Learn API.
96 
97         Returns
98         -------
99         self : instance
100             Returns the instance of the classification score visualizer
101 
102         """
103         # Fit the inner estimator
104         self.estimator.fit(X, y)
105 
106         # Extract the classes from the estimator
107         if self.classes_ is None:
108             self.classes_ = self.estimator.classes_
109 
110         # Always return self from fit
111         return self
112 
113     #TODO during refactoring this can be used to generalize ClassBalance
114     def class_counts(self, y):
115         unique, counts = np.unique(y, return_counts=True)
116         return dict(zip(unique, counts))
117
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/yellowbrick/classifier/base.py b/yellowbrick/classifier/base.py
--- a/yellowbrick/classifier/base.py
+++ b/yellowbrick/classifier/base.py
@@ -110,6 +110,28 @@
         # Always return self from fit
         return self
 
+
+    def score(self, X, y, **kwargs):
+        """
+        The score function is the hook for visual interaction. Pass in test
+        data and the visualizer will create predictions on the data and
+        evaluate them with respect to the test values. The evaluation will
+        then be passed to draw() and the result of the estimator score will
+        be returned.
+        Parameters
+        ----------
+        X : array-like
+            X (also X_test) are the dependent variables of test set to predict
+        y : array-like
+            y (also y_test) is the independent actual variables to score against
+        Returns
+        -------
+        score : float
+        """
+        self.score_ =  self.estimator.score(X, y, **kwargs)
+
+        return self.score_
+
     #TODO during refactoring this can be used to generalize ClassBalance
     def class_counts(self, y):
         unique, counts = np.unique(y, return_counts=True)

{"golden_diff": "diff --git a/yellowbrick/classifier/base.py b/yellowbrick/classifier/base.py\n--- a/yellowbrick/classifier/base.py\n+++ b/yellowbrick/classifier/base.py\n@@ -110,6 +110,28 @@\n         # Always return self from fit\n         return self\n \n+\n+    def score(self, X, y, **kwargs):\n+        \"\"\"\n+        The score function is the hook for visual interaction. Pass in test\n+        data and the visualizer will create predictions on the data and\n+        evaluate them with respect to the test values. The evaluation will\n+        then be passed to draw() and the result of the estimator score will\n+        be returned.\n+        Parameters\n+        ----------\n+        X : array-like\n+            X (also X_test) are the dependent variables of test set to predict\n+        y : array-like\n+            y (also y_test) is the independent actual variables to score against\n+        Returns\n+        -------\n+        score : float\n+        \"\"\"\n+        self.score_ =  self.estimator.score(X, y, **kwargs)\n+\n+        return self.score_\n+\n     #TODO during refactoring this can be used to generalize ClassBalance\n     def class_counts(self, y):\n         unique, counts = np.unique(y, return_counts=True)\n", "issue": "ClassificationScoreVisualizers should return accuracy\nSee #358 and #213  -- classification score visualizers should return accuracy when `score()` is called. If F1 or accuracy is not in the figure it should also be included in the figure. \n", "before_files": [{"content": "# yellowbrick.classifier.base\n# API for classification visualizer hierarchy.\n#\n# Author:   Rebecca Bilbro <rbilbro@districtdatalabs.com>\n# Author:   Benjamin Bengfort <bbengfort@districtdatalabs.com>\n# Author:   Neal Humphrey\n# Created:  Wed May 18 12:39:40 2016 -0400\n#\n# Copyright (C) 2016 District Data Labs\n# For license information, see LICENSE.txt\n#\n# ID: base.py [5388065] neal@nhumphrey.com $\n\n\"\"\"\nAPI for classification visualizer hierarchy.\n\"\"\"\n\n##########################################################################\n## Imports\n##########################################################################\n\nimport numpy as np\n\nfrom ..utils import isclassifier\nfrom ..base import ScoreVisualizer\nfrom ..style.palettes import color_palette\nfrom ..exceptions import YellowbrickTypeError\n\n\n##########################################################################\n## Base Classification Visualizer\n##########################################################################\n\nclass ClassificationScoreVisualizer(ScoreVisualizer):\n\n    def __init__(self, model, ax=None, classes=None, **kwargs):\n        \"\"\"\n        Check to see if model is an instance of a classifer.\n        Should return an error if it isn't.\n\n        .. todo:: document this class.\n        .. tood:: accept as input classes as all visualizers need this.\n        \"\"\"\n        # A bit of type checking\n        if not isclassifier(model):\n            raise YellowbrickTypeError(\n                \"This estimator is not a classifier; \"\n                \"try a regression or clustering score visualizer instead!\"\n        )\n\n        # Initialize the super method.\n        super(ClassificationScoreVisualizer, self).__init__(model, ax=ax, **kwargs)\n\n        # Convert to array if necessary to match estimator.classes_\n        if classes is not None:\n            classes = np.array(classes)\n\n        # Set up classifier score visualization properties\n        if classes is not None:\n            n_colors = len(classes)\n        else:\n            n_colors = None\n\n        self.colors    = color_palette(kwargs.pop('colors', None), n_colors)\n        self.classes_  = classes\n\n    @property\n    def classes_(self):\n        \"\"\"\n        Proxy property to smartly access the classes from the estimator or\n        stored locally on the score visualizer for visualization.\n        \"\"\"\n        if self.__classes is None:\n            try:\n                return self.estimator.classes_\n            except AttributeError:\n                return None\n        return self.__classes\n\n    @classes_.setter\n    def classes_(self, value):\n        self.__classes = value\n\n    def fit(self, X, y=None, **kwargs):\n        \"\"\"\n        Parameters\n        ----------\n\n        X : ndarray or DataFrame of shape n x m\n            A matrix of n instances with m features\n\n        y : ndarray or Series of length n\n            An array or series of target or class values\n\n        kwargs: keyword arguments passed to Scikit-Learn API.\n\n        Returns\n        -------\n        self : instance\n            Returns the instance of the classification score visualizer\n\n        \"\"\"\n        # Fit the inner estimator\n        self.estimator.fit(X, y)\n\n        # Extract the classes from the estimator\n        if self.classes_ is None:\n            self.classes_ = self.estimator.classes_\n\n        # Always return self from fit\n        return self\n\n    #TODO during refactoring this can be used to generalize ClassBalance\n    def class_counts(self, y):\n        unique, counts = np.unique(y, return_counts=True)\n        return dict(zip(unique, counts))\n", "path": "yellowbrick/classifier/base.py"}], "after_files": [{"content": "# yellowbrick.classifier.base\n# API for classification visualizer hierarchy.\n#\n# Author:   Rebecca Bilbro <rbilbro@districtdatalabs.com>\n# Author:   Benjamin Bengfort <bbengfort@districtdatalabs.com>\n# Author:   Neal Humphrey\n# Created:  Wed May 18 12:39:40 2016 -0400\n#\n# Copyright (C) 2016 District Data Labs\n# For license information, see LICENSE.txt\n#\n# ID: base.py [5388065] neal@nhumphrey.com $\n\n\"\"\"\nAPI for classification visualizer hierarchy.\n\"\"\"\n\n##########################################################################\n## Imports\n##########################################################################\n\nimport numpy as np\n\nfrom ..utils import isclassifier\nfrom ..base import ScoreVisualizer\nfrom ..style.palettes import color_palette\nfrom ..exceptions import YellowbrickTypeError\n\n\n##########################################################################\n## Base Classification Visualizer\n##########################################################################\n\nclass ClassificationScoreVisualizer(ScoreVisualizer):\n\n    def __init__(self, model, ax=None, classes=None, **kwargs):\n        \"\"\"\n        Check to see if model is an instance of a classifer.\n        Should return an error if it isn't.\n\n        .. todo:: document this class.\n        .. tood:: accept as input classes as all visualizers need this.\n        \"\"\"\n        # A bit of type checking\n        if not isclassifier(model):\n            raise YellowbrickTypeError(\n                \"This estimator is not a classifier; \"\n                \"try a regression or clustering score visualizer instead!\"\n        )\n\n        # Initialize the super method.\n        super(ClassificationScoreVisualizer, self).__init__(model, ax=ax, **kwargs)\n\n        # Convert to array if necessary to match estimator.classes_\n        if classes is not None:\n            classes = np.array(classes)\n\n        # Set up classifier score visualization properties\n        if classes is not None:\n            n_colors = len(classes)\n        else:\n            n_colors = None\n\n        self.colors    = color_palette(kwargs.pop('colors', None), n_colors)\n        self.classes_  = classes\n\n    @property\n    def classes_(self):\n        \"\"\"\n        Proxy property to smartly access the classes from the estimator or\n        stored locally on the score visualizer for visualization.\n        \"\"\"\n        if self.__classes is None:\n            try:\n                return self.estimator.classes_\n            except AttributeError:\n                return None\n        return self.__classes\n\n    @classes_.setter\n    def classes_(self, value):\n        self.__classes = value\n\n    def fit(self, X, y=None, **kwargs):\n        \"\"\"\n        Parameters\n        ----------\n\n        X : ndarray or DataFrame of shape n x m\n            A matrix of n instances with m features\n\n        y : ndarray or Series of length n\n            An array or series of target or class values\n\n        kwargs: keyword arguments passed to Scikit-Learn API.\n\n        Returns\n        -------\n        self : instance\n            Returns the instance of the classification score visualizer\n\n        \"\"\"\n        # Fit the inner estimator\n        self.estimator.fit(X, y)\n\n        # Extract the classes from the estimator\n        if self.classes_ is None:\n            self.classes_ = self.estimator.classes_\n\n        # Always return self from fit\n        return self\n\n\n    def score(self, X, y, **kwargs):\n        \"\"\"\n        The score function is the hook for visual interaction. Pass in test\n        data and the visualizer will create predictions on the data and\n        evaluate them with respect to the test values. The evaluation will\n        then be passed to draw() and the result of the estimator score will\n        be returned.\n        Parameters\n        ----------\n        X : array-like\n            X (also X_test) are the dependent variables of test set to predict\n        y : array-like\n            y (also y_test) is the independent actual variables to score against\n        Returns\n        -------\n        score : float\n        \"\"\"\n        self.score_ =  self.estimator.score(X, y, **kwargs)\n\n        return self.score_\n\n    #TODO during refactoring this can be used to generalize ClassBalance\n    def class_counts(self, y):\n        unique, counts = np.unique(y, return_counts=True)\n        return dict(zip(unique, counts))\n", "path": "yellowbrick/classifier/base.py"}]}