資源簡介
模式識別作業(yè),這個(gè)做出來之后效果很炫,所以和大家分享一下,共同學(xué)習(xí)!使用說明詳見我的博客--模式識別專欄 內(nèi)容包含譜聚類所有代碼,以及一個(gè)月亮形的數(shù)據(jù)集!
代碼片段和文件信息
import?numpy?as?np
#?Create?Data?Set
mean1?=?[1?-1]
cov1?=?[[1?0]?[0?1]]
x1?=?np.random.multivariate_normal(mean1?cov1?200)
mean2?=?[5.5?-4.5]
x2?=?np.random.multivariate_normal(mean2?cov1?200)
mean3?=?[1?4]
x3?=?np.random.multivariate_normal(mean3?cov1200)
mean4?=?[6?4.5]
x4?=?np.random.multivariate_normal(mean4?cov1?200)
mean5?=?[9?0.0]
x5?=?np.random.multivariate_normal(mean5?cov1200)
X?=?np.vstack((x1?x2?x3?x4?x5))
f1?=?open(“data_moon.csv“?“rb“)
case_train?=?np.loadtxt(f1?delimiter=‘‘?skiprows=0)
f1.close()
X?=?np.array(case_train)
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-06-24?11:25??python_spectral_clustering\
?????文件????????3824??2019-12-01?01:56??python_spectral_clustering\K_Means.py
?????文件?????????316??2019-12-01?01:56??__MACOSX\python_spectral_clustering\._K_Means.py
?????文件????????1676??2019-12-01?01:54??python_spectral_clustering\main_kmeans.py
?????文件?????????264??2019-12-01?01:54??__MACOSX\python_spectral_clustering\._main_kmeans.py
?????文件????????7931??2019-11-28?03:28??python_spectral_clustering\spectral_acc.py
?????文件?????????316??2019-11-28?03:28??__MACOSX\python_spectral_clustering\._spectral_acc.py
?????文件????????2953??2019-11-25?11:47??python_spectral_clustering\data_moon.csv
?????文件?????????320??2019-11-25?11:47??__MACOSX\python_spectral_clustering\._data_moon.csv
?????文件????????1387??2019-11-28?01:03??python_spectral_clustering\knn_alg.py
?????文件?????????264??2019-11-28?01:03??__MACOSX\python_spectral_clustering\._knn_alg.py
?????目錄???????????0??2020-06-24?11:25??python_spectral_clustering\__pycache__\
?????文件???????14787??2019-11-25?11:47??python_spectral_clustering\data.csv
?????文件?????????320??2019-11-25?11:47??__MACOSX\python_spectral_clustering\._data.csv
?????文件????????5494??2019-11-28?07:44??python_spectral_clustering\spectral.py
?????文件?????????316??2019-11-28?07:44??__MACOSX\python_spectral_clustering\._spectral.py
?????文件????????1685??2019-11-28?07:46??python_spectral_clustering\spectral_moon_data.py
?????文件?????????316??2019-11-28?07:46??__MACOSX\python_spectral_clustering\._spectral_moon_data.py
?????文件?????????577??2019-11-26?13:03??python_spectral_clustering\create_data.py
?????文件?????????264??2019-11-26?13:03??__MACOSX\python_spectral_clustering\._create_data.py
?????文件?????????997??2019-11-28?09:04??python_spectral_clustering\test_kmeans.py
?????文件?????????264??2019-11-28?09:04??__MACOSX\python_spectral_clustering\._test_kmeans.py
?????文件????????3454??2020-06-24?11:25??python_spectral_clustering\__pycache__\spectral.cpython-37.pyc
?????文件????????2545??2020-06-24?11:25??python_spectral_clustering\__pycache__\K_Means.cpython-37.pyc
評論
共有 條評論