의 결과지금은 (알렉시스의 Sarda - 노사 & 알렉시스의 Sarda ~을 작성자에게 감사) <code>dtwclust</code> 패키지를 사용하고 dtwclust
내가 쉽게 문제에 붙어 얻을하는 방법. 여기 내 코드가있다.
sc <- read.table("D:/handling data/confirm.csv", header=T, sep=",")
rownames(sc) <- sc$STDR_YM_CD
sc$STDR_YM_CD <- NULL
sc <- t(sc)
hc_sbd <- dtwclust(sc, type = 'h', k=3L, method = 'average', preproc = zscore,
distance = 'dtw', control = list(trace=TRUE))
plot([email protected])
plot(hc_sbd, type='sc')
plot(hc_sbd, type='series', clus=2)
plot(hc_sbd, type='centroids', clus=2)
head(hc_sbd)
write.xlsx(hc_sbd, "D:/handling data/tab1clustn.xlsx")
나는이 그림을 얻었다. 그리고 클러스터 레이블로 데이터를 내보내고 싶습니다. 두 번째 그림처럼.
는 여기에 내가 STDR_YM_CD 당신이 DTW와 클러스터 싶습니다 고유 식별자 가정 내 데이터 링크 http://blogattach.naver.com/e772fb415a6c6ddafd137d427d9ee7953f6e9146/20170207_141_blogfile/khm2963_1486442387926_THgZRt_csv/confirm.csv?type=attachment
데이터를 공유 할 수 있습니까 –
오케이. 하하 미안해. 늦었 어 –
CSV 파일을 공유 할 수 있습니까? 또는'dput' 데이터? –