Repository: wearepal/EthicML

Issue:
SVM Kernel name
Clearly [this](https://github.com/predictive-analytics-lab/EthicML/blob/f7fcf435b5807ef9931f3ff3b259fc7cc4b38da8/ethicml/algorithms/inprocess/svm.py#L20) is not right 


Discussion:

Resolving patch:
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 @@ class LR(InAlgorithm):
     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 @@ class LRProb(InAlgorithm):
     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 @@ class SVM(InAlgorithm):
 
     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


Test patch:
diff --git a/tests/models_test/inprocess_test/models_inprocessing_test.py b/tests/models_test/inprocess_test/models_inprocessing_test.py
--- a/tests/models_test/inprocess_test/models_inprocessing_test.py
+++ b/tests/models_test/inprocess_test/models_inprocessing_test.py
@@ -41,9 +41,10 @@ class InprocessTest(NamedTuple):
 
 INPROCESS_TESTS = [
     InprocessTest(name="SVM", model=SVM(), num_pos=45),
+    InprocessTest(name="SVM (linear)", model=SVM(kernel="linear"), num_pos=41),
     InprocessTest(name="Majority", model=Majority(), num_pos=80),
     InprocessTest(name="MLP", model=MLP(), num_pos=43),
-    InprocessTest(name="Logistic Regression, C=1.0", model=LR(), num_pos=44),
+    InprocessTest(name="Logistic Regression (C=1.0)", model=LR(), num_pos=44),
     InprocessTest(name="LRCV", model=LRCV(), num_pos=40),
     InprocessTest(name="Dist Robust Optim", model=DRO(eta=0.5), num_pos=45),
     InprocessTest(name="Dist Robust Optim", model=DRO(eta=5.0), num_pos=59),
@@ -228,7 +229,7 @@ def test_lr_prob(toy_train_test: TrainTestPair):
     train, test = toy_train_test
 
     model: LRProb = LRProb()
-    assert model.name == "Logistic Regression Prob, C=1.0"
+    assert model.name == "Logistic Regression Prob (C=1.0)"
 
     heavi = Heaviside()
 
diff --git a/tests/models_test/postprocess_test/models_postprocessing_test.py b/tests/models_test/postprocess_test/models_postprocessing_test.py
--- a/tests/models_test/postprocess_test/models_postprocessing_test.py
+++ b/tests/models_test/postprocess_test/models_postprocessing_test.py
@@ -17,7 +17,7 @@ def test_hardt(toy_train_test: TrainTestPair) -> None:
 
     in_model: InAlgorithm = LR()
     assert in_model is not None
-    assert in_model.name == "Logistic Regression, C=1.0"
+    assert in_model.name == "Logistic Regression (C=1.0)"
 
     predictions: Prediction = in_model.run(train, train_test)
 
diff --git a/tests/models_test/preprocess_test/models_preprocessing_test.py b/tests/models_test/preprocess_test/models_preprocessing_test.py
--- a/tests/models_test/preprocess_test/models_preprocessing_test.py
+++ b/tests/models_test/preprocess_test/models_preprocessing_test.py
@@ -224,7 +224,7 @@ def test_upsampler(toy_train_test: TrainTestPair):
 
     lr_model: InAlgorithm = LR()
     assert lr_model is not None
-    assert lr_model.name == "Logistic Regression, C=1.0"
+    assert lr_model.name == "Logistic Regression (C=1.0)"
 
     predictions = lr_model.run_test(new_train, new_test)
     assert predictions.hard.values[predictions.hard.values == 1].shape[0] == 39