diff --git a/antonov_dmitry_lab_1/README.md b/antonov_dmitry_lab_1/README.md index 4820d94..5af24ba 100644 --- a/antonov_dmitry_lab_1/README.md +++ b/antonov_dmitry_lab_1/README.md @@ -1,14 +1,64 @@ # Лаб 1 + Работа с типовыми наборами данных и различными моделями + # Вариант 3 + Данные: make_classification (n_samples=500, n_features=2, n_redundant=0, n_informative=2, random_state=rs, n_clusters_per_class=1) + # Модели: + 1. Линейную регрессию 1. Полиномиальную регрессию (со степенью 3) 1. Гребневую полиномиальную регрессию (со степенью 3, alpha = 1.0) -# Screenshots + +# Графики

- +

Набор лун (moon_dataset)
+ +

+

+

Графики регрессии
+ + + +
+ Линейная MSE: 0.0936 + Полиномиальная (degree=3) MSE: 0.0674 + Гребневая (degree=3, alpha=1.0) MSE: 0.0682 +
+

+ +

+

Набор кругов (circles_dataset)
+ +

+

+

Графики регрессии
+ + + +
+ Линейная MSE: 0.2684 + Полиномиальная (degree=3) MSE: 0.1341 + Гребневая (degree=3, alpha=1.0) MSE: 0.1312 +
+

+ +

+

Набор линейный (linearly_dataset)
+ +

+

+

Графики регрессии
+ + + +
+ Линейная MSE: 0.1101 + Полиномиальная (degree=3) MSE: 0.1045 + Гребневая (degree=3, alpha=1.0) MSE: 0.1078 +

\ No newline at end of file diff --git a/antonov_dmitry_lab_1/lab1.py b/antonov_dmitry_lab_1/lab1.py index f92c5d4..53e49d1 100644 --- a/antonov_dmitry_lab_1/lab1.py +++ b/antonov_dmitry_lab_1/lab1.py @@ -68,7 +68,7 @@ for ds_cnt, ds in enumerate(datasets): # График линейной модели plt.figure(figsize=(10, 6)) - plt.scatter(X_test[:, 0], X_test[:, 1], c=linear_predictions, cmap='coolwarm') + plt.scatter(X_test[:, 0], linear_predictions, c=linear_predictions, cmap='coolwarm') plt.title('Линейная ds'+ str(ds_cnt)) plt.xlabel('X') plt.ylabel('Y') @@ -76,7 +76,7 @@ for ds_cnt, ds in enumerate(datasets): # График полиномиальной модели (degree=3) plt.figure(figsize=(10, 6)) - plt.scatter(X_test[:, 0], X_test[:, 1], c=poly_predictions, cmap='coolwarm') + plt.scatter(X_test[:, 0], poly_predictions, c=poly_predictions, cmap='coolwarm') plt.title('Полиномиальная (degree=3) ds' + str(ds_cnt)) plt.xlabel('X') plt.ylabel('Y') @@ -84,7 +84,7 @@ for ds_cnt, ds in enumerate(datasets): # График гребневой модели (degree=3, alpha=1.0) plt.figure(figsize=(10, 6)) - plt.scatter(X_test[:, 0], X_test[:, 1], c=poly_alpha_predictions, cmap='coolwarm') + plt.scatter(X_test[:, 0], poly_alpha_predictions, c=poly_alpha_predictions, cmap='coolwarm') plt.title('Гребневая (degree=3, alpha=1.0) ds' + str(ds_cnt)) plt.xlabel('X') plt.ylabel('Y') diff --git a/antonov_dmitry_lab_1/screens/myplot1.png b/antonov_dmitry_lab_1/screens/myplot1.png new file mode 100644 index 0000000..8341361 Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot1.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot10.png b/antonov_dmitry_lab_1/screens/myplot10.png new file mode 100644 index 0000000..51ffd37 Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot10.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot11.png b/antonov_dmitry_lab_1/screens/myplot11.png new file mode 100644 index 0000000..3915215 Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot11.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot12.png b/antonov_dmitry_lab_1/screens/myplot12.png new file mode 100644 index 0000000..66f8e9e Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot12.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot2.png b/antonov_dmitry_lab_1/screens/myplot2.png new file mode 100644 index 0000000..37cec3b Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot2.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot3.png b/antonov_dmitry_lab_1/screens/myplot3.png new file mode 100644 index 0000000..87582e0 Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot3.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot4.png b/antonov_dmitry_lab_1/screens/myplot4.png new file mode 100644 index 0000000..f6ac252 Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot4.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot5.png b/antonov_dmitry_lab_1/screens/myplot5.png new file mode 100644 index 0000000..de743ae Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot5.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot6.png b/antonov_dmitry_lab_1/screens/myplot6.png new file mode 100644 index 0000000..41bc933 Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot6.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot7.png b/antonov_dmitry_lab_1/screens/myplot7.png new file mode 100644 index 0000000..890491b Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot7.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot8.png b/antonov_dmitry_lab_1/screens/myplot8.png new file mode 100644 index 0000000..447f06e Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot8.png differ diff --git a/antonov_dmitry_lab_1/screens/myplot9.png b/antonov_dmitry_lab_1/screens/myplot9.png new file mode 100644 index 0000000..0ef0f8c Binary files /dev/null and b/antonov_dmitry_lab_1/screens/myplot9.png differ