To make:
tar xzf akmde.tar.gz
cd AKMDE
make
To test:
./test
The cccd code (and utility code) (4/19/01): cccd.tar.gz
To make:
Install R (see CRAN
)
tar xzf cccd.tar.gz
R INSTALL cccd utilities
To test:
R
# get the data
xx <- matrix(scan("mine.dat"),byrow=T,ncol=7)
# assumes mine.dat exists (see below)
x <- xx[xx[,1]==0,2:7]
y <- xx[xx[,1]==1,2:7]
# compute interpoint distances
dxx <- pdist(x)
dyx <- pdistxy(y,x)
# make sure the libraries are loaded
library(cccd)
library(utilities)
# 6 dimensional CCCD with mines as target
a <- cccd(dxx,dyx)
# plot the graph. vertices can be moved with the
mouse
plot(aa,main="Mines")
# get 2D projection of the data
x2 <- x[,c(3,5)]
y2 <- y[,c(3,5)]
# compute the new interpoint distances
dyx2 <- pdistxy(y2,x2)
dxx2 <- pdist(x2)
# 2D CCCD
bb <- cccd(dxx2,dyx2)
# plot 2D CCCD in the plane with points plotted
as vertices.
# non-targets are plotted in red.
plot(bb,list(x=x2,y=y2),ycol="red")
More information on CCCD can be found at
Jason's
Page
The Mine data: mine.dat
These data are features extracted from 39 mine or mine-like objects.
The format of the file is:
class_label x1 x2 x3 x4 x5 x6
where class_label is a 0 (indicating the observation is a mine) or 1
(indicating
the observation is mine-like, but not a mine). Note that several authors
have
made the claim that one of the "mines" is actually misclassified (it
shows up
as an outlier in the upper corner in the plots below.
Consider just the variates x3 and x5. The cccd for various values of
beta are
shown in the following graphs. The blue dots correspond to mines. The
horizontal
eccentricity indicates the size of the ball associated with that vertex.
The vertical
eccentricity indicates the number of mine observations covered by the
ball.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Here is a decision region for the beta=0 cccd. Red indicates mine, blue indicates not mine, black indicates no decision, and purple indicates that the region falls in both the mine and not-mine balls.
To generate the above picture in R, assuming you have already done the above R code, type:
dyy2 <- pdist(y2)
qq <- cccd(dyy2,t(dyx2))
plot2D.classifier.cccd(bb,qq)
Play around with
plot2D.classifier.cccd(bb,qq,theta=.8)
and other values of theta and see if you can figure out what theta does
(note: Carey incorrectly denotes
this delta).
Setting beta=4 and choosing alpha=0,1,5 we see the domination number change from 3 to 2 to 1 (dominating set indicated by green dots):
To get plots like this with the R code, type (for instance):
bb4 <- cccd(dxx2,dyx2,beta=4)
bb4.1 <- dominate(bb4,alpha=1)
col1 <- rep("blue",nrow(dxx2))
col1[bb4.1] <- "green"
plot(bb4,list(x=x2,y=y2),ycol="red",colornames=col1)