prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  SVM Kernel name
  Clearly [this](https://github.com/predictive-analytics-lab/EthicML/blob/f7fcf435b5807ef9931f3ff3b259fc7cc4b38da8/ethicml/algorithms/inprocess/svm.py#L20) is not right 
  
  </issue>
  <code>
  [start of ethicml/algorithms/inprocess/svm.py]
  1 """Wrapper for SKLearn implementation of SVM."""
  2 from typing import Optional, Union
  3 
  4 import pandas as pd
  5 from sklearn.svm import SVC, LinearSVC
  6 
  7 from ethicml.common import implements
  8 from ethicml.utility import DataTuple, Prediction, TestTuple
  9 
  10 from .in_algorithm import InAlgorithm
  11 
  12 __all__ = ["SVM"]
  13 
  14 
  15 class SVM(InAlgorithm):
  16     """Support Vector Machine."""
  17 
  18     def __init__(self, C: Optional[float] = None, kernel: Optional[str] = None):
  19         """Init SVM."""
  20         kernel_name = f" (kernel)" if kernel is not None else ""
  21         super().__init__(name="SVM" + kernel_name, is_fairness_algo=False)
  22         self.C = SVC().C if C is None else C
  23         self.kernel = SVC().kernel if kernel is None else kernel
  24 
  25     @implements(InAlgorithm)
  26     def run(self, train: DataTuple, test: Union[DataTuple, TestTuple]) -> Prediction:
  27         clf = select_svm(self.C, self.kernel)
  28         clf.fit(train.x, train.y.to_numpy().ravel())
  29         return Prediction(hard=pd.Series(clf.predict(test.x)))
  30 
  31 
  32 def select_svm(C: float, kernel: str) -> SVC:
  33     """Select the appropriate SVM model for the given parameters."""
  34     if kernel == "linear":
  35         return LinearSVC(C=C, dual=False, tol=1e-12, random_state=888)
  36     return SVC(C=C, kernel=kernel, gamma="auto", random_state=888)
  37
  [end of ethicml/algorithms/inprocess/svm.py]
  [start of ethicml/algorithms/inprocess/logistic_regression.py]
  1 """Wrapper around Sci-Kit Learn Logistic Regression."""
  2 from typing import Optional
  3 
  4 import pandas as pd
  5 from sklearn.linear_model import LogisticRegression, LogisticRegressionCV
  6 from sklearn.model_selection import KFold
  7 
  8 from ethicml.common import implements
  9 from ethicml.utility import DataTuple, Prediction, SoftPrediction, TestTuple
  10 
  11 from .in_algorithm import InAlgorithm
  12 
  13 __all__ = ["LR", "LRCV", "LRProb"]
  14 
  15 
  16 class LR(InAlgorithm):
  17     """Logistic regression with hard predictions."""
  18 
  19     def __init__(self, C: Optional[float] = None):
  20         """Init LR."""
  21         self.C = LogisticRegression().C if C is None else C
  22         super().__init__(name=f"Logistic Regression, C={self.C}", is_fairness_algo=False)
  23 
  24     @implements(InAlgorithm)
  25     def run(self, train: DataTuple, test: TestTuple) -> Prediction:
  26         clf = LogisticRegression(solver="liblinear", random_state=888, C=self.C, multi_class="auto")
  27         clf.fit(train.x, train.y.to_numpy().ravel())
  28         return Prediction(hard=pd.Series(clf.predict(test.x)))
  29 
  30 
  31 class LRProb(InAlgorithm):
  32     """Logistic regression with soft output."""
  33 
  34     def __init__(self, C: Optional[int] = None):
  35         """Init LRProb."""
  36         self.C = LogisticRegression().C if C is None else C
  37         super().__init__(name=f"Logistic Regression Prob, C={self.C}", is_fairness_algo=False)
  38 
  39     @implements(InAlgorithm)
  40     def run(self, train: DataTuple, test: TestTuple) -> SoftPrediction:
  41         clf = LogisticRegression(solver="liblinear", random_state=888, C=self.C, multi_class="auto")
  42         clf.fit(train.x, train.y.to_numpy().ravel())
  43         return SoftPrediction(soft=pd.Series(clf.predict_proba(test.x)[:, 1]))
  44 
  45 
  46 class LRCV(InAlgorithm):
  47     """Kind of a cheap hack for now, but gives a proper cross-valudeted LR."""
  48 
  49     def __init__(self) -> None:
  50         """Init LRCV."""
  51         super().__init__(name="LRCV", is_fairness_algo=False)
  52 
  53     @implements(InAlgorithm)
  54     def run(self, train: DataTuple, test: TestTuple) -> Prediction:
  55         folder = KFold(n_splits=3, shuffle=False)
  56         clf = LogisticRegressionCV(
  57             cv=folder, n_jobs=-1, random_state=888, solver="liblinear", multi_class="auto"
  58         )
  59         clf.fit(train.x, train.y.to_numpy().ravel())
  60         return Prediction(hard=pd.Series(clf.predict(test.x)), info=dict(C=clf.C_[0]))
  61
  [end of ethicml/algorithms/inprocess/logistic_regression.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/ethicml/algorithms/inprocess/logistic_regression.py b/ethicml/algorithms/inprocess/logistic_regression.py
  --- a/ethicml/algorithms/inprocess/logistic_regression.py
  +++ b/ethicml/algorithms/inprocess/logistic_regression.py
  @@ -19,7 +19,7 @@
       def __init__(self, C: Optional[float] = None):
           """Init LR."""
           self.C = LogisticRegression().C if C is None else C
  -        super().__init__(name=f"Logistic Regression, C={self.C}", is_fairness_algo=False)
  +        super().__init__(name=f"Logistic Regression (C={self.C})", is_fairness_algo=False)
   
       @implements(InAlgorithm)
       def run(self, train: DataTuple, test: TestTuple) -> Prediction:
  @@ -34,7 +34,7 @@
       def __init__(self, C: Optional[int] = None):
           """Init LRProb."""
           self.C = LogisticRegression().C if C is None else C
  -        super().__init__(name=f"Logistic Regression Prob, C={self.C}", is_fairness_algo=False)
  +        super().__init__(name=f"Logistic Regression Prob (C={self.C})", is_fairness_algo=False)
   
       @implements(InAlgorithm)
       def run(self, train: DataTuple, test: TestTuple) -> SoftPrediction:
  diff --git a/ethicml/algorithms/inprocess/svm.py b/ethicml/algorithms/inprocess/svm.py
  --- a/ethicml/algorithms/inprocess/svm.py
  +++ b/ethicml/algorithms/inprocess/svm.py
  @@ -17,7 +17,7 @@
   
       def __init__(self, C: Optional[float] = None, kernel: Optional[str] = None):
           """Init SVM."""
  -        kernel_name = f" (kernel)" if kernel is not None else ""
  +        kernel_name = f" ({kernel})" if kernel is not None else ""
           super().__init__(name="SVM" + kernel_name, is_fairness_algo=False)
           self.C = SVC().C if C is None else C
           self.kernel = SVC().kernel if kernel is None else kernel
  
verification_info: {"golden_diff": "diff --git a/ethicml/algorithms/inprocess/logistic_regression.py b/ethicml/algorithms/inprocess/logistic_regression.py\n--- a/ethicml/algorithms/inprocess/logistic_regression.py\n+++ b/ethicml/algorithms/inprocess/logistic_regression.py\n@@ -19,7 +19,7 @@\n     def __init__(self, C: Optional[float] = None):\n         \"\"\"Init LR.\"\"\"\n         self.C = LogisticRegression().C if C is None else C\n-        super().__init__(name=f\"Logistic Regression, C={self.C}\", is_fairness_algo=False)\n+        super().__init__(name=f\"Logistic Regression (C={self.C})\", is_fairness_algo=False)\n \n     @implements(InAlgorithm)\n     def run(self, train: DataTuple, test: TestTuple) -> Prediction:\n@@ -34,7 +34,7 @@\n     def __init__(self, C: Optional[int] = None):\n         \"\"\"Init LRProb.\"\"\"\n         self.C = LogisticRegression().C if C is None else C\n-        super().__init__(name=f\"Logistic Regression Prob, C={self.C}\", is_fairness_algo=False)\n+        super().__init__(name=f\"Logistic Regression Prob (C={self.C})\", is_fairness_algo=False)\n \n     @implements(InAlgorithm)\n     def run(self, train: DataTuple, test: TestTuple) -> SoftPrediction:\ndiff --git a/ethicml/algorithms/inprocess/svm.py b/ethicml/algorithms/inprocess/svm.py\n--- a/ethicml/algorithms/inprocess/svm.py\n+++ b/ethicml/algorithms/inprocess/svm.py\n@@ -17,7 +17,7 @@\n \n     def __init__(self, C: Optional[float] = None, kernel: Optional[str] = None):\n         \"\"\"Init SVM.\"\"\"\n-        kernel_name = f\" (kernel)\" if kernel is not None else \"\"\n+        kernel_name = f\" ({kernel})\" if kernel is not None else \"\"\n         super().__init__(name=\"SVM\" + kernel_name, is_fairness_algo=False)\n         self.C = SVC().C if C is None else C\n         self.kernel = SVC().kernel if kernel is None else kernel\n", "issue": "SVM Kernel name\nClearly [this](https://github.com/predictive-analytics-lab/EthicML/blob/f7fcf435b5807ef9931f3ff3b259fc7cc4b38da8/ethicml/algorithms/inprocess/svm.py#L20) is not right \n", "before_files": [{"content": "\"\"\"Wrapper for SKLearn implementation of SVM.\"\"\"\nfrom typing import Optional, Union\n\nimport pandas as pd\nfrom sklearn.svm import SVC, LinearSVC\n\nfrom ethicml.common import implements\nfrom ethicml.utility import DataTuple, Prediction, TestTuple\n\nfrom .in_algorithm import InAlgorithm\n\n__all__ = [\"SVM\"]\n\n\nclass SVM(InAlgorithm):\n    \"\"\"Support Vector Machine.\"\"\"\n\n    def __init__(self, C: Optional[float] = None, kernel: Optional[str] = None):\n        \"\"\"Init SVM.\"\"\"\n        kernel_name = f\" (kernel)\" if kernel is not None else \"\"\n        super().__init__(name=\"SVM\" + kernel_name, is_fairness_algo=False)\n        self.C = SVC().C if C is None else C\n        self.kernel = SVC().kernel if kernel is None else kernel\n\n    @implements(InAlgorithm)\n    def run(self, train: DataTuple, test: Union[DataTuple, TestTuple]) -> Prediction:\n        clf = select_svm(self.C, self.kernel)\n        clf.fit(train.x, train.y.to_numpy().ravel())\n        return Prediction(hard=pd.Series(clf.predict(test.x)))\n\n\ndef select_svm(C: float, kernel: str) -> SVC:\n    \"\"\"Select the appropriate SVM model for the given parameters.\"\"\"\n    if kernel == \"linear\":\n        return LinearSVC(C=C, dual=False, tol=1e-12, random_state=888)\n    return SVC(C=C, kernel=kernel, gamma=\"auto\", random_state=888)\n", "path": "ethicml/algorithms/inprocess/svm.py"}, {"content": "\"\"\"Wrapper around Sci-Kit Learn Logistic Regression.\"\"\"\nfrom typing import Optional\n\nimport pandas as pd\nfrom sklearn.linear_model import LogisticRegression, LogisticRegressionCV\nfrom sklearn.model_selection import KFold\n\nfrom ethicml.common import implements\nfrom ethicml.utility import DataTuple, Prediction, SoftPrediction, TestTuple\n\nfrom .in_algorithm import InAlgorithm\n\n__all__ = [\"LR\", \"LRCV\", \"LRProb\"]\n\n\nclass LR(InAlgorithm):\n    \"\"\"Logistic regression with hard predictions.\"\"\"\n\n    def __init__(self, C: Optional[float] = None):\n        \"\"\"Init LR.\"\"\"\n        self.C = LogisticRegression().C if C is None else C\n        super().__init__(name=f\"Logistic Regression, C={self.C}\", is_fairness_algo=False)\n\n    @implements(InAlgorithm)\n    def run(self, train: DataTuple, test: TestTuple) -> Prediction:\n        clf = LogisticRegression(solver=\"liblinear\", random_state=888, C=self.C, multi_class=\"auto\")\n        clf.fit(train.x, train.y.to_numpy().ravel())\n        return Prediction(hard=pd.Series(clf.predict(test.x)))\n\n\nclass LRProb(InAlgorithm):\n    \"\"\"Logistic regression with soft output.\"\"\"\n\n    def __init__(self, C: Optional[int] = None):\n        \"\"\"Init LRProb.\"\"\"\n        self.C = LogisticRegression().C if C is None else C\n        super().__init__(name=f\"Logistic Regression Prob, C={self.C}\", is_fairness_algo=False)\n\n    @implements(InAlgorithm)\n    def run(self, train: DataTuple, test: TestTuple) -> SoftPrediction:\n        clf = LogisticRegression(solver=\"liblinear\", random_state=888, C=self.C, multi_class=\"auto\")\n        clf.fit(train.x, train.y.to_numpy().ravel())\n        return SoftPrediction(soft=pd.Series(clf.predict_proba(test.x)[:, 1]))\n\n\nclass LRCV(InAlgorithm):\n    \"\"\"Kind of a cheap hack for now, but gives a proper cross-valudeted LR.\"\"\"\n\n    def __init__(self) -> None:\n        \"\"\"Init LRCV.\"\"\"\n        super().__init__(name=\"LRCV\", is_fairness_algo=False)\n\n    @implements(InAlgorithm)\n    def run(self, train: DataTuple, test: TestTuple) -> Prediction:\n        folder = KFold(n_splits=3, shuffle=False)\n        clf = LogisticRegressionCV(\n            cv=folder, n_jobs=-1, random_state=888, solver=\"liblinear\", multi_class=\"auto\"\n        )\n        clf.fit(train.x, train.y.to_numpy().ravel())\n        return Prediction(hard=pd.Series(clf.predict(test.x)), info=dict(C=clf.C_[0]))\n", "path": "ethicml/algorithms/inprocess/logistic_regression.py"}]}