1000-7
This commit is contained in:
parent
b77003a97a
commit
c6a08076a5
@ -89,8 +89,11 @@
|
||||
"pca = PCA(n_components=2)\n",
|
||||
"reduced_data = pca.fit_transform(X)\n",
|
||||
"\n",
|
||||
"# Преобразуем данные из cupy в numpy\n",
|
||||
"reduced_data_np = reduced_data.get()\n",
|
||||
"\n",
|
||||
"# Визуализация данных\n",
|
||||
"plt.scatter(reduced_data[:, 0], reduced_data[:, 1])\n",
|
||||
"plt.scatter(reduced_data_np[:, 0], reduced_data_np[:, 1])\n",
|
||||
"plt.title('Визуализация данных после PCA')\n",
|
||||
"plt.xlabel('PC1')\n",
|
||||
"plt.ylabel('PC2')\n",
|
||||
@ -187,7 +190,11 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {},
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user