diff --git a/src/safeds/ml/classical/classification/_ada_boost.py b/src/safeds/ml/classical/classification/_ada_boost.py index cf2d4883b..18b34d19d 100644 --- a/src/safeds/ml/classical/classification/_ada_boost.py +++ b/src/safeds/ml/classical/classification/_ada_boost.py @@ -58,6 +58,18 @@ def __init__( self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def learner(self) -> Classifier | None: + return self._learner + + @property + def maximum_number_of_learners(self) -> int: + return self._maximum_number_of_learners + + @property + def learning_rate(self) -> float: + return self._learning_rate + def fit(self, training_set: TaggedTable) -> AdaBoost: """ Create a copy of this classifier and fit it with the given training data. @@ -83,8 +95,8 @@ def fit(self, training_set: TaggedTable) -> AdaBoost: fit(wrapped_classifier, training_set) result = AdaBoost( - learner=self._learner, - maximum_number_of_learners=self._maximum_number_of_learners, + learner=self.learner, + maximum_number_of_learners=self.maximum_number_of_learners, learning_rate=self._learning_rate, ) result._wrapped_classifier = wrapped_classifier @@ -140,9 +152,9 @@ def _get_sklearn_classifier(self) -> ClassifierMixin: wrapped_classifier: ClassifierMixin The sklearn Classifier. """ - learner = self._learner._get_sklearn_classifier() if self._learner is not None else None + learner = self.learner._get_sklearn_classifier() if self.learner is not None else None return sk_AdaBoostClassifier( estimator=learner, - n_estimators=self._maximum_number_of_learners, + n_estimators=self.maximum_number_of_learners, learning_rate=self._learning_rate, ) diff --git a/src/safeds/ml/classical/classification/_gradient_boosting.py b/src/safeds/ml/classical/classification/_gradient_boosting.py index 4b7cb9cd3..c94a95f7d 100644 --- a/src/safeds/ml/classical/classification/_gradient_boosting.py +++ b/src/safeds/ml/classical/classification/_gradient_boosting.py @@ -49,6 +49,14 @@ def __init__(self, *, number_of_trees: int = 100, learning_rate: float = 0.1) -> self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def number_of_trees(self) -> int: + return self._number_of_trees + + @property + def learning_rate(self) -> float: + return self._learning_rate + def fit(self, training_set: TaggedTable) -> GradientBoosting: """ Create a copy of this classifier and fit it with the given training data. diff --git a/src/safeds/ml/classical/classification/_k_nearest_neighbors.py b/src/safeds/ml/classical/classification/_k_nearest_neighbors.py index cef0cef03..df9bb7e79 100644 --- a/src/safeds/ml/classical/classification/_k_nearest_neighbors.py +++ b/src/safeds/ml/classical/classification/_k_nearest_neighbors.py @@ -43,6 +43,10 @@ def __init__(self, number_of_neighbors: int) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def number_of_neighbors(self) -> int: + return self._number_of_neighbors + def fit(self, training_set: TaggedTable) -> KNearestNeighbors: """ Create a copy of this classifier and fit it with the given training data. diff --git a/src/safeds/ml/classical/classification/_random_forest.py b/src/safeds/ml/classical/classification/_random_forest.py index 1bc77606d..5f0bdf26c 100644 --- a/src/safeds/ml/classical/classification/_random_forest.py +++ b/src/safeds/ml/classical/classification/_random_forest.py @@ -41,6 +41,10 @@ def __init__(self, *, number_of_trees: int = 100) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def number_of_trees(self) -> int: + return self._number_of_trees + def fit(self, training_set: TaggedTable) -> RandomForest: """ Create a copy of this classifier and fit it with the given training data. diff --git a/src/safeds/ml/classical/classification/_support_vector_machine.py b/src/safeds/ml/classical/classification/_support_vector_machine.py index c9e2e958e..91048f660 100644 --- a/src/safeds/ml/classical/classification/_support_vector_machine.py +++ b/src/safeds/ml/classical/classification/_support_vector_machine.py @@ -35,10 +35,15 @@ def __init__(self, *, c: float = 1.0) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + # Hyperparameters if c <= 0: raise ValueError("The parameter 'c' has to be strictly positive.") self._c = c + @property + def c(self) -> float: + return self._c + def fit(self, training_set: TaggedTable) -> SupportVectorMachine: """ Create a copy of this classifier and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_ada_boost.py b/src/safeds/ml/classical/regression/_ada_boost.py index fcf5e553b..e3ba73ca2 100644 --- a/src/safeds/ml/classical/regression/_ada_boost.py +++ b/src/safeds/ml/classical/regression/_ada_boost.py @@ -58,6 +58,18 @@ def __init__( self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def learner(self) -> Regressor | None: + return self._learner + + @property + def maximum_number_of_learners(self) -> int: + return self._maximum_number_of_learners + + @property + def learning_rate(self) -> float: + return self._learning_rate + def fit(self, training_set: TaggedTable) -> AdaBoost: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_elastic_net_regression.py b/src/safeds/ml/classical/regression/_elastic_net_regression.py index 67308c51a..e615ac870 100644 --- a/src/safeds/ml/classical/regression/_elastic_net_regression.py +++ b/src/safeds/ml/classical/regression/_elastic_net_regression.py @@ -74,6 +74,14 @@ def __init__(self, *, alpha: float = 1.0, lasso_ratio: float = 0.5) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def alpha(self) -> float: + return self._alpha + + @property + def lasso_ratio(self) -> float: + return self._lasso_ratio + def fit(self, training_set: TaggedTable) -> ElasticNetRegression: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_gradient_boosting.py b/src/safeds/ml/classical/regression/_gradient_boosting.py index 749a78836..d8cb47fa3 100644 --- a/src/safeds/ml/classical/regression/_gradient_boosting.py +++ b/src/safeds/ml/classical/regression/_gradient_boosting.py @@ -49,6 +49,14 @@ def __init__(self, *, number_of_trees: int = 100, learning_rate: float = 0.1) -> self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def number_of_trees(self) -> int: + return self._number_of_trees + + @property + def learning_rate(self) -> float: + return self._learning_rate + def fit(self, training_set: TaggedTable) -> GradientBoosting: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_k_nearest_neighbors.py b/src/safeds/ml/classical/regression/_k_nearest_neighbors.py index 4f96868c0..da1e4d20d 100644 --- a/src/safeds/ml/classical/regression/_k_nearest_neighbors.py +++ b/src/safeds/ml/classical/regression/_k_nearest_neighbors.py @@ -43,6 +43,10 @@ def __init__(self, number_of_neighbors: int) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def number_of_neighbors(self) -> int: + return self._number_of_neighbors + def fit(self, training_set: TaggedTable) -> KNearestNeighbors: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_lasso_regression.py b/src/safeds/ml/classical/regression/_lasso_regression.py index 0269908b3..bc175e5f9 100644 --- a/src/safeds/ml/classical/regression/_lasso_regression.py +++ b/src/safeds/ml/classical/regression/_lasso_regression.py @@ -51,6 +51,10 @@ def __init__(self, *, alpha: float = 1.0) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def alpha(self) -> float: + return self._alpha + def fit(self, training_set: TaggedTable) -> LassoRegression: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_random_forest.py b/src/safeds/ml/classical/regression/_random_forest.py index 3416a1029..b3c6f878b 100644 --- a/src/safeds/ml/classical/regression/_random_forest.py +++ b/src/safeds/ml/classical/regression/_random_forest.py @@ -41,6 +41,10 @@ def __init__(self, *, number_of_trees: int = 100) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def number_of_trees(self) -> int: + return self._number_of_trees + def fit(self, training_set: TaggedTable) -> RandomForest: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_ridge_regression.py b/src/safeds/ml/classical/regression/_ridge_regression.py index eda5ff0ba..002bf26c7 100644 --- a/src/safeds/ml/classical/regression/_ridge_regression.py +++ b/src/safeds/ml/classical/regression/_ridge_regression.py @@ -52,6 +52,10 @@ def __init__(self, *, alpha: float = 1.0) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + @property + def alpha(self) -> float: + return self._alpha + def fit(self, training_set: TaggedTable) -> RidgeRegression: """ Create a copy of this regressor and fit it with the given training data. diff --git a/src/safeds/ml/classical/regression/_support_vector_machine.py b/src/safeds/ml/classical/regression/_support_vector_machine.py index 41a194d96..d2e26f11b 100644 --- a/src/safeds/ml/classical/regression/_support_vector_machine.py +++ b/src/safeds/ml/classical/regression/_support_vector_machine.py @@ -35,10 +35,15 @@ def __init__(self, *, c: float = 1.0) -> None: self._feature_names: list[str] | None = None self._target_name: str | None = None + # Hyperparameters if c <= 0: raise ValueError("The parameter 'c' has to be strictly positive.") self._c = c + @property + def c(self) -> float: + return self._c + def fit(self, training_set: TaggedTable) -> SupportVectorMachine: """ Create a copy of this regressor and fit it with the given training data. diff --git a/tests/safeds/ml/classical/classification/test_ada_boost.py b/tests/safeds/ml/classical/classification/test_ada_boost.py index 3004b8464..1ecec8f4c 100644 --- a/tests/safeds/ml/classical/classification/test_ada_boost.py +++ b/tests/safeds/ml/classical/classification/test_ada_boost.py @@ -13,7 +13,7 @@ class TestLearner: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: learner = AdaBoost() fitted_model = AdaBoost(learner=learner).fit(training_set) - assert fitted_model._learner == learner + assert fitted_model.learner == learner def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: learner = AdaBoost() @@ -25,7 +25,7 @@ def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: class TestMaximumNumberOfLearners: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(maximum_number_of_learners=2).fit(training_set) - assert fitted_model._maximum_number_of_learners == 2 + assert fitted_model.maximum_number_of_learners == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(maximum_number_of_learners=2).fit(training_set) @@ -40,7 +40,7 @@ def test_should_raise_if_less_than_or_equal_to_0(self) -> None: class TestLearningRate: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(learning_rate=2).fit(training_set) - assert fitted_model._learning_rate == 2 + assert fitted_model.learning_rate == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(learning_rate=2).fit(training_set) diff --git a/tests/safeds/ml/classical/classification/test_gradient_boosting.py b/tests/safeds/ml/classical/classification/test_gradient_boosting.py index 88a8c2b42..e30564036 100644 --- a/tests/safeds/ml/classical/classification/test_gradient_boosting.py +++ b/tests/safeds/ml/classical/classification/test_gradient_boosting.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestNumberOfTrees: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(number_of_trees=2).fit(training_set) - assert fitted_model._number_of_trees == 2 + assert fitted_model.number_of_trees == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(number_of_trees=2).fit(training_set) @@ -27,7 +27,7 @@ def test_should_raise_if_less_than_1(self) -> None: class TestLearningRate: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(learning_rate=2).fit(training_set) - assert fitted_model._learning_rate == 2 + assert fitted_model.learning_rate == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(learning_rate=2).fit(training_set) diff --git a/tests/safeds/ml/classical/classification/test_k_nearest_neighbors.py b/tests/safeds/ml/classical/classification/test_k_nearest_neighbors.py index 739211102..982f80184 100644 --- a/tests/safeds/ml/classical/classification/test_k_nearest_neighbors.py +++ b/tests/safeds/ml/classical/classification/test_k_nearest_neighbors.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestNumberOfNeighbors: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = KNearestNeighbors(number_of_neighbors=2).fit(training_set) - assert fitted_model._number_of_neighbors == 2 + assert fitted_model.number_of_neighbors == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = KNearestNeighbors(number_of_neighbors=2).fit(training_set) diff --git a/tests/safeds/ml/classical/classification/test_random_forest.py b/tests/safeds/ml/classical/classification/test_random_forest.py index 6674c814e..c6df609cc 100644 --- a/tests/safeds/ml/classical/classification/test_random_forest.py +++ b/tests/safeds/ml/classical/classification/test_random_forest.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestNumberOfTrees: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = RandomForest(number_of_trees=2).fit(training_set) - assert fitted_model._number_of_trees == 2 + assert fitted_model.number_of_trees == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = RandomForest(number_of_trees=2).fit(training_set) diff --git a/tests/safeds/ml/classical/classification/test_support_vector_machine.py b/tests/safeds/ml/classical/classification/test_support_vector_machine.py index e40c613a0..9033c80cf 100644 --- a/tests/safeds/ml/classical/classification/test_support_vector_machine.py +++ b/tests/safeds/ml/classical/classification/test_support_vector_machine.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestC: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = SupportVectorMachine(c=2).fit(training_set=training_set) - assert fitted_model._c == 2 + assert fitted_model.c == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = SupportVectorMachine(c=2).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_ada_boost.py b/tests/safeds/ml/classical/regression/test_ada_boost.py index a30c60dc3..73f3511bb 100644 --- a/tests/safeds/ml/classical/regression/test_ada_boost.py +++ b/tests/safeds/ml/classical/regression/test_ada_boost.py @@ -13,7 +13,7 @@ class TestLearner: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: learner = AdaBoost() fitted_model = AdaBoost(learner=learner).fit(training_set) - assert fitted_model._learner == learner + assert fitted_model.learner == learner def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: learner = AdaBoost() @@ -25,7 +25,7 @@ def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: class TestMaximumNumberOfLearners: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(maximum_number_of_learners=2).fit(training_set) - assert fitted_model._maximum_number_of_learners == 2 + assert fitted_model.maximum_number_of_learners == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(maximum_number_of_learners=2).fit(training_set) @@ -40,7 +40,7 @@ def test_should_raise_if_less_than_or_equal_to_0(self) -> None: class TestLearningRate: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(learning_rate=2).fit(training_set) - assert fitted_model._learning_rate == 2 + assert fitted_model.learning_rate == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = AdaBoost(learning_rate=2).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_elastic_net_regression.py b/tests/safeds/ml/classical/regression/test_elastic_net_regression.py index f96731faa..f8e47ae61 100644 --- a/tests/safeds/ml/classical/regression/test_elastic_net_regression.py +++ b/tests/safeds/ml/classical/regression/test_elastic_net_regression.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestAlpha: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = ElasticNetRegression(alpha=1).fit(training_set) - assert fitted_model._alpha == 1 + assert fitted_model.alpha == 1 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = ElasticNetRegression(alpha=1).fit(training_set) @@ -37,7 +37,7 @@ def test_should_warn_if_equal_to_0(self) -> None: class TestLassoRatio: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = ElasticNetRegression(lasso_ratio=0.3).fit(training_set) - assert fitted_model._lasso_ratio == 0.3 + assert fitted_model.lasso_ratio == 0.3 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = ElasticNetRegression(lasso_ratio=0.3).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_gradient_boosting.py b/tests/safeds/ml/classical/regression/test_gradient_boosting.py index f08a758f5..bf92e381e 100644 --- a/tests/safeds/ml/classical/regression/test_gradient_boosting.py +++ b/tests/safeds/ml/classical/regression/test_gradient_boosting.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestNumberOfTrees: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(number_of_trees=2).fit(training_set) - assert fitted_model._number_of_trees == 2 + assert fitted_model.number_of_trees == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(number_of_trees=2).fit(training_set) @@ -27,7 +27,7 @@ def test_should_raise_if_less_than_1(self) -> None: class TestLearningRate: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(learning_rate=2).fit(training_set) - assert fitted_model._learning_rate == 2 + assert fitted_model.learning_rate == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = GradientBoosting(learning_rate=2).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_k_nearest_neighbors.py b/tests/safeds/ml/classical/regression/test_k_nearest_neighbors.py index 3f4f13093..5450a99f3 100644 --- a/tests/safeds/ml/classical/regression/test_k_nearest_neighbors.py +++ b/tests/safeds/ml/classical/regression/test_k_nearest_neighbors.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestNumberOfNeighbors: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = KNearestNeighbors(number_of_neighbors=2).fit(training_set) - assert fitted_model._number_of_neighbors == 2 + assert fitted_model.number_of_neighbors == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = KNearestNeighbors(number_of_neighbors=2).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_lasso_regression.py b/tests/safeds/ml/classical/regression/test_lasso_regression.py index 742d871bd..332b9f1ad 100644 --- a/tests/safeds/ml/classical/regression/test_lasso_regression.py +++ b/tests/safeds/ml/classical/regression/test_lasso_regression.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestAlpha: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = LassoRegression(alpha=1).fit(training_set) - assert fitted_model._alpha == 1 + assert fitted_model.alpha == 1 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = LassoRegression(alpha=1).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_random_forest.py b/tests/safeds/ml/classical/regression/test_random_forest.py index 6bd18387c..89f103704 100644 --- a/tests/safeds/ml/classical/regression/test_random_forest.py +++ b/tests/safeds/ml/classical/regression/test_random_forest.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestNumberOfTrees: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = RandomForest(number_of_trees=2).fit(training_set) - assert fitted_model._number_of_trees == 2 + assert fitted_model.number_of_trees == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = RandomForest(number_of_trees=2).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_ridge_regression.py b/tests/safeds/ml/classical/regression/test_ridge_regression.py index 1e9c4159c..ee3feb0b8 100644 --- a/tests/safeds/ml/classical/regression/test_ridge_regression.py +++ b/tests/safeds/ml/classical/regression/test_ridge_regression.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestAlpha: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = RidgeRegression(alpha=1).fit(training_set) - assert fitted_model._alpha == 1 + assert fitted_model.alpha == 1 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = RidgeRegression(alpha=1).fit(training_set) diff --git a/tests/safeds/ml/classical/regression/test_support_vector_machine.py b/tests/safeds/ml/classical/regression/test_support_vector_machine.py index 6ca0b9545..871c7a0ee 100644 --- a/tests/safeds/ml/classical/regression/test_support_vector_machine.py +++ b/tests/safeds/ml/classical/regression/test_support_vector_machine.py @@ -12,7 +12,7 @@ def training_set() -> TaggedTable: class TestC: def test_should_be_passed_to_fitted_model(self, training_set: TaggedTable) -> None: fitted_model = SupportVectorMachine(c=2).fit(training_set=training_set) - assert fitted_model._c == 2 + assert fitted_model.c == 2 def test_should_be_passed_to_sklearn(self, training_set: TaggedTable) -> None: fitted_model = SupportVectorMachine(c=2).fit(training_set)