added kmeans and downproj

This commit is contained in:
2025-04-11 15:23:44 +02:00
parent f1f72145da
commit 57b4117951
11 changed files with 5300 additions and 18 deletions

View File

@@ -1311,14 +1311,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 21, "execution_count": 35,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"Accuracy: 0.9473684210526315\n", "Accuracy: 0.9824561403508771\n",
"Accuracy: 0.956140350877193\n" "Accuracy: 0.956140350877193\n"
] ]
} }
@@ -1340,7 +1340,7 @@
"# Aufteilen der Daten in Trainings- und Testset (80% Training, 20% Test)\n", "# Aufteilen der Daten in Trainings- und Testset (80% Training, 20% Test)\n",
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n", "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n",
"# SVM-Modell mit RBF-Kernel\n", "# SVM-Modell mit RBF-Kernel\n",
"svm_model = SVC(kernel='rbf', gamma='scale', C=1.0)\n", "svm_model = SVC(kernel='rbf', gamma='scale', C=100)\n",
"svm_model = svm_model.fit(X_train, y_train)\n", "svm_model = svm_model.fit(X_train, y_train)\n",
"# Vorhersagen auf dem Testset\n", "# Vorhersagen auf dem Testset\n",
"y_pred = svm_model.predict(X_test)\n", "y_pred = svm_model.predict(X_test)\n",
@@ -1361,7 +1361,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 22, "execution_count": 34,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -1467,20 +1467,6 @@
" plt.title('SVM Decision Boundary')\n", " plt.title('SVM Decision Boundary')\n",
" plt.show()" " plt.show()"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB