diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a5f134fdd..bfa45d90c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,7 +79,7 @@ jobs: # Requires installation of pytest and pytest-cov - name: Test with pytest - run: poetry run pytest --doctest-modules --cov=safe_ds_runner --cov-report=xml + run: poetry run pytest --doctest-modules --cov=safeds_runner --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -128,7 +128,7 @@ jobs: # Requires installation of pytest and pytest-cov - name: Test with pytest - run: poetry run pytest --doctest-modules --cov=safe_ds --cov-report=xml + run: poetry run pytest --doctest-modules --cov=safeds --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 82c221332..043149c88 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -120,7 +120,7 @@ jobs: # Requires installation of pytest and pytest-cov - name: Test with pytest - run: poetry run pytest --doctest-modules --cov=safe_ds_runner --cov-report=xml + run: poetry run pytest --doctest-modules --cov=safeds_runner --cov-report=xml - name: Upload coverage to Codecov if: ${{ github.actor != 'dependabot[bot]' }} @@ -172,7 +172,7 @@ jobs: # Requires installation of pytest and pytest-cov - name: Test with pytest - run: poetry run pytest --doctest-modules --cov=safe_ds --cov-report=xml + run: poetry run pytest --doctest-modules --cov=safeds --cov-report=xml - name: Upload coverage to Codecov if: ${{ github.actor != 'dependabot[bot]' }} diff --git a/.pylintrc b/.pylintrc index fa6e5324c..368ee93b7 100644 --- a/.pylintrc +++ b/.pylintrc @@ -37,4 +37,5 @@ disable= duplicate-code, metrics, logging-fstring-interpolation, - too-many-nested-blocks + too-many-nested-blocks, + useless-return diff --git a/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/generator/SafeDSGenerator.kt b/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/generator/SafeDSGenerator.kt index 1847cac35..12417ad86 100644 --- a/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/generator/SafeDSGenerator.kt +++ b/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/generator/SafeDSGenerator.kt @@ -84,7 +84,7 @@ import org.eclipse.xtext.generator.IGeneratorContext */ class SafeDSGenerator : AbstractGenerator() { - private val codegenPackage = "safeds.codegen" + private val codegenPackage = "safeds_runner.codegen" private val runtimeBridgePackage = "runtimeBridge" private val indent = " " diff --git a/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py b/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py index 9f55f4e0a..b9d770db1 100644 --- a/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py +++ b/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py @@ -1,12 +1,12 @@ # Imports ---------------------------------------------------------------------- -import safeds.codegen +import safeds_runner.codegen # Pipelines -------------------------------------------------------------------- def test(): - f(safeds.codegen.eager_or(g(), g())) - f(safeds.codegen.eager_and(g(), g())) + f(safeds_runner.codegen.eager_or(g(), g())) + f(safeds_runner.codegen.eager_and(g(), g())) f((h()) == (h())) f((h()) != (h())) f((h()) is (h())) @@ -19,4 +19,4 @@ def test(): f((h()) - (h())) f((h()) * (h())) f((h()) / (h())) - f(safeds.codegen.eager_elvis(i(), i())) + f(safeds_runner.codegen.eager_elvis(i(), i())) diff --git a/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/member access/output/tests/generator/memberAccess/gen_input.py b/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/member access/output/tests/generator/memberAccess/gen_input.py index 372698b23..2d8cbe6ac 100644 --- a/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/member access/output/tests/generator/memberAccess/gen_input.py +++ b/DSL/com.larsreimann.safeds/src/test/resources/generator/expressions/member access/output/tests/generator/memberAccess/gen_input.py @@ -1,6 +1,6 @@ # Imports ---------------------------------------------------------------------- -import safeds.codegen +import safeds_runner.codegen # Pipelines -------------------------------------------------------------------- @@ -10,5 +10,5 @@ def test(): f(h()[1]) f(C().a) f(C().c) - f(safeds.codegen.safe_access(factory(), 'a')) - f(safeds.codegen.safe_access(factory(), 'c')) + f(safeds_runner.codegen.safe_access(factory(), 'a')) + f(safeds_runner.codegen.safe_access(factory(), 'c')) diff --git a/Runtime/safe-ds-runner/pyproject.toml b/Runtime/safe-ds-runner/pyproject.toml index 0c178878f..38f40e1dd 100644 --- a/Runtime/safe-ds-runner/pyproject.toml +++ b/Runtime/safe-ds-runner/pyproject.toml @@ -4,8 +4,9 @@ version = "1.0.0" description = "Run Safe-DS code." authors = ["Lars Reimann "] license = "MIT" - -[tool.poetry.scripts] +packages = [ + { include = "safeds_runner" }, +] [tool.poetry.dependencies] python = "^3.10" diff --git a/Runtime/safe-ds-runner/safe_ds_runner/codegen/__init__.py b/Runtime/safe-ds-runner/safe_ds_runner/codegen/__init__.py deleted file mode 100644 index e793a7a35..000000000 --- a/Runtime/safe-ds-runner/safe_ds_runner/codegen/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from ._operators import eager_and, eager_or, eager_elvis, safe_access diff --git a/Runtime/safe-ds-runner/safe_ds_runner/__init__.py b/Runtime/safe-ds-runner/safeds_runner/__init__.py similarity index 100% rename from Runtime/safe-ds-runner/safe_ds_runner/__init__.py rename to Runtime/safe-ds-runner/safeds_runner/__init__.py diff --git a/Runtime/safe-ds-runner/safeds_runner/codegen/__init__.py b/Runtime/safe-ds-runner/safeds_runner/codegen/__init__.py new file mode 100644 index 000000000..c92921b13 --- /dev/null +++ b/Runtime/safe-ds-runner/safeds_runner/codegen/__init__.py @@ -0,0 +1 @@ +from ._operators import eager_and, eager_elvis, eager_or, safe_access diff --git a/Runtime/safe-ds-runner/safe_ds_runner/codegen/_operators.py b/Runtime/safe-ds-runner/safeds_runner/codegen/_operators.py similarity index 93% rename from Runtime/safe-ds-runner/safe_ds_runner/codegen/_operators.py rename to Runtime/safe-ds-runner/safeds_runner/codegen/_operators.py index 8d994009f..4a2d3d3d9 100644 --- a/Runtime/safe-ds-runner/safe_ds_runner/codegen/_operators.py +++ b/Runtime/safe-ds-runner/safeds_runner/codegen/_operators.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, TypeVar, Optional +from typing import Any, Optional, TypeVar def eager_or(left_operand: bool, right_operand: bool) -> bool: diff --git a/Runtime/safe-ds-runner/tests/codegen/test_eager_and.py b/Runtime/safe-ds-runner/tests/codegen/test_eager_and.py index 26cc2b414..8e554dfba 100644 --- a/Runtime/safe-ds-runner/tests/codegen/test_eager_and.py +++ b/Runtime/safe-ds-runner/tests/codegen/test_eager_and.py @@ -1,6 +1,5 @@ import pytest - -from safe_ds_runner.codegen import eager_and +from safeds_runner.codegen import eager_and @pytest.mark.parametrize( @@ -10,13 +9,15 @@ (False, True, False), (True, False, False), (True, True, True), - ] + ], ) -def test_should_compute_conjunction(left_operand: bool, right_operand: bool, expected_result: bool): +def test_should_compute_conjunction( + left_operand: bool, right_operand: bool, expected_result: bool +) -> None: assert eager_and(left_operand, right_operand) == expected_result -def test_should_evaluate_left_operand_before_right_operand(): +def test_should_evaluate_left_operand_before_right_operand() -> None: call_order: list[str] = [] def left() -> bool: @@ -32,7 +33,7 @@ def right() -> bool: assert call_order == ["left", "right"] -def test_should_always_evaluate_both_operands(): +def test_should_always_evaluate_both_operands() -> None: call_order: list[str] = [] def left() -> bool: diff --git a/Runtime/safe-ds-runner/tests/codegen/test_eager_elvis.py b/Runtime/safe-ds-runner/tests/codegen/test_eager_elvis.py index b419b47b3..48bc55779 100644 --- a/Runtime/safe-ds-runner/tests/codegen/test_eager_elvis.py +++ b/Runtime/safe-ds-runner/tests/codegen/test_eager_elvis.py @@ -1,8 +1,7 @@ from typing import Any import pytest - -from safe_ds_runner.codegen import eager_elvis +from safeds_runner.codegen import eager_elvis @pytest.mark.parametrize( @@ -17,13 +16,15 @@ (True, None, True), (True, False, True), (True, True, True), - ] + ], ) -def test_should_compute_elvis_operation(left_operand: Any, right_operand: Any, expected_result: Any): +def test_should_compute_elvis_operation( + left_operand: Any, right_operand: Any, expected_result: Any +) -> None: assert eager_elvis(left_operand, right_operand) == expected_result -def test_should_evaluate_left_operand_before_right_operand(): +def test_should_evaluate_left_operand_before_right_operand() -> None: call_order: list[str] = [] def left() -> Any: @@ -39,7 +40,7 @@ def right() -> Any: assert call_order == ["left", "right"] -def test_should_always_evaluate_both_operands(): +def test_should_always_evaluate_both_operands() -> None: call_order: list[str] = [] def left() -> Any: diff --git a/Runtime/safe-ds-runner/tests/codegen/test_eager_or.py b/Runtime/safe-ds-runner/tests/codegen/test_eager_or.py index c43ccdc85..d1697631b 100644 --- a/Runtime/safe-ds-runner/tests/codegen/test_eager_or.py +++ b/Runtime/safe-ds-runner/tests/codegen/test_eager_or.py @@ -1,6 +1,5 @@ import pytest - -from safe_ds_runner.codegen import eager_or +from safeds_runner.codegen import eager_or @pytest.mark.parametrize( @@ -10,13 +9,15 @@ (False, True, True), (True, False, True), (True, True, True), - ] + ], ) -def test_should_compute_disjunction(left_operand: bool, right_operand: bool, expected_result: bool): +def test_should_compute_disjunction( + left_operand: bool, right_operand: bool, expected_result: bool +) -> None: assert eager_or(left_operand, right_operand) == expected_result -def test_should_evaluate_left_operand_before_right_operand(): +def test_should_evaluate_left_operand_before_right_operand() -> None: call_order: list[str] = [] def left() -> bool: @@ -32,7 +33,7 @@ def right() -> bool: assert call_order == ["left", "right"] -def test_should_always_evaluate_both_operands(): +def test_should_always_evaluate_both_operands() -> None: call_order: list[str] = [] def left() -> bool: diff --git a/Runtime/safe-ds-runner/tests/codegen/test_safe_access.py b/Runtime/safe-ds-runner/tests/codegen/test_safe_access.py index e0ff045fa..0a8ff8465 100644 --- a/Runtime/safe-ds-runner/tests/codegen/test_safe_access.py +++ b/Runtime/safe-ds-runner/tests/codegen/test_safe_access.py @@ -1,35 +1,33 @@ from typing import Any import pytest - -from safe_ds_runner.codegen import safe_access - +from safeds_runner.codegen import safe_access # Test data -------------------------------------------------------------------- + class __C: - def __init__(self): + def __init__(self) -> None: self.a: int = 1 # Actual tests ----------------------------------------------------------------- + @pytest.mark.parametrize( "receiver,member_name,expected_result", [ (None, "a", None), (__C(), "a", 1), - ] + ], ) def test_should_guard_against_member_access_on_none( - receiver: Any, - member_name: str, - expected_result: Any -): + receiver: Any, member_name: str, expected_result: Any +) -> None: assert safe_access(receiver, member_name) == expected_result -def test_should_evaluate_receiver_exactly_once(): +def test_should_evaluate_receiver_exactly_once() -> None: call_order: list[str] = [] def receiver() -> Any: @@ -41,6 +39,6 @@ def receiver() -> Any: assert len(call_order) == 1 -def test_should_raise_exception_if_member_does_not_exist(): +def test_should_raise_exception_if_member_does_not_exist() -> None: with pytest.raises(AttributeError, match=r"'__C' object has no attribute 'b'"): safe_access(__C(), "b") diff --git a/Runtime/safe-ds/demo/demo_Sprint_2.py b/Runtime/safe-ds/demo/demo_Sprint_2.py index 1ff9187ce..f6905289f 100644 --- a/Runtime/safe-ds/demo/demo_Sprint_2.py +++ b/Runtime/safe-ds/demo/demo_Sprint_2.py @@ -1,9 +1,9 @@ import matplotlib.pyplot as plt import pandas as pd import seaborn as sns -from safe_ds import plotting -from safe_ds.data import SupervisedDataset, Table -from safe_ds.regression import LinearRegression +from safeds import plotting +from safeds.data import SupervisedDataset, Table +from safeds.regression import LinearRegression from sklearn.linear_model import LinearRegression as PythonLRS diff --git a/Runtime/safe-ds/pyproject.toml b/Runtime/safe-ds/pyproject.toml index f4946f51b..2586351b1 100644 --- a/Runtime/safe-ds/pyproject.toml +++ b/Runtime/safe-ds/pyproject.toml @@ -4,6 +4,9 @@ version = "0.1.0" description = "The Safe-DS standard library." authors = ["Lars Reimann "] license = "MIT" +packages = [ + { include = "safeds" }, +] [tool.poetry.dependencies] python = "^3.10" diff --git a/Runtime/safe-ds/safe_ds/__init__.py b/Runtime/safe-ds/safeds/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/__init__.py rename to Runtime/safe-ds/safeds/__init__.py diff --git a/Runtime/safe-ds/safe_ds/_util/__init__.py b/Runtime/safe-ds/safeds/_util/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/_util/__init__.py rename to Runtime/safe-ds/safeds/_util/__init__.py diff --git a/Runtime/safe-ds/safe_ds/_util/_util_sklearn.py b/Runtime/safe-ds/safeds/_util/_util_sklearn.py similarity index 95% rename from Runtime/safe-ds/safe_ds/_util/_util_sklearn.py rename to Runtime/safe-ds/safeds/_util/_util_sklearn.py index 19e1b3299..490b58393 100644 --- a/Runtime/safe-ds/safe_ds/_util/_util_sklearn.py +++ b/Runtime/safe-ds/safeds/_util/_util_sklearn.py @@ -1,7 +1,7 @@ from typing import Any -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError, PredictionError +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError, PredictionError from sklearn.exceptions import NotFittedError diff --git a/Runtime/safe-ds/safe_ds/classification/__init__.py b/Runtime/safe-ds/safeds/classification/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/classification/__init__.py rename to Runtime/safe-ds/safeds/classification/__init__.py diff --git a/Runtime/safe-ds/safe_ds/classification/_ada_boost.py b/Runtime/safe-ds/safeds/classification/_ada_boost.py similarity index 90% rename from Runtime/safe-ds/safe_ds/classification/_ada_boost.py rename to Runtime/safe-ds/safeds/classification/_ada_boost.py index 6a780b915..091ef8c4f 100644 --- a/Runtime/safe-ds/safe_ds/classification/_ada_boost.py +++ b/Runtime/safe-ds/safeds/classification/_ada_boost.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.ensemble import AdaBoostClassifier as sk_AdaBoostClassifier @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._classification, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._classification, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/classification/_decision_tree.py b/Runtime/safe-ds/safeds/classification/_decision_tree.py similarity index 90% rename from Runtime/safe-ds/safe_ds/classification/_decision_tree.py rename to Runtime/safe-ds/safeds/classification/_decision_tree.py index 5002a5b21..d292e28a2 100644 --- a/Runtime/safe-ds/safe_ds/classification/_decision_tree.py +++ b/Runtime/safe-ds/safeds/classification/_decision_tree.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.tree import DecisionTreeClassifier as sk_DecisionTreeClassifier @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._classification, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._classification, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/classification/_gradient_boosting_classification.py b/Runtime/safe-ds/safeds/classification/_gradient_boosting_classification.py similarity index 90% rename from Runtime/safe-ds/safe_ds/classification/_gradient_boosting_classification.py rename to Runtime/safe-ds/safeds/classification/_gradient_boosting_classification.py index cecf1a0e7..79f062f46 100644 --- a/Runtime/safe-ds/safe_ds/classification/_gradient_boosting_classification.py +++ b/Runtime/safe-ds/safeds/classification/_gradient_boosting_classification.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.ensemble import GradientBoostingClassifier @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._classification, supervised_dataset ) @@ -57,7 +57,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._classification, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/classification/_k_nearest_neighbors.py b/Runtime/safe-ds/safeds/classification/_k_nearest_neighbors.py similarity index 91% rename from Runtime/safe-ds/safe_ds/classification/_k_nearest_neighbors.py rename to Runtime/safe-ds/safeds/classification/_k_nearest_neighbors.py index 90363b7ed..d5fbe1877 100644 --- a/Runtime/safe-ds/safe_ds/classification/_k_nearest_neighbors.py +++ b/Runtime/safe-ds/safeds/classification/_k_nearest_neighbors.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.neighbors import KNeighborsClassifier @@ -35,7 +35,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._classification, supervised_dataset ) @@ -60,7 +60,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._classification, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/classification/_logistic_regression.py b/Runtime/safe-ds/safeds/classification/_logistic_regression.py similarity index 90% rename from Runtime/safe-ds/safe_ds/classification/_logistic_regression.py rename to Runtime/safe-ds/safeds/classification/_logistic_regression.py index 45df42a3f..aed6ed14a 100644 --- a/Runtime/safe-ds/safe_ds/classification/_logistic_regression.py +++ b/Runtime/safe-ds/safeds/classification/_logistic_regression.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.linear_model import LogisticRegression as sk_LogisticRegression @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._classification, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._classification, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/classification/_random_forest.py b/Runtime/safe-ds/safeds/classification/_random_forest.py similarity index 90% rename from Runtime/safe-ds/safe_ds/classification/_random_forest.py rename to Runtime/safe-ds/safeds/classification/_random_forest.py index 1e7c907c1..4b4e57b76 100644 --- a/Runtime/safe-ds/safe_ds/classification/_random_forest.py +++ b/Runtime/safe-ds/safeds/classification/_random_forest.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.ensemble import RandomForestClassifier @@ -30,7 +30,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._classification, supervised_dataset ) @@ -55,7 +55,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._classification, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/classification/metrics/__init__.py b/Runtime/safe-ds/safeds/classification/metrics/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/classification/metrics/__init__.py rename to Runtime/safe-ds/safeds/classification/metrics/__init__.py diff --git a/Runtime/safe-ds/safe_ds/classification/metrics/_module_level_functions.py b/Runtime/safe-ds/safeds/classification/metrics/_module_level_functions.py similarity index 94% rename from Runtime/safe-ds/safe_ds/classification/metrics/_module_level_functions.py rename to Runtime/safe-ds/safeds/classification/metrics/_module_level_functions.py index d3c140458..0e8448c7e 100644 --- a/Runtime/safe-ds/safe_ds/classification/metrics/_module_level_functions.py +++ b/Runtime/safe-ds/safeds/classification/metrics/_module_level_functions.py @@ -1,4 +1,4 @@ -from safe_ds.data import Column +from safeds.data import Column from sklearn.metrics import accuracy_score diff --git a/Runtime/safe-ds/safe_ds/data/__init__.py b/Runtime/safe-ds/safeds/data/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/data/__init__.py rename to Runtime/safe-ds/safeds/data/__init__.py diff --git a/Runtime/safe-ds/safe_ds/data/_column.py b/Runtime/safe-ds/safeds/data/_column.py similarity index 99% rename from Runtime/safe-ds/safe_ds/data/_column.py rename to Runtime/safe-ds/safeds/data/_column.py index 1b5bee7d1..514f4da92 100644 --- a/Runtime/safe-ds/safe_ds/data/_column.py +++ b/Runtime/safe-ds/safeds/data/_column.py @@ -7,7 +7,7 @@ import numpy as np import pandas as pd from IPython.core.display_functions import DisplayHandle, display -from safe_ds.exceptions import ( +from safeds.exceptions import ( ColumnLengthMismatchError, ColumnSizeError, IndexOutOfBoundsError, diff --git a/Runtime/safe-ds/safe_ds/data/_column_type.py b/Runtime/safe-ds/safeds/data/_column_type.py similarity index 100% rename from Runtime/safe-ds/safe_ds/data/_column_type.py rename to Runtime/safe-ds/safeds/data/_column_type.py diff --git a/Runtime/safe-ds/safe_ds/data/_imputer.py b/Runtime/safe-ds/safeds/data/_imputer.py similarity index 100% rename from Runtime/safe-ds/safe_ds/data/_imputer.py rename to Runtime/safe-ds/safeds/data/_imputer.py diff --git a/Runtime/safe-ds/safe_ds/data/_label_encoder.py b/Runtime/safe-ds/safeds/data/_label_encoder.py similarity index 98% rename from Runtime/safe-ds/safe_ds/data/_label_encoder.py rename to Runtime/safe-ds/safeds/data/_label_encoder.py index d48b57ba4..218f35ad4 100644 --- a/Runtime/safe-ds/safe_ds/data/_label_encoder.py +++ b/Runtime/safe-ds/safeds/data/_label_encoder.py @@ -4,7 +4,7 @@ from typing import Any import pandas -from safe_ds.exceptions import LearningError, NotFittedError +from safeds.exceptions import LearningError, NotFittedError from sklearn import exceptions, preprocessing from ._table import Table diff --git a/Runtime/safe-ds/safe_ds/data/_one_hot_encoder.py b/Runtime/safe-ds/safeds/data/_one_hot_encoder.py similarity index 98% rename from Runtime/safe-ds/safe_ds/data/_one_hot_encoder.py rename to Runtime/safe-ds/safeds/data/_one_hot_encoder.py index 7fb32d70d..54ed4fc02 100644 --- a/Runtime/safe-ds/safe_ds/data/_one_hot_encoder.py +++ b/Runtime/safe-ds/safeds/data/_one_hot_encoder.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.exceptions import LearningError, NotFittedError +from safeds.exceptions import LearningError, NotFittedError from sklearn import exceptions from sklearn.preprocessing import OneHotEncoder as OHE_sklearn diff --git a/Runtime/safe-ds/safe_ds/data/_ordinal_encoder.py b/Runtime/safe-ds/safeds/data/_ordinal_encoder.py similarity index 98% rename from Runtime/safe-ds/safe_ds/data/_ordinal_encoder.py rename to Runtime/safe-ds/safeds/data/_ordinal_encoder.py index 8cd496888..17899c945 100644 --- a/Runtime/safe-ds/safe_ds/data/_ordinal_encoder.py +++ b/Runtime/safe-ds/safeds/data/_ordinal_encoder.py @@ -1,5 +1,5 @@ -from safe_ds import exceptions -from safe_ds.data._table import Table +from safeds import exceptions +from safeds.data._table import Table from sklearn import preprocessing diff --git a/Runtime/safe-ds/safe_ds/data/_row.py b/Runtime/safe-ds/safeds/data/_row.py similarity index 98% rename from Runtime/safe-ds/safe_ds/data/_row.py rename to Runtime/safe-ds/safeds/data/_row.py index 08977272b..84b11e7fd 100644 --- a/Runtime/safe-ds/safe_ds/data/_row.py +++ b/Runtime/safe-ds/safeds/data/_row.py @@ -3,7 +3,7 @@ import pandas as pd from IPython.core.display_functions import DisplayHandle, display -from safe_ds.exceptions import UnknownColumnNameError +from safeds.exceptions import UnknownColumnNameError from ._column_type import ColumnType from ._table_schema import TableSchema diff --git a/Runtime/safe-ds/safe_ds/data/_supervised_dataset.py b/Runtime/safe-ds/safeds/data/_supervised_dataset.py similarity index 100% rename from Runtime/safe-ds/safe_ds/data/_supervised_dataset.py rename to Runtime/safe-ds/safeds/data/_supervised_dataset.py diff --git a/Runtime/safe-ds/safe_ds/data/_table.py b/Runtime/safe-ds/safeds/data/_table.py similarity index 99% rename from Runtime/safe-ds/safe_ds/data/_table.py rename to Runtime/safe-ds/safeds/data/_table.py index 48e004b0a..938584ce4 100644 --- a/Runtime/safe-ds/safe_ds/data/_table.py +++ b/Runtime/safe-ds/safeds/data/_table.py @@ -10,7 +10,7 @@ import pandas as pd from IPython.core.display_functions import DisplayHandle, display from pandas import DataFrame, Series -from safe_ds.exceptions import ( +from safeds.exceptions import ( ColumnLengthMismatchError, ColumnSizeError, DuplicateColumnNameError, diff --git a/Runtime/safe-ds/safe_ds/data/_table_schema.py b/Runtime/safe-ds/safeds/data/_table_schema.py similarity index 98% rename from Runtime/safe-ds/safe_ds/data/_table_schema.py rename to Runtime/safe-ds/safeds/data/_table_schema.py index cb1eeca41..54481ada3 100644 --- a/Runtime/safe-ds/safe_ds/data/_table_schema.py +++ b/Runtime/safe-ds/safeds/data/_table_schema.py @@ -3,7 +3,7 @@ from dataclasses import dataclass import pandas as pd -from safe_ds.exceptions import UnknownColumnNameError +from safeds.exceptions import UnknownColumnNameError from ._column_type import ColumnType diff --git a/Runtime/safe-ds/safe_ds/exceptions/__init__.py b/Runtime/safe-ds/safeds/exceptions/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/exceptions/__init__.py rename to Runtime/safe-ds/safeds/exceptions/__init__.py diff --git a/Runtime/safe-ds/safe_ds/exceptions/_data_exceptions.py b/Runtime/safe-ds/safeds/exceptions/_data_exceptions.py similarity index 100% rename from Runtime/safe-ds/safe_ds/exceptions/_data_exceptions.py rename to Runtime/safe-ds/safeds/exceptions/_data_exceptions.py diff --git a/Runtime/safe-ds/safe_ds/exceptions/_learning_exceptions.py b/Runtime/safe-ds/safeds/exceptions/_learning_exceptions.py similarity index 100% rename from Runtime/safe-ds/safe_ds/exceptions/_learning_exceptions.py rename to Runtime/safe-ds/safeds/exceptions/_learning_exceptions.py diff --git a/Runtime/safe-ds/safe_ds/plotting/__init__.py b/Runtime/safe-ds/safeds/plotting/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/plotting/__init__.py rename to Runtime/safe-ds/safeds/plotting/__init__.py diff --git a/Runtime/safe-ds/safe_ds/plotting/_plot_boxplot.py b/Runtime/safe-ds/safeds/plotting/_plot_boxplot.py similarity index 92% rename from Runtime/safe-ds/safe_ds/plotting/_plot_boxplot.py rename to Runtime/safe-ds/safeds/plotting/_plot_boxplot.py index 048596df1..86e4ba379 100644 --- a/Runtime/safe-ds/safe_ds/plotting/_plot_boxplot.py +++ b/Runtime/safe-ds/safeds/plotting/_plot_boxplot.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt import seaborn as sns -from safe_ds.data import Column -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Column +from safeds.exceptions import NonNumericColumnError def plot_boxplot(column: Column) -> None: diff --git a/Runtime/safe-ds/safe_ds/plotting/_plot_correlation_heatmap.py b/Runtime/safe-ds/safeds/plotting/_plot_correlation_heatmap.py similarity index 90% rename from Runtime/safe-ds/safe_ds/plotting/_plot_correlation_heatmap.py rename to Runtime/safe-ds/safeds/plotting/_plot_correlation_heatmap.py index 8c447b7d7..996e7c0f9 100644 --- a/Runtime/safe-ds/safe_ds/plotting/_plot_correlation_heatmap.py +++ b/Runtime/safe-ds/safeds/plotting/_plot_correlation_heatmap.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt import seaborn as sns -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def plot_correlation_heatmap(table: Table) -> None: diff --git a/Runtime/safe-ds/safe_ds/plotting/_plot_histogram.py b/Runtime/safe-ds/safeds/plotting/_plot_histogram.py similarity index 94% rename from Runtime/safe-ds/safe_ds/plotting/_plot_histogram.py rename to Runtime/safe-ds/safeds/plotting/_plot_histogram.py index a9621c129..134f8fd4a 100644 --- a/Runtime/safe-ds/safe_ds/plotting/_plot_histogram.py +++ b/Runtime/safe-ds/safeds/plotting/_plot_histogram.py @@ -1,6 +1,6 @@ import matplotlib.pyplot as plt import seaborn as sns -from safe_ds.data import Column +from safeds.data import Column def plot_histogram(column: Column) -> None: diff --git a/Runtime/safe-ds/safe_ds/plotting/_plot_lineplot.py b/Runtime/safe-ds/safeds/plotting/_plot_lineplot.py similarity index 94% rename from Runtime/safe-ds/safe_ds/plotting/_plot_lineplot.py rename to Runtime/safe-ds/safeds/plotting/_plot_lineplot.py index 804e417f3..b26a24bbd 100644 --- a/Runtime/safe-ds/safe_ds/plotting/_plot_lineplot.py +++ b/Runtime/safe-ds/safeds/plotting/_plot_lineplot.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt import seaborn as sns -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def plot_lineplot(table: Table, x: str, y: str) -> None: diff --git a/Runtime/safe-ds/safe_ds/plotting/_plot_scatterplot.py b/Runtime/safe-ds/safeds/plotting/_plot_scatterplot.py similarity index 93% rename from Runtime/safe-ds/safe_ds/plotting/_plot_scatterplot.py rename to Runtime/safe-ds/safeds/plotting/_plot_scatterplot.py index 017b782bf..abd158025 100644 --- a/Runtime/safe-ds/safe_ds/plotting/_plot_scatterplot.py +++ b/Runtime/safe-ds/safeds/plotting/_plot_scatterplot.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt import seaborn as sns -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def plot_scatterplot(table: Table, x: str, y: str) -> None: diff --git a/Runtime/safe-ds/safe_ds/regression/__init__.py b/Runtime/safe-ds/safeds/regression/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/regression/__init__.py rename to Runtime/safe-ds/safeds/regression/__init__.py diff --git a/Runtime/safe-ds/safe_ds/regression/_ada_boost.py b/Runtime/safe-ds/safeds/regression/_ada_boost.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_ada_boost.py rename to Runtime/safe-ds/safeds/regression/_ada_boost.py index 826354551..7231324f3 100644 --- a/Runtime/safe-ds/safe_ds/regression/_ada_boost.py +++ b/Runtime/safe-ds/safeds/regression/_ada_boost.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.ensemble import AdaBoostRegressor as sk_AdaBoostRegressor @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_decision_tree.py b/Runtime/safe-ds/safeds/regression/_decision_tree.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_decision_tree.py rename to Runtime/safe-ds/safeds/regression/_decision_tree.py index 90999eadb..d05e2215f 100644 --- a/Runtime/safe-ds/safe_ds/regression/_decision_tree.py +++ b/Runtime/safe-ds/safeds/regression/_decision_tree.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.tree import DecisionTreeRegressor as sk_DecisionTreeRegressor @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_elastic_net_regression.py b/Runtime/safe-ds/safeds/regression/_elastic_net_regression.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_elastic_net_regression.py rename to Runtime/safe-ds/safeds/regression/_elastic_net_regression.py index 71c3471bf..b0b10c00c 100644 --- a/Runtime/safe-ds/safe_ds/regression/_elastic_net_regression.py +++ b/Runtime/safe-ds/safeds/regression/_elastic_net_regression.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.linear_model import ElasticNet as sk_ElasticNet @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_gradient_boosting_regression.py b/Runtime/safe-ds/safeds/regression/_gradient_boosting_regression.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_gradient_boosting_regression.py rename to Runtime/safe-ds/safeds/regression/_gradient_boosting_regression.py index c460b8871..cffabcec6 100644 --- a/Runtime/safe-ds/safe_ds/regression/_gradient_boosting_regression.py +++ b/Runtime/safe-ds/safeds/regression/_gradient_boosting_regression.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.ensemble import GradientBoostingRegressor @@ -32,7 +32,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -58,7 +58,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_k_nearest_neighbors.py b/Runtime/safe-ds/safeds/regression/_k_nearest_neighbors.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_k_nearest_neighbors.py rename to Runtime/safe-ds/safeds/regression/_k_nearest_neighbors.py index 416f251b2..c0b2b1b1f 100644 --- a/Runtime/safe-ds/safe_ds/regression/_k_nearest_neighbors.py +++ b/Runtime/safe-ds/safeds/regression/_k_nearest_neighbors.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.neighbors import KNeighborsRegressor @@ -35,7 +35,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -60,7 +60,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_lasso_regression.py b/Runtime/safe-ds/safeds/regression/_lasso_regression.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_lasso_regression.py rename to Runtime/safe-ds/safeds/regression/_lasso_regression.py index 6aa0e7697..d7c2f04de 100644 --- a/Runtime/safe-ds/safe_ds/regression/_lasso_regression.py +++ b/Runtime/safe-ds/safeds/regression/_lasso_regression.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.linear_model import Lasso as sk_Lasso @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_linear_regression.py b/Runtime/safe-ds/safeds/regression/_linear_regression.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_linear_regression.py rename to Runtime/safe-ds/safeds/regression/_linear_regression.py index 201ccd10c..2bd3e3563 100644 --- a/Runtime/safe-ds/safe_ds/regression/_linear_regression.py +++ b/Runtime/safe-ds/safeds/regression/_linear_regression.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.linear_model import LinearRegression as sk_LinearRegression @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_random_forest.py b/Runtime/safe-ds/safeds/regression/_random_forest.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_random_forest.py rename to Runtime/safe-ds/safeds/regression/_random_forest.py index eb1337bfe..e8194c252 100644 --- a/Runtime/safe-ds/safe_ds/regression/_random_forest.py +++ b/Runtime/safe-ds/safeds/regression/_random_forest.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.ensemble import RandomForestRegressor @@ -30,7 +30,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -55,7 +55,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/_ridge_regression.py b/Runtime/safe-ds/safeds/regression/_ridge_regression.py similarity index 90% rename from Runtime/safe-ds/safe_ds/regression/_ridge_regression.py rename to Runtime/safe-ds/safeds/regression/_ridge_regression.py index 932ea35a9..841cd4c0a 100644 --- a/Runtime/safe-ds/safe_ds/regression/_ridge_regression.py +++ b/Runtime/safe-ds/safeds/regression/_ridge_regression.py @@ -1,8 +1,8 @@ from typing import Optional # noinspection PyProtectedMember -import safe_ds._util._util_sklearn -from safe_ds.data import SupervisedDataset, Table +import safeds._util._util_sklearn +from safeds.data import SupervisedDataset, Table from sklearn.linear_model import Ridge as sk_Ridge @@ -31,7 +31,7 @@ def fit(self, supervised_dataset: SupervisedDataset) -> None: LearningError If the supervised dataset contains invalid values or if the training failed. """ - self.target_name = safe_ds._util._util_sklearn.fit( + self.target_name = safeds._util._util_sklearn.fit( self._regression, supervised_dataset ) @@ -56,7 +56,7 @@ def predict(self, dataset: Table, target_name: Optional[str] = None) -> Table: PredictionError If prediction with the given dataset failed. """ - return safe_ds._util._util_sklearn.predict( + return safeds._util._util_sklearn.predict( self._regression, dataset, target_name if target_name is not None else self.target_name, diff --git a/Runtime/safe-ds/safe_ds/regression/metrics/__init__.py b/Runtime/safe-ds/safeds/regression/metrics/__init__.py similarity index 100% rename from Runtime/safe-ds/safe_ds/regression/metrics/__init__.py rename to Runtime/safe-ds/safeds/regression/metrics/__init__.py diff --git a/Runtime/safe-ds/safe_ds/regression/metrics/_module_level_functions.py b/Runtime/safe-ds/safeds/regression/metrics/_module_level_functions.py similarity index 95% rename from Runtime/safe-ds/safe_ds/regression/metrics/_module_level_functions.py rename to Runtime/safe-ds/safeds/regression/metrics/_module_level_functions.py index 12caeee06..46d4a3dcc 100644 --- a/Runtime/safe-ds/safe_ds/regression/metrics/_module_level_functions.py +++ b/Runtime/safe-ds/safeds/regression/metrics/_module_level_functions.py @@ -1,5 +1,5 @@ -from safe_ds.data import Column -from safe_ds.exceptions import ColumnLengthMismatchError +from safeds.data import Column +from safeds.exceptions import ColumnLengthMismatchError from sklearn.metrics import mean_absolute_error as mean_absolute_error_sklearn from sklearn.metrics import mean_squared_error as mean_squared_error_sklearn diff --git a/Runtime/safe-ds/tests/classification/_ada_boost/test_fit.py b/Runtime/safe-ds/tests/classification/_ada_boost/test_fit.py index c82519fac..5eeb5ca14 100644 --- a/Runtime/safe-ds/tests/classification/_ada_boost/test_fit.py +++ b/Runtime/safe-ds/tests/classification/_ada_boost/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import AdaBoost -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError +from safeds.classification import AdaBoost +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError def test_ada_boost_fit() -> None: diff --git a/Runtime/safe-ds/tests/classification/_ada_boost/test_predict.py b/Runtime/safe-ds/tests/classification/_ada_boost/test_predict.py index 34171cfd7..b2be6ee2e 100644 --- a/Runtime/safe-ds/tests/classification/_ada_boost/test_predict.py +++ b/Runtime/safe-ds/tests/classification/_ada_boost/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import AdaBoost -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError +from safeds.classification import AdaBoost +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError def test_ada_boost_predict() -> None: diff --git a/Runtime/safe-ds/tests/classification/_decision_tree/test_fit.py b/Runtime/safe-ds/tests/classification/_decision_tree/test_fit.py index 75b837d80..b61547400 100644 --- a/Runtime/safe-ds/tests/classification/_decision_tree/test_fit.py +++ b/Runtime/safe-ds/tests/classification/_decision_tree/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import DecisionTree -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError +from safeds.classification import DecisionTree +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError def test_decision_tree_fit() -> None: diff --git a/Runtime/safe-ds/tests/classification/_decision_tree/test_predict.py b/Runtime/safe-ds/tests/classification/_decision_tree/test_predict.py index 74ec95f94..3efda986a 100644 --- a/Runtime/safe-ds/tests/classification/_decision_tree/test_predict.py +++ b/Runtime/safe-ds/tests/classification/_decision_tree/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import DecisionTree -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError +from safeds.classification import DecisionTree +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError def test_decision_tree_predict() -> None: diff --git a/Runtime/safe-ds/tests/classification/_gradient_boosting/test_fit.py b/Runtime/safe-ds/tests/classification/_gradient_boosting/test_fit.py index ace9362ac..32bcde454 100644 --- a/Runtime/safe-ds/tests/classification/_gradient_boosting/test_fit.py +++ b/Runtime/safe-ds/tests/classification/_gradient_boosting/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import GradientBoosting -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError +from safeds.classification import GradientBoosting +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError def test_gradient_boosting_classification_fit() -> None: diff --git a/Runtime/safe-ds/tests/classification/_gradient_boosting/test_predict.py b/Runtime/safe-ds/tests/classification/_gradient_boosting/test_predict.py index eb6d3392c..1b2554685 100644 --- a/Runtime/safe-ds/tests/classification/_gradient_boosting/test_predict.py +++ b/Runtime/safe-ds/tests/classification/_gradient_boosting/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import GradientBoosting -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError +from safeds.classification import GradientBoosting +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError def test_gradient_boosting_predict() -> None: diff --git a/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_fit.py b/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_fit.py index cb052d9d7..4693eacbd 100644 --- a/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_fit.py +++ b/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import KNearestNeighbors as KNearestNeighborsClassifier -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError +from safeds.classification import KNearestNeighbors as KNearestNeighborsClassifier +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError def test_k_nearest_neighbors_fit() -> None: diff --git a/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_predict.py b/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_predict.py index b586bd4b6..54e0b7bce 100644 --- a/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_predict.py +++ b/Runtime/safe-ds/tests/classification/_k_nearest_neighbors/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import KNearestNeighbors as KNearestNeighborsClassifier -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError +from safeds.classification import KNearestNeighbors as KNearestNeighborsClassifier +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError def test_k_nearest_neighbors_predict() -> None: diff --git a/Runtime/safe-ds/tests/classification/_logistic_regression/test_fit.py b/Runtime/safe-ds/tests/classification/_logistic_regression/test_fit.py index 8552a049a..b8d6ad97b 100644 --- a/Runtime/safe-ds/tests/classification/_logistic_regression/test_fit.py +++ b/Runtime/safe-ds/tests/classification/_logistic_regression/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import LogisticRegression -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError +from safeds.classification import LogisticRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError def test_logistic_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/classification/_logistic_regression/test_predict.py b/Runtime/safe-ds/tests/classification/_logistic_regression/test_predict.py index 2fe48687e..5b4bb6d85 100644 --- a/Runtime/safe-ds/tests/classification/_logistic_regression/test_predict.py +++ b/Runtime/safe-ds/tests/classification/_logistic_regression/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import LogisticRegression -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError +from safeds.classification import LogisticRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError def test_logistic_regression_predict() -> None: diff --git a/Runtime/safe-ds/tests/classification/_random_forest/test_fit.py b/Runtime/safe-ds/tests/classification/_random_forest/test_fit.py index e25d0f333..71722c817 100644 --- a/Runtime/safe-ds/tests/classification/_random_forest/test_fit.py +++ b/Runtime/safe-ds/tests/classification/_random_forest/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import RandomForest as RandomForestClassifier -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError +from safeds.classification import RandomForest as RandomForestClassifier +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError def test_logistic_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/classification/_random_forest/test_predict.py b/Runtime/safe-ds/tests/classification/_random_forest/test_predict.py index adad699eb..6eee5e22d 100644 --- a/Runtime/safe-ds/tests/classification/_random_forest/test_predict.py +++ b/Runtime/safe-ds/tests/classification/_random_forest/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.classification import RandomForest as RandomForestClassifier -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError +from safeds.classification import RandomForest as RandomForestClassifier +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError def test_random_forest_predict() -> None: diff --git a/Runtime/safe-ds/tests/classification/metrics/_accuracy/test_accuracy.py b/Runtime/safe-ds/tests/classification/metrics/_accuracy/test_accuracy.py index 2dc424178..763ed5ff5 100644 --- a/Runtime/safe-ds/tests/classification/metrics/_accuracy/test_accuracy.py +++ b/Runtime/safe-ds/tests/classification/metrics/_accuracy/test_accuracy.py @@ -1,6 +1,6 @@ import pandas as pd -from safe_ds.classification.metrics import accuracy -from safe_ds.data import Column +from safeds.classification.metrics import accuracy +from safeds.data import Column def test_accuracy() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_column.py b/Runtime/safe-ds/tests/data/_column/test_column.py index 1f7c2a3c9..65ef88e2a 100644 --- a/Runtime/safe-ds/tests/data/_column/test_column.py +++ b/Runtime/safe-ds/tests/data/_column/test_column.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Column +from safeds.data import Column def test_from_columns() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_column_properties.py b/Runtime/safe-ds/tests/data/_column/test_column_properties.py index 0228f7b41..407f4bb85 100644 --- a/Runtime/safe-ds/tests/data/_column/test_column_properties.py +++ b/Runtime/safe-ds/tests/data/_column/test_column_properties.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Column +from safeds.data import Column def test_column_property_all_positive() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_correlation_with.py b/Runtime/safe-ds/tests/data/_column/test_correlation_with.py index 884e94e7d..07074deb8 100644 --- a/Runtime/safe-ds/tests/data/_column/test_correlation_with.py +++ b/Runtime/safe-ds/tests/data/_column/test_correlation_with.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import ColumnLengthMismatchError, NonNumericColumnError +from safeds.data import Column +from safeds.exceptions import ColumnLengthMismatchError, NonNumericColumnError def test_correlation_with() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_count.py b/Runtime/safe-ds/tests/data/_column/test_count.py index 2ca5b6bdd..8fcf92de7 100644 --- a/Runtime/safe-ds/tests/data/_column/test_count.py +++ b/Runtime/safe-ds/tests/data/_column/test_count.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_count_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_count_null_values.py b/Runtime/safe-ds/tests/data/_column/test_count_null_values.py index 63f05cbba..984c4db6c 100644 --- a/Runtime/safe-ds/tests/data/_column/test_count_null_values.py +++ b/Runtime/safe-ds/tests/data/_column/test_count_null_values.py @@ -1,6 +1,6 @@ import numpy as np import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_count_null_values_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_from_columns.py b/Runtime/safe-ds/tests/data/_column/test_from_columns.py index 3f2ac1d07..77d1f297e 100644 --- a/Runtime/safe-ds/tests/data/_column/test_from_columns.py +++ b/Runtime/safe-ds/tests/data/_column/test_from_columns.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Column, Table +from safeds.data import Column, Table def test_from_columns() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_get_unique_values.py b/Runtime/safe-ds/tests/data/_column/test_get_unique_values.py index 78eef18a0..fa5a35980 100644 --- a/Runtime/safe-ds/tests/data/_column/test_get_unique_values.py +++ b/Runtime/safe-ds/tests/data/_column/test_get_unique_values.py @@ -1,7 +1,7 @@ import typing import pytest -from safe_ds.data import Column +from safeds.data import Column @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_column/test_get_value.py b/Runtime/safe-ds/tests/data/_column/test_get_value.py index 26b373e8a..1ec35adfc 100644 --- a/Runtime/safe-ds/tests/data/_column/test_get_value.py +++ b/Runtime/safe-ds/tests/data/_column/test_get_value.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import IndexOutOfBoundsError +from safeds.data import Column +from safeds.exceptions import IndexOutOfBoundsError def test_get_value_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_getitem.py b/Runtime/safe-ds/tests/data/_column/test_getitem.py index dd44f4f64..f6d8432a5 100644 --- a/Runtime/safe-ds/tests/data/_column/test_getitem.py +++ b/Runtime/safe-ds/tests/data/_column/test_getitem.py @@ -2,8 +2,8 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import IndexOutOfBoundsError +from safeds.data import Column +from safeds.exceptions import IndexOutOfBoundsError def test_getitem_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_has_missing_values.py b/Runtime/safe-ds/tests/data/_column/test_has_missing_values.py index 23b5dc1f1..b20ca3143 100644 --- a/Runtime/safe-ds/tests/data/_column/test_has_missing_values.py +++ b/Runtime/safe-ds/tests/data/_column/test_has_missing_values.py @@ -1,7 +1,7 @@ import numpy as np import pandas as pd import pytest -from safe_ds.data import Column +from safeds.data import Column @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_column/test_idness.py b/Runtime/safe-ds/tests/data/_column/test_idness.py index f760bf7d0..5d3b141f9 100644 --- a/Runtime/safe-ds/tests/data/_column/test_idness.py +++ b/Runtime/safe-ds/tests/data/_column/test_idness.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import ColumnSizeError +from safeds.data import Column +from safeds.exceptions import ColumnSizeError @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_column/test_max.py b/Runtime/safe-ds/tests/data/_column/test_max.py index e98a6d20d..60b825877 100644 --- a/Runtime/safe-ds/tests/data/_column/test_max.py +++ b/Runtime/safe-ds/tests/data/_column/test_max.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def test_max_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_mean.py b/Runtime/safe-ds/tests/data/_column/test_mean.py index 30f2a69bd..a792fa285 100644 --- a/Runtime/safe-ds/tests/data/_column/test_mean.py +++ b/Runtime/safe-ds/tests/data/_column/test_mean.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def test_mean_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_median.py b/Runtime/safe-ds/tests/data/_column/test_median.py index ef0237010..4834d20db 100644 --- a/Runtime/safe-ds/tests/data/_column/test_median.py +++ b/Runtime/safe-ds/tests/data/_column/test_median.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def test_median_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_min.py b/Runtime/safe-ds/tests/data/_column/test_min.py index cfc52ce1e..7d93b3afb 100644 --- a/Runtime/safe-ds/tests/data/_column/test_min.py +++ b/Runtime/safe-ds/tests/data/_column/test_min.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def test_min_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_missing_value_ratio.py b/Runtime/safe-ds/tests/data/_column/test_missing_value_ratio.py index 942be8515..5262d9410 100644 --- a/Runtime/safe-ds/tests/data/_column/test_missing_value_ratio.py +++ b/Runtime/safe-ds/tests/data/_column/test_missing_value_ratio.py @@ -1,8 +1,8 @@ import numpy as np import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import ColumnSizeError +from safeds.data import Column +from safeds.exceptions import ColumnSizeError @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_column/test_mode.py b/Runtime/safe-ds/tests/data/_column/test_mode.py index 7032ea11f..633e9516f 100644 --- a/Runtime/safe-ds/tests/data/_column/test_mode.py +++ b/Runtime/safe-ds/tests/data/_column/test_mode.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_mode_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_stability.py b/Runtime/safe-ds/tests/data/_column/test_stability.py index 9a7f20c53..645fe8ba9 100644 --- a/Runtime/safe-ds/tests/data/_column/test_stability.py +++ b/Runtime/safe-ds/tests/data/_column/test_stability.py @@ -3,8 +3,8 @@ import numpy as np import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import ColumnSizeError +from safeds.data import Column +from safeds.exceptions import ColumnSizeError @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_column/test_sum.py b/Runtime/safe-ds/tests/data/_column/test_sum.py index 0696fd798..e9d0a1b9f 100644 --- a/Runtime/safe-ds/tests/data/_column/test_sum.py +++ b/Runtime/safe-ds/tests/data/_column/test_sum.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import NonNumericColumnError +from safeds.data import Column +from safeds.exceptions import NonNumericColumnError def test_sum_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_column/test_to_columns.py b/Runtime/safe-ds/tests/data/_column/test_to_columns.py index 4288a6ab6..51bdf8ae3 100644 --- a/Runtime/safe-ds/tests/data/_column/test_to_columns.py +++ b/Runtime/safe-ds/tests/data/_column/test_to_columns.py @@ -1,6 +1,6 @@ import pandas as pd import pytest -from safe_ds.data import Column, Table +from safeds.data import Column, Table @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_imputer/test_imputer.py b/Runtime/safe-ds/tests/data/_imputer/test_imputer.py index f2e7d46cb..50cdfb103 100644 --- a/Runtime/safe-ds/tests/data/_imputer/test_imputer.py +++ b/Runtime/safe-ds/tests/data/_imputer/test_imputer.py @@ -1,7 +1,7 @@ import numpy as np import pandas as pd -from safe_ds.data import Table -from safe_ds.data._imputer import Imputer +from safeds.data import Table +from safeds.data._imputer import Imputer def test_imputer_mean() -> None: diff --git a/Runtime/safe-ds/tests/data/_label_encoder/test_fit_transform.py b/Runtime/safe-ds/tests/data/_label_encoder/test_fit_transform.py index b2d549ae5..15cfbed61 100644 --- a/Runtime/safe-ds/tests/data/_label_encoder/test_fit_transform.py +++ b/Runtime/safe-ds/tests/data/_label_encoder/test_fit_transform.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import LabelEncoder, Table +from safeds.data import LabelEncoder, Table def test_fit_transform_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_label_encoder/test_inverse_transform.py b/Runtime/safe-ds/tests/data/_label_encoder/test_inverse_transform.py index d3e119a46..776204623 100644 --- a/Runtime/safe-ds/tests/data/_label_encoder/test_inverse_transform.py +++ b/Runtime/safe-ds/tests/data/_label_encoder/test_inverse_transform.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import LabelEncoder, Table -from safe_ds.exceptions import NotFittedError +from safeds.data import LabelEncoder, Table +from safeds.exceptions import NotFittedError def test_inverse_transform_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_label_encoder/test_transform.py b/Runtime/safe-ds/tests/data/_label_encoder/test_transform.py index 03bf2c198..1fce7da33 100644 --- a/Runtime/safe-ds/tests/data/_label_encoder/test_transform.py +++ b/Runtime/safe-ds/tests/data/_label_encoder/test_transform.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import LabelEncoder, Table -from safe_ds.exceptions import NotFittedError +from safeds.data import LabelEncoder, Table +from safeds.exceptions import NotFittedError def test_transform_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_one_hot_encoder/test_fit_transform.py b/Runtime/safe-ds/tests/data/_one_hot_encoder/test_fit_transform.py index c2e0a9650..4ea8c9ca3 100644 --- a/Runtime/safe-ds/tests/data/_one_hot_encoder/test_fit_transform.py +++ b/Runtime/safe-ds/tests/data/_one_hot_encoder/test_fit_transform.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import OneHotEncoder, Table +from safeds.data import OneHotEncoder, Table def test_fit_transform() -> None: diff --git a/Runtime/safe-ds/tests/data/_one_hot_encoder/test_inverse_transform.py b/Runtime/safe-ds/tests/data/_one_hot_encoder/test_inverse_transform.py index 7e5a1bb6a..fa9b47492 100644 --- a/Runtime/safe-ds/tests/data/_one_hot_encoder/test_inverse_transform.py +++ b/Runtime/safe-ds/tests/data/_one_hot_encoder/test_inverse_transform.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import OneHotEncoder, Table -from safe_ds.exceptions import NotFittedError +from safeds.data import OneHotEncoder, Table +from safeds.exceptions import NotFittedError def test_fit_transform() -> None: diff --git a/Runtime/safe-ds/tests/data/_one_hot_encoder/test_transform.py b/Runtime/safe-ds/tests/data/_one_hot_encoder/test_transform.py index 31ecf6d35..ad1cd6ff8 100644 --- a/Runtime/safe-ds/tests/data/_one_hot_encoder/test_transform.py +++ b/Runtime/safe-ds/tests/data/_one_hot_encoder/test_transform.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import OneHotEncoder, Table -from safe_ds.exceptions import NotFittedError +from safeds.data import OneHotEncoder, Table +from safeds.exceptions import NotFittedError def test_transform_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_ordinal_encoder/test_fit_transform.py b/Runtime/safe-ds/tests/data/_ordinal_encoder/test_fit_transform.py index 509c37902..902283918 100644 --- a/Runtime/safe-ds/tests/data/_ordinal_encoder/test_fit_transform.py +++ b/Runtime/safe-ds/tests/data/_ordinal_encoder/test_fit_transform.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import IntColumnType, OrdinalEncoder, Table -from safe_ds.exceptions import NotFittedError +from safeds.data import IntColumnType, OrdinalEncoder, Table +from safeds.exceptions import NotFittedError def test_fit_transform_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_ordinal_encoder/test_inverse_transform.py b/Runtime/safe-ds/tests/data/_ordinal_encoder/test_inverse_transform.py index 466fc7735..56204de72 100644 --- a/Runtime/safe-ds/tests/data/_ordinal_encoder/test_inverse_transform.py +++ b/Runtime/safe-ds/tests/data/_ordinal_encoder/test_inverse_transform.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import OrdinalEncoder, StringColumnType, Table +from safeds.data import OrdinalEncoder, StringColumnType, Table def test_inverse_transform() -> None: diff --git a/Runtime/safe-ds/tests/data/_ordinal_encoder/test_transform.py b/Runtime/safe-ds/tests/data/_ordinal_encoder/test_transform.py index a39a80cbd..426127746 100644 --- a/Runtime/safe-ds/tests/data/_ordinal_encoder/test_transform.py +++ b/Runtime/safe-ds/tests/data/_ordinal_encoder/test_transform.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import OrdinalEncoder, Table -from safe_ds.exceptions import NotFittedError +from safeds.data import OrdinalEncoder, Table +from safeds.exceptions import NotFittedError def test_transform_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_row/test_from_rows.py b/Runtime/safe-ds/tests/data/_row/test_from_rows.py index ed73ce941..3b1d63593 100644 --- a/Runtime/safe-ds/tests/data/_row/test_from_rows.py +++ b/Runtime/safe-ds/tests/data/_row/test_from_rows.py @@ -1,4 +1,4 @@ -from safe_ds.data import Row, Table +from safeds.data import Row, Table def test_from_rows() -> None: diff --git a/Runtime/safe-ds/tests/data/_row/test_get_column_names.py b/Runtime/safe-ds/tests/data/_row/test_get_column_names.py index f89453eea..5805a68fe 100644 --- a/Runtime/safe-ds/tests/data/_row/test_get_column_names.py +++ b/Runtime/safe-ds/tests/data/_row/test_get_column_names.py @@ -1,6 +1,6 @@ import numpy as np import pandas as pd -from safe_ds.data import ColumnType, Row, TableSchema +from safeds.data import ColumnType, Row, TableSchema def test_get_column_names() -> None: diff --git a/Runtime/safe-ds/tests/data/_row/test_get_value.py b/Runtime/safe-ds/tests/data/_row/test_get_value.py index 59a154438..d2057a4cf 100644 --- a/Runtime/safe-ds/tests/data/_row/test_get_value.py +++ b/Runtime/safe-ds/tests/data/_row/test_get_value.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def test_get_value_invalid() -> None: diff --git a/Runtime/safe-ds/tests/data/_row/test_getitem.py b/Runtime/safe-ds/tests/data/_row/test_getitem.py index 83420c31d..f8e505807 100644 --- a/Runtime/safe-ds/tests/data/_row/test_getitem.py +++ b/Runtime/safe-ds/tests/data/_row/test_getitem.py @@ -2,8 +2,8 @@ import pandas as pd import pytest -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError # noinspection PyStatementEffect diff --git a/Runtime/safe-ds/tests/data/_row/test_has_column.py b/Runtime/safe-ds/tests/data/_row/test_has_column.py index 88eb8e799..a31185c9f 100644 --- a/Runtime/safe-ds/tests/data/_row/test_has_column.py +++ b/Runtime/safe-ds/tests/data/_row/test_has_column.py @@ -1,4 +1,4 @@ -from safe_ds.data import Table +from safeds.data import Table def test_has_column_positive() -> None: diff --git a/Runtime/safe-ds/tests/data/_row/test_to_rows.py b/Runtime/safe-ds/tests/data/_row/test_to_rows.py index 748954975..fec421694 100644 --- a/Runtime/safe-ds/tests/data/_row/test_to_rows.py +++ b/Runtime/safe-ds/tests/data/_row/test_to_rows.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import IntColumnType, Row, StringColumnType, Table, TableSchema +from safeds.data import IntColumnType, Row, StringColumnType, Table, TableSchema def test_to_rows() -> None: diff --git a/Runtime/safe-ds/tests/data/_supervised_dataset/test_feature_vectors.py b/Runtime/safe-ds/tests/data/_supervised_dataset/test_feature_vectors.py index ab2f60507..d0cf17d36 100644 --- a/Runtime/safe-ds/tests/data/_supervised_dataset/test_feature_vectors.py +++ b/Runtime/safe-ds/tests/data/_supervised_dataset/test_feature_vectors.py @@ -1,4 +1,4 @@ -from safe_ds.data import SupervisedDataset, Table +from safeds.data import SupervisedDataset, Table def test_supervised_dataset_feature_vectors() -> None: diff --git a/Runtime/safe-ds/tests/data/_supervised_dataset/test_target_values.py b/Runtime/safe-ds/tests/data/_supervised_dataset/test_target_values.py index 98cbfcbe0..85a833819 100644 --- a/Runtime/safe-ds/tests/data/_supervised_dataset/test_target_values.py +++ b/Runtime/safe-ds/tests/data/_supervised_dataset/test_target_values.py @@ -1,4 +1,4 @@ -from safe_ds.data import SupervisedDataset, Table +from safeds.data import SupervisedDataset, Table def test_supervised_dataset_target_values() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_add_column.py b/Runtime/safe-ds/tests/data/_table/test_add_column.py index 6b21f92a7..b9838d09a 100644 --- a/Runtime/safe-ds/tests/data/_table/test_add_column.py +++ b/Runtime/safe-ds/tests/data/_table/test_add_column.py @@ -1,8 +1,8 @@ import pandas as pd import pytest from _pytest.python_api import raises -from safe_ds.data import Column, ColumnType, IntColumnType, StringColumnType, Table -from safe_ds.exceptions import ColumnSizeError, DuplicateColumnNameError +from safeds.data import Column, ColumnType, IntColumnType, StringColumnType, Table +from safeds.exceptions import ColumnSizeError, DuplicateColumnNameError @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_table/test_add_columns.py b/Runtime/safe-ds/tests/data/_table/test_add_columns.py index 58a060035..d560678a1 100644 --- a/Runtime/safe-ds/tests/data/_table/test_add_columns.py +++ b/Runtime/safe-ds/tests/data/_table/test_add_columns.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Column, IntColumnType, StringColumnType, Table +from safeds.data import Column, IntColumnType, StringColumnType, Table def test_add_columns_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_add_row.py b/Runtime/safe-ds/tests/data/_table/test_add_row.py index b811b8dcc..b4ab10a32 100644 --- a/Runtime/safe-ds/tests/data/_table/test_add_row.py +++ b/Runtime/safe-ds/tests/data/_table/test_add_row.py @@ -1,7 +1,7 @@ import pandas as pd from _pytest.python_api import raises -from safe_ds.data import IntColumnType, Row, StringColumnType, Table, TableSchema -from safe_ds.exceptions import SchemaMismatchError +from safeds.data import IntColumnType, Row, StringColumnType, Table, TableSchema +from safeds.exceptions import SchemaMismatchError def test_add_row_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_add_rows.py b/Runtime/safe-ds/tests/data/_table/test_add_rows.py index 328515446..c45f34afb 100644 --- a/Runtime/safe-ds/tests/data/_table/test_add_rows.py +++ b/Runtime/safe-ds/tests/data/_table/test_add_rows.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Row, Table +from safeds.data import Row, Table def test_add_rows_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_column_drop.py b/Runtime/safe-ds/tests/data/_table/test_column_drop.py index 4c0f8fbd5..9d3caefd8 100644 --- a/Runtime/safe-ds/tests/data/_table/test_column_drop.py +++ b/Runtime/safe-ds/tests/data/_table/test_column_drop.py @@ -1,6 +1,6 @@ import pytest -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def test_table_column_drop() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_column_keep.py b/Runtime/safe-ds/tests/data/_table/test_column_keep.py index 5116f1fdc..efea3a716 100644 --- a/Runtime/safe-ds/tests/data/_table/test_column_keep.py +++ b/Runtime/safe-ds/tests/data/_table/test_column_keep.py @@ -1,6 +1,6 @@ import pytest -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def test_table_column_keep() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_count_columns.py b/Runtime/safe-ds/tests/data/_table/test_count_columns.py index 6f8c03932..da1e172a8 100644 --- a/Runtime/safe-ds/tests/data/_table/test_count_columns.py +++ b/Runtime/safe-ds/tests/data/_table/test_count_columns.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_count_columns() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_count_rows.py b/Runtime/safe-ds/tests/data/_table/test_count_rows.py index 237fdc2a1..d62bb807d 100644 --- a/Runtime/safe-ds/tests/data/_table/test_count_rows.py +++ b/Runtime/safe-ds/tests/data/_table/test_count_rows.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_count_rows() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_drop_duplicate_rows.py b/Runtime/safe-ds/tests/data/_table/test_drop_duplicate_rows.py index 40e03b4be..0d3218932 100644 --- a/Runtime/safe-ds/tests/data/_table/test_drop_duplicate_rows.py +++ b/Runtime/safe-ds/tests/data/_table/test_drop_duplicate_rows.py @@ -1,6 +1,6 @@ import pandas as pd import pytest -from safe_ds.data import Table +from safeds.data import Table @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_table/test_filter_rows.py b/Runtime/safe-ds/tests/data/_table/test_filter_rows.py index 8e9a492f4..476598965 100644 --- a/Runtime/safe-ds/tests/data/_table/test_filter_rows.py +++ b/Runtime/safe-ds/tests/data/_table/test_filter_rows.py @@ -1,6 +1,6 @@ import pandas as pd import pytest -from safe_ds.data import Table +from safeds.data import Table def test_filter_rows_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_get_column.py b/Runtime/safe-ds/tests/data/_table/test_get_column.py index c10e4a5d1..01ac7d3fe 100644 --- a/Runtime/safe-ds/tests/data/_table/test_get_column.py +++ b/Runtime/safe-ds/tests/data/_table/test_get_column.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column, Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Column, Table +from safeds.exceptions import UnknownColumnNameError def test_get_column_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_get_column_names.py b/Runtime/safe-ds/tests/data/_table/test_get_column_names.py index 65db87d5a..6f3707b51 100644 --- a/Runtime/safe-ds/tests/data/_table/test_get_column_names.py +++ b/Runtime/safe-ds/tests/data/_table/test_get_column_names.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table, TableSchema +from safeds.data import Table, TableSchema def test_get_column_names() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_get_row.py b/Runtime/safe-ds/tests/data/_table/test_get_row.py index 7e3678627..f067c2496 100644 --- a/Runtime/safe-ds/tests/data/_table/test_get_row.py +++ b/Runtime/safe-ds/tests/data/_table/test_get_row.py @@ -1,6 +1,6 @@ import pytest -from safe_ds.data import Table -from safe_ds.exceptions import IndexOutOfBoundsError +from safeds.data import Table +from safeds.exceptions import IndexOutOfBoundsError def test_get_row() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_has_column.py b/Runtime/safe-ds/tests/data/_table/test_has_column.py index e1ac8ab38..d639996d5 100644 --- a/Runtime/safe-ds/tests/data/_table/test_has_column.py +++ b/Runtime/safe-ds/tests/data/_table/test_has_column.py @@ -1,4 +1,4 @@ -from safe_ds.data import Table +from safeds.data import Table def test_has_column_positive() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_list_columns_with_missing_values.py b/Runtime/safe-ds/tests/data/_table/test_list_columns_with_missing_values.py index b5b645f35..94594f07c 100644 --- a/Runtime/safe-ds/tests/data/_table/test_list_columns_with_missing_values.py +++ b/Runtime/safe-ds/tests/data/_table/test_list_columns_with_missing_values.py @@ -1,6 +1,6 @@ import numpy as np import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_list_columns_with_missing_values() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_list_columns_with_non_numerical_values.py b/Runtime/safe-ds/tests/data/_table/test_list_columns_with_non_numerical_values.py index 716f540c9..b2d301947 100644 --- a/Runtime/safe-ds/tests/data/_table/test_list_columns_with_non_numerical_values.py +++ b/Runtime/safe-ds/tests/data/_table/test_list_columns_with_non_numerical_values.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_list_columns_with_non_numerical_values_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_list_columns_with_numerical_values.py b/Runtime/safe-ds/tests/data/_table/test_list_columns_with_numerical_values.py index e70b49ec6..1b9c529c5 100644 --- a/Runtime/safe-ds/tests/data/_table/test_list_columns_with_numerical_values.py +++ b/Runtime/safe-ds/tests/data/_table/test_list_columns_with_numerical_values.py @@ -1,6 +1,6 @@ import numpy as np import pandas as pd -from safe_ds.data import ColumnType, Table, TableSchema +from safeds.data import ColumnType, Table, TableSchema def test_list_columns_with_numerical_values_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_read_csv.py b/Runtime/safe-ds/tests/data/_table/test_read_csv.py index 95596b2ba..bb51763e9 100644 --- a/Runtime/safe-ds/tests/data/_table/test_read_csv.py +++ b/Runtime/safe-ds/tests/data/_table/test_read_csv.py @@ -1,5 +1,5 @@ import pytest -from safe_ds.data import Table +from safeds.data import Table def test_read_csv_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_read_json.py b/Runtime/safe-ds/tests/data/_table/test_read_json.py index eebdc328c..f3cb3017c 100644 --- a/Runtime/safe-ds/tests/data/_table/test_read_json.py +++ b/Runtime/safe-ds/tests/data/_table/test_read_json.py @@ -1,5 +1,5 @@ import pytest -from safe_ds.data import Table +from safeds.data import Table def test_read_json_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_remove_outliers.py b/Runtime/safe-ds/tests/data/_table/test_remove_outliers.py index 3989b7378..f81cbd022 100644 --- a/Runtime/safe-ds/tests/data/_table/test_remove_outliers.py +++ b/Runtime/safe-ds/tests/data/_table/test_remove_outliers.py @@ -1,6 +1,6 @@ import numpy as np import pandas as pd -from safe_ds.data import ColumnType, Table, TableSchema +from safeds.data import ColumnType, Table, TableSchema def test_remove_outliers_no_outliers() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_rename.py b/Runtime/safe-ds/tests/data/_table/test_rename.py index 08e5dbc61..82115fcd9 100644 --- a/Runtime/safe-ds/tests/data/_table/test_rename.py +++ b/Runtime/safe-ds/tests/data/_table/test_rename.py @@ -1,6 +1,6 @@ import pytest -from safe_ds.data import Table -from safe_ds.exceptions import DuplicateColumnNameError, UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import DuplicateColumnNameError, UnknownColumnNameError @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_table/test_replace_column.py b/Runtime/safe-ds/tests/data/_table/test_replace_column.py index 88d7b8605..12fcc5dac 100644 --- a/Runtime/safe-ds/tests/data/_table/test_replace_column.py +++ b/Runtime/safe-ds/tests/data/_table/test_replace_column.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column, Table -from safe_ds.exceptions import ( +from safeds.data import Column, Table +from safeds.exceptions import ( ColumnSizeError, DuplicateColumnNameError, UnknownColumnNameError, diff --git a/Runtime/safe-ds/tests/data/_table/test_shuffle.py b/Runtime/safe-ds/tests/data/_table/test_shuffle.py index 3728f5805..fa6acdc67 100644 --- a/Runtime/safe-ds/tests/data/_table/test_shuffle.py +++ b/Runtime/safe-ds/tests/data/_table/test_shuffle.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_shuffle_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_slice.py b/Runtime/safe-ds/tests/data/_table/test_slice.py index c7df0c881..b06e61e1b 100644 --- a/Runtime/safe-ds/tests/data/_table/test_slice.py +++ b/Runtime/safe-ds/tests/data/_table/test_slice.py @@ -1,6 +1,6 @@ import pandas as pd import pytest -from safe_ds.data import Table +from safeds.data import Table def test_slice_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_sort_columns.py b/Runtime/safe-ds/tests/data/_table/test_sort_columns.py index 326b46711..2b0f8d7ee 100644 --- a/Runtime/safe-ds/tests/data/_table/test_sort_columns.py +++ b/Runtime/safe-ds/tests/data/_table/test_sort_columns.py @@ -2,7 +2,7 @@ import pandas as pd import pytest -from safe_ds.data import Column, Table +from safeds.data import Column, Table @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/data/_table/test_split.py b/Runtime/safe-ds/tests/data/_table/test_split.py index 9e7384529..643c19115 100644 --- a/Runtime/safe-ds/tests/data/_table/test_split.py +++ b/Runtime/safe-ds/tests/data/_table/test_split.py @@ -1,6 +1,6 @@ import pandas as pd import pytest -from safe_ds.data import Table +from safeds.data import Table def test_split_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_summary.py b/Runtime/safe-ds/tests/data/_table/test_summary.py index 6f8e8231c..fdbd2ef5b 100644 --- a/Runtime/safe-ds/tests/data/_table/test_summary.py +++ b/Runtime/safe-ds/tests/data/_table/test_summary.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_summary() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_table.py b/Runtime/safe-ds/tests/data/_table/test_table.py index 27b5f1860..c2d6174ec 100644 --- a/Runtime/safe-ds/tests/data/_table/test_table.py +++ b/Runtime/safe-ds/tests/data/_table/test_table.py @@ -1,5 +1,5 @@ import numpy as np -from safe_ds.data import ColumnType, Table, TableSchema +from safeds.data import ColumnType, Table, TableSchema def test_create_empty_table() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_table_add_column.py b/Runtime/safe-ds/tests/data/_table/test_table_add_column.py index 03b2bc46a..b37ef0f3f 100644 --- a/Runtime/safe-ds/tests/data/_table/test_table_add_column.py +++ b/Runtime/safe-ds/tests/data/_table/test_table_add_column.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column, Table -from safe_ds.exceptions import ColumnSizeError, DuplicateColumnNameError +from safeds.data import Column, Table +from safeds.exceptions import ColumnSizeError, DuplicateColumnNameError def test_table_add_column_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_transform_column.py b/Runtime/safe-ds/tests/data/_table/test_transform_column.py index b7e4a5d4b..d4b3f2279 100644 --- a/Runtime/safe-ds/tests/data/_table/test_transform_column.py +++ b/Runtime/safe-ds/tests/data/_table/test_transform_column.py @@ -1,6 +1,6 @@ import pytest -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def test_transform_column_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table/test_write_and_read.py b/Runtime/safe-ds/tests/data/_table/test_write_and_read.py index 5e8e875f3..e86d613d6 100644 --- a/Runtime/safe-ds/tests/data/_table/test_write_and_read.py +++ b/Runtime/safe-ds/tests/data/_table/test_write_and_read.py @@ -1,7 +1,7 @@ from tempfile import NamedTemporaryFile import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_write_and_read_json_valid() -> None: diff --git a/Runtime/safe-ds/tests/data/_table_schema/test__str__.py b/Runtime/safe-ds/tests/data/_table_schema/test__str__.py index ad8a8d286..d2a7ebab5 100644 --- a/Runtime/safe-ds/tests/data/_table_schema/test__str__.py +++ b/Runtime/safe-ds/tests/data/_table_schema/test__str__.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test__str__() -> None: diff --git a/Runtime/safe-ds/tests/data/_table_schema/test_get_column_index_by_name.py b/Runtime/safe-ds/tests/data/_table_schema/test_get_column_index_by_name.py index 6addd2b59..ecb4b603f 100644 --- a/Runtime/safe-ds/tests/data/_table_schema/test_get_column_index_by_name.py +++ b/Runtime/safe-ds/tests/data/_table_schema/test_get_column_index_by_name.py @@ -1,5 +1,5 @@ import pandas as pd -from safe_ds.data import Table +from safeds.data import Table def test_get_column_index_by_name() -> None: diff --git a/Runtime/safe-ds/tests/data/_table_schema/test_get_column_type.py b/Runtime/safe-ds/tests/data/_table_schema/test_get_column_type.py index a59a09348..e040f5d9a 100644 --- a/Runtime/safe-ds/tests/data/_table_schema/test_get_column_type.py +++ b/Runtime/safe-ds/tests/data/_table_schema/test_get_column_type.py @@ -1,5 +1,5 @@ import numpy as np -from safe_ds.data import ColumnType, Table +from safeds.data import ColumnType, Table def test_get_type_of_column() -> None: diff --git a/Runtime/safe-ds/tests/data/_table_schema/test_has_column.py b/Runtime/safe-ds/tests/data/_table_schema/test_has_column.py index 6375fdff4..74839b0bd 100644 --- a/Runtime/safe-ds/tests/data/_table_schema/test_has_column.py +++ b/Runtime/safe-ds/tests/data/_table_schema/test_has_column.py @@ -1,4 +1,4 @@ -from safe_ds.data import Table +from safeds.data import Table def test_has_column_true() -> None: diff --git a/Runtime/safe-ds/tests/data/_table_schema/test_table_equals.py b/Runtime/safe-ds/tests/data/_table_schema/test_table_equals.py index b1a72fb4a..0f841ca63 100644 --- a/Runtime/safe-ds/tests/data/_table_schema/test_table_equals.py +++ b/Runtime/safe-ds/tests/data/_table_schema/test_table_equals.py @@ -1,4 +1,4 @@ -from safe_ds.data import FloatColumnType, IntColumnType, Table, TableSchema +from safeds.data import FloatColumnType, IntColumnType, Table, TableSchema def test_table_equals_valid() -> None: diff --git a/Runtime/safe-ds/tests/plotting/_plot_boxplot/test_plot_boxplot.py b/Runtime/safe-ds/tests/plotting/_plot_boxplot/test_plot_boxplot.py index c23e2dd10..fee6899d8 100644 --- a/Runtime/safe-ds/tests/plotting/_plot_boxplot/test_plot_boxplot.py +++ b/Runtime/safe-ds/tests/plotting/_plot_boxplot/test_plot_boxplot.py @@ -2,9 +2,9 @@ import matplotlib.pyplot as plt import pandas as pd import pytest -from safe_ds import plotting -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds import plotting +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def test_plot_boxplot_complex() -> None: diff --git a/Runtime/safe-ds/tests/plotting/_plot_correlation_heatmap/test_plot_correlation_heatmap.py b/Runtime/safe-ds/tests/plotting/_plot_correlation_heatmap/test_plot_correlation_heatmap.py index 456047573..fc750ec7f 100644 --- a/Runtime/safe-ds/tests/plotting/_plot_correlation_heatmap/test_plot_correlation_heatmap.py +++ b/Runtime/safe-ds/tests/plotting/_plot_correlation_heatmap/test_plot_correlation_heatmap.py @@ -2,9 +2,9 @@ import matplotlib.pyplot as plt import pandas as pd import pytest -from safe_ds import plotting -from safe_ds.data import Table -from safe_ds.exceptions import NonNumericColumnError +from safeds import plotting +from safeds.data import Table +from safeds.exceptions import NonNumericColumnError def test_plot_correlation_heatmap_non_numeric() -> None: diff --git a/Runtime/safe-ds/tests/plotting/_plot_histogram/test_plot_histogram.py b/Runtime/safe-ds/tests/plotting/_plot_histogram/test_plot_histogram.py index e25f42627..373259ffa 100644 --- a/Runtime/safe-ds/tests/plotting/_plot_histogram/test_plot_histogram.py +++ b/Runtime/safe-ds/tests/plotting/_plot_histogram/test_plot_histogram.py @@ -1,8 +1,8 @@ import _pytest import matplotlib.pyplot as plt import pandas as pd -from safe_ds import plotting -from safe_ds.data import Table +from safeds import plotting +from safeds.data import Table def test_plot_histogram(monkeypatch: _pytest.monkeypatch) -> None: diff --git a/Runtime/safe-ds/tests/plotting/_plot_lineplot/test_plot_lineplot.py b/Runtime/safe-ds/tests/plotting/_plot_lineplot/test_plot_lineplot.py index 922d28338..ba05cc4de 100644 --- a/Runtime/safe-ds/tests/plotting/_plot_lineplot/test_plot_lineplot.py +++ b/Runtime/safe-ds/tests/plotting/_plot_lineplot/test_plot_lineplot.py @@ -2,9 +2,9 @@ import matplotlib.pyplot as plt import pandas as pd import pytest -from safe_ds import plotting -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds import plotting +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def test_plot_lineplot(monkeypatch: _pytest.monkeypatch) -> None: diff --git a/Runtime/safe-ds/tests/plotting/_plot_scatterplot/test_plot_scatterplot.py b/Runtime/safe-ds/tests/plotting/_plot_scatterplot/test_plot_scatterplot.py index 3808b4784..810cc6bda 100644 --- a/Runtime/safe-ds/tests/plotting/_plot_scatterplot/test_plot_scatterplot.py +++ b/Runtime/safe-ds/tests/plotting/_plot_scatterplot/test_plot_scatterplot.py @@ -2,9 +2,9 @@ import matplotlib.pyplot as plt import pandas as pd import pytest -from safe_ds import plotting -from safe_ds.data import Table -from safe_ds.exceptions import UnknownColumnNameError +from safeds import plotting +from safeds.data import Table +from safeds.exceptions import UnknownColumnNameError def test_plot_scatterplot(monkeypatch: _pytest.monkeypatch) -> None: diff --git a/Runtime/safe-ds/tests/regression/_ada_boost/test_fit.py b/Runtime/safe-ds/tests/regression/_ada_boost/test_fit.py index 5dfe24b42..16ca3a781 100644 --- a/Runtime/safe-ds/tests/regression/_ada_boost/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_ada_boost/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import AdaBoost +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import AdaBoost def test_ada_boost_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_ada_boost/test_predict.py b/Runtime/safe-ds/tests/regression/_ada_boost/test_predict.py index 688943a4a..83c633563 100644 --- a/Runtime/safe-ds/tests/regression/_ada_boost/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_ada_boost/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import AdaBoost +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import AdaBoost def test_ada_boost_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_decision_tree/test_fit.py b/Runtime/safe-ds/tests/regression/_decision_tree/test_fit.py index db3e0caea..e7bde70be 100644 --- a/Runtime/safe-ds/tests/regression/_decision_tree/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_decision_tree/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import DecisionTree +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import DecisionTree def test_decision_tree_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_decision_tree/test_predict.py b/Runtime/safe-ds/tests/regression/_decision_tree/test_predict.py index 54ce4f611..245fdda5c 100644 --- a/Runtime/safe-ds/tests/regression/_decision_tree/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_decision_tree/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import DecisionTree +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import DecisionTree def test_decision_tree_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_elastic_net/test_fit.py b/Runtime/safe-ds/tests/regression/_elastic_net/test_fit.py index a1e51b8d3..e91a0dfbb 100644 --- a/Runtime/safe-ds/tests/regression/_elastic_net/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_elastic_net/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import ElasticNetRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import ElasticNetRegression def test_elastic_net_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_elastic_net/test_predict.py b/Runtime/safe-ds/tests/regression/_elastic_net/test_predict.py index 41e3aedbc..f3515b3de 100644 --- a/Runtime/safe-ds/tests/regression/_elastic_net/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_elastic_net/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import ElasticNetRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import ElasticNetRegression def test_elastic_net_regression_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_fit.py b/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_fit.py index 063322323..7417d757b 100644 --- a/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import GradientBoosting +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import GradientBoosting def test_gradient_boosting_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_predict.py b/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_predict.py index 1e0749aea..5d1bb8e60 100644 --- a/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_gradient_boosting_regression/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import GradientBoosting +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import GradientBoosting def test_gradient_boosting_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_fit.py b/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_fit.py index be07a7b72..7c7262597 100644 --- a/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import KNearestNeighbors as KNearestNeighborsRegressor +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import KNearestNeighbors as KNearestNeighborsRegressor def test_k_nearest_neighbors_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_predict.py b/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_predict.py index 2845e17c5..08f6b9f5a 100644 --- a/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_k_nearest_neighbors/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import KNearestNeighbors as KNearestNeighborsRegressor +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import KNearestNeighbors as KNearestNeighborsRegressor def test_k_nearest_neighbors_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_lasso_regression/test_fit.py b/Runtime/safe-ds/tests/regression/_lasso_regression/test_fit.py index 9b0a2474e..ecb15b3ad 100644 --- a/Runtime/safe-ds/tests/regression/_lasso_regression/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_lasso_regression/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import LassoRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import LassoRegression def test_lasso_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_lasso_regression/test_predict.py b/Runtime/safe-ds/tests/regression/_lasso_regression/test_predict.py index 328e4d379..4a895292e 100644 --- a/Runtime/safe-ds/tests/regression/_lasso_regression/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_lasso_regression/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import LassoRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import LassoRegression def test_lasso_regression_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_linear_regression/test_fit.py b/Runtime/safe-ds/tests/regression/_linear_regression/test_fit.py index fc8d14f29..85953b0a3 100644 --- a/Runtime/safe-ds/tests/regression/_linear_regression/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_linear_regression/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import LinearRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import LinearRegression def test_linear_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_linear_regression/test_predict.py b/Runtime/safe-ds/tests/regression/_linear_regression/test_predict.py index fe4f373f1..1e3ef114c 100644 --- a/Runtime/safe-ds/tests/regression/_linear_regression/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_linear_regression/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import LinearRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import LinearRegression def test_linear_regression_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_random_forest/test_fit.py b/Runtime/safe-ds/tests/regression/_random_forest/test_fit.py index f0c7c8865..45af54f60 100644 --- a/Runtime/safe-ds/tests/regression/_random_forest/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_random_forest/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import RandomForest as RandomForestRegressor +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import RandomForest as RandomForestRegressor def test_random_forest_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_random_forest/test_predict.py b/Runtime/safe-ds/tests/regression/_random_forest/test_predict.py index 8e3751713..0e33935ad 100644 --- a/Runtime/safe-ds/tests/regression/_random_forest/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_random_forest/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import RandomForest as RandomForestRegressor +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import RandomForest as RandomForestRegressor def test_random_forest_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/_ridge_regression/test_fit.py b/Runtime/safe-ds/tests/regression/_ridge_regression/test_fit.py index 1b74c53a8..49fed3d05 100644 --- a/Runtime/safe-ds/tests/regression/_ridge_regression/test_fit.py +++ b/Runtime/safe-ds/tests/regression/_ridge_regression/test_fit.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import LearningError -from safe_ds.regression import RidgeRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import LearningError +from safeds.regression import RidgeRegression def test_ridge_regression_fit() -> None: diff --git a/Runtime/safe-ds/tests/regression/_ridge_regression/test_predict.py b/Runtime/safe-ds/tests/regression/_ridge_regression/test_predict.py index 63813b611..e9804494c 100644 --- a/Runtime/safe-ds/tests/regression/_ridge_regression/test_predict.py +++ b/Runtime/safe-ds/tests/regression/_ridge_regression/test_predict.py @@ -1,7 +1,7 @@ import pytest -from safe_ds.data import SupervisedDataset, Table -from safe_ds.exceptions import PredictionError -from safe_ds.regression import RidgeRegression +from safeds.data import SupervisedDataset, Table +from safeds.exceptions import PredictionError +from safeds.regression import RidgeRegression def test_ridge_regression_predict() -> None: diff --git a/Runtime/safe-ds/tests/regression/metrics/test_check_metrics_preconditions.py b/Runtime/safe-ds/tests/regression/metrics/test_check_metrics_preconditions.py index 844666f99..01391444b 100644 --- a/Runtime/safe-ds/tests/regression/metrics/test_check_metrics_preconditions.py +++ b/Runtime/safe-ds/tests/regression/metrics/test_check_metrics_preconditions.py @@ -1,8 +1,8 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.exceptions import ColumnLengthMismatchError -from safe_ds.regression.metrics import _check_metrics_preconditions +from safeds.data import Column +from safeds.exceptions import ColumnLengthMismatchError +from safeds.regression.metrics import _check_metrics_preconditions @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/regression/metrics/test_mean_absolute_error.py b/Runtime/safe-ds/tests/regression/metrics/test_mean_absolute_error.py index 1ad3cd075..043b8016b 100644 --- a/Runtime/safe-ds/tests/regression/metrics/test_mean_absolute_error.py +++ b/Runtime/safe-ds/tests/regression/metrics/test_mean_absolute_error.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.regression.metrics import mean_absolute_error +from safeds.data import Column +from safeds.regression.metrics import mean_absolute_error @pytest.mark.parametrize( diff --git a/Runtime/safe-ds/tests/regression/metrics/test_mean_squared_error.py b/Runtime/safe-ds/tests/regression/metrics/test_mean_squared_error.py index ff778057a..88906695b 100644 --- a/Runtime/safe-ds/tests/regression/metrics/test_mean_squared_error.py +++ b/Runtime/safe-ds/tests/regression/metrics/test_mean_squared_error.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from safe_ds.data import Column -from safe_ds.regression.metrics import mean_squared_error +from safeds.data import Column +from safeds.regression.metrics import mean_squared_error @pytest.mark.parametrize( diff --git a/docs/Stdlib/python/Tutorials/machine_learning.md b/docs/Stdlib/python/Tutorials/machine_learning.md index efbfd72db..025b67622 100644 --- a/docs/Stdlib/python/Tutorials/machine_learning.md +++ b/docs/Stdlib/python/Tutorials/machine_learning.md @@ -4,11 +4,11 @@ Here is a short introduction to train and predict with a machine learning model in safe-ds. -First we need to create a [SupervisedDataset][safe_ds.data.SupervisedDataset] from the training data. +First we need to create a [SupervisedDataset][safeds.data.SupervisedDataset] from the training data. ```python -from safe_ds.data import Table, SupervisedDataset -from safe_ds.regression import LinearRegression +from safeds.data import Table, SupervisedDataset +from safeds.regression import LinearRegression table = Table({"column1": [3, 4, 8, 6, 5], "column2": [2, 2, 1, 6, 3], @@ -23,10 +23,10 @@ to_be_predicted_table = Table({ sup_dataset = SupervisedDataset(table, target_column="target") ``` -[SupervisedDatasets][safe_ds.data.SupervisedDataset] are used in safe-DS to train supervised machine learning models -(e.g. [RandomForest][safe_ds.classification.RandomForest] for classification and -[LinearRegression][safe_ds.regression.LinearRegression] as a regression model), because they keep track of the target -vector. A [SupervisedDataset][safe_ds.data.SupervisedDataset] can be created from a [Table][safe_ds.data.Table] and +[SupervisedDatasets][safeds.data.SupervisedDataset] are used in safe-DS to train supervised machine learning models +(e.g. [RandomForest][safeds.classification.RandomForest] for classification and +[LinearRegression][safeds.regression.LinearRegression] as a regression model), because they keep track of the target +vector. A [SupervisedDataset][safeds.data.SupervisedDataset] can be created from a [Table][safeds.data.Table] and specifying the target vector in the table. ## Create and train model @@ -35,7 +35,7 @@ In this code example, we want to predict the sum of a row. The `table` contains train with (the sum of the rows). The `to_predicted_table` is the table we want to make predictions with, so it does not contain a target vector. -In order to train the [LinearRegression][safe_ds.regression.LinearRegression]-model we need to make the following calls +In order to train the [LinearRegression][safeds.regression.LinearRegression]-model we need to make the following calls in safe-DS: ```python @@ -43,17 +43,17 @@ linear_reg_model = LinearRegression() linear_reg_model.fit(sup_dataset) ``` -As we can see, a [LinearRegression][safe_ds.regression.LinearRegression]-object is created. +As we can see, a [LinearRegression][safeds.regression.LinearRegression]-object is created. In safe-DS machine learning models are separated in different classes where the different fit and predictions methods are implemented for the given machine learning model. ## Predicting new values -So in order to train a linear regression model we create a [LinearRegression][safe_ds.regression.LinearRegression]-object -and call then the [`.fit()`][safe_ds.regression._linear_regression.LinearRegression.fit] +So in order to train a linear regression model we create a [LinearRegression][safeds.regression.LinearRegression]-object +and call then the [`.fit()`][safeds.regression._linear_regression.LinearRegression.fit] -method on this object. Now the `linear_reg_model` is a fitted linear regression model, and we can call the -[`predict(dataset: SupervisedDataset)`][safe_ds.regression._linear_regression.LinearRegression.predict]-method +[`predict(dataset: SupervisedDataset)`][safeds.regression._linear_regression.LinearRegression.predict]-method on this model. ```python @@ -62,10 +62,10 @@ prediction = linear_reg_model.predict(dataset=to_be_predicted_table, ``` After we trained the `linear_reg_model`-object we can make predictions with the model. To do this we call the -[`predict(dataset: Table, target_name: Optional[str])`][safe_ds.regression._linear_regression.LinearRegression.predict]-method +[`predict(dataset: Table, target_name: Optional[str])`][safeds.regression._linear_regression.LinearRegression.predict]-method on the trained model. The `target_name`-parameter is optional, so you do not need to specify it. If you do not specify the `target_name`, the name of the `target_vector` in the given -[SupervisedDataset][safe_ds.data.SupervisedDataset] will be used. +[SupervisedDataset][safeds.data.SupervisedDataset] will be used. ## Results diff --git a/docs/Stdlib/python/Tutorials/visualization.md b/docs/Stdlib/python/Tutorials/visualization.md index 582b8b2d9..273600523 100644 --- a/docs/Stdlib/python/Tutorials/visualization.md +++ b/docs/Stdlib/python/Tutorials/visualization.md @@ -8,7 +8,7 @@ First we need some data to visualize. For this we use the common example of the You can download that dataset on [kaggle](https://www.kaggle.com/c/titanic). ```python -from safe_ds.data import Table +from safeds.data import Table data = Table.from_csv("path/to/your/data.csv") ``` @@ -41,7 +41,7 @@ So next we can start to plot a our columns against each other in a so called Hea But since this type of diagramm only works for numerical values, we are going to use only those. ```python -from safe_ds.plotting import plot_correlation_heatmap +from safeds.plotting import plot_correlation_heatmap data_only_numerics = Table.from_columns(data_cleaned.list_columns_with_numerical_values()) plot_correlation_heatmap(data_only_numerics) @@ -53,7 +53,7 @@ As you can see, the columns _Fare_ and _Pclass_ (Passanger Class) seem to heavil We'll use a linechart to better understand their relationship. ```python -from safe_ds.plotting import plot_lineplot +from safeds.plotting import plot_lineplot plot_lineplot(data_cleaned, "Pclass", "Fare") ``` @@ -67,7 +67,7 @@ Also the difference between second and third is less pronounced. Some other plots that might be useful are boxplots, histogams and scatterplots. ```python -from safe_ds.plotting import plot_boxplot, plot_histogram, plot_scatterplot +from safeds.plotting import plot_boxplot, plot_histogram, plot_scatterplot plot_boxplot(data_cleaned.get_column("Age")) plot_histogram(data_cleaned.get_column("Fare")) diff --git a/docs/Stdlib/python/gen_ref_pages.py b/docs/Stdlib/python/gen_ref_pages.py index a4ad07019..eca4f49bf 100644 --- a/docs/Stdlib/python/gen_ref_pages.py +++ b/docs/Stdlib/python/gen_ref_pages.py @@ -28,7 +28,7 @@ def list_class_and_function_names_in_module(module_name: str) -> list[str]: # Skip demos, tests, etc. parts = tuple(module_path.parts) - if parts[0] != "safe_ds": + if parts[0] != "safeds": continue # Remove the final "__init__" part