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",
"execution_count": 21,
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Accuracy: 0.9473684210526315\n",
"Accuracy: 0.9824561403508771\n",
"Accuracy: 0.956140350877193\n"
]
}
@@ -1340,7 +1340,7 @@
"# 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",
"# 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",
"# Vorhersagen auf dem Testset\n",
"y_pred = svm_model.predict(X_test)\n",
@@ -1361,7 +1361,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 34,
"metadata": {},
"outputs": [
{
@@ -1467,20 +1467,6 @@
" plt.title('SVM Decision Boundary')\n",
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {