Skip to content

Commit

Permalink
Fix typo in kmeans clustering
Browse files Browse the repository at this point in the history
  • Loading branch information
rdpeng committed May 13, 2015
1 parent 52d8682 commit c865b64
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 137 deletions.
4 changes: 2 additions & 2 deletions 04_ExploratoryAnalysis/kmeansClustering/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ framework : io2012 # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
url:
lib: ../../libraries
lib: ../../librariesNew
assets: ../../assets
widgets : [mathjax] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
Expand Down Expand Up @@ -250,7 +250,7 @@ points(kmeansObj$centers,col=1:3,pch=3,cex=3,lwd=3)
```{r, dependson="kmeans",fig.height=4,fig.width=8}
set.seed(1234)
dataMatrix <- as.matrix(dataFrame)[sample(1:12),]
kmeansObj2 <- kmeans(dataMatrix,centers=3)
kmeansObj <- kmeans(dataMatrix,centers=3)
par(mfrow=c(1,2), mar = c(2, 4, 0.1, 0.1))
image(t(dataMatrix)[,nrow(dataMatrix):1],yaxt="n")
image(t(dataMatrix)[,order(kmeansObj$cluster)],yaxt="n")
Expand Down
Loading

0 comments on commit c865b64

Please sign in to comment.