[R] Need help with use of ROCK algorithm in R for binary data
Matej Zuzčák
mzuzcak at secit.sk
Mon Aug 15 11:22:32 CEST 2016
Dear list members,
I have one appeal for you.
I need use ROCK (RockCluster) algorithm for binary data in R. My binary
data looks this:
|objects cat1 cat2 cat3 cat4 ...A TRUE FALSE FALSE FALSE B TRUE FALSE
TRUE FALSE C TRUE FALSE FALSE FALSE D FALSE TRUE TRUE TRUE E TRUE TRUE
TRUE TRUE F TRUE FALSE TRUE FALSE|
Now I need clasify these objects A-F to clusters. I apply this procedure
https://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Clustering/RockCluster#Dataset
But I have several problems.
1. I import data from CSV file. |db <- read.csv(file="file.csv",
header=TRUE, sep="|")| Fields are 1 (TRUE) and 0 (FALSE).
2. I convert this data: |x <- as.dummy(db[-1]|). After this step all
columns in x are duplicated with 1 and 0. Why? It is correct please?
3. |rc <- rockCluster(x, n=4, debug=TRUE)|
4. |rf <- fitted(rc)| Why |fitted| and when rather use |predict(rc, x)|?
5. |table(db$objects, rf$cl)| After I get this output:
| 1 NA
A 1 0
B 1 0
C 1 0
D 0 1
E 0 1
F 0 1
|
What way I can read this output? What objects are in clusters with
other? What objects are the most similar please?
Many thanks for your help.
--
Best Regards
Matej Zuzcak
[[alternative HTML version deleted]]
More information about the R-help
mailing list