Calculate Potential Space
Calculates the representation of the training classes in potential space.
depth.space.potential(data, cardinalities, pretransform = "NMom", kernel = "GKernel", kernel.bandwidth = NULL, mah.parMcd = 0.75)
data |
Matrix containing training sample where each row is a d-dimensional object, and objects of each class are kept together so that the matrix can be thought of as containing blocks of objects representing classes. |
cardinalities |
Numerical vector of cardinalities of each class in |
pretransform |
The method of data scaling.
The data may be scaled jointly or separately:
You may use traditional moments or Minimum Covariance Determinant (MCD) estimates for mean and covariance:
|
kernel |
|
kernel.bandwidth |
the bandwidth parameter of the kernel. If |
mah.parMcd |
is the value of the argument |
The potential representation is calculated in the same way as in depth.potential
, see References below for more information and details.
Matrix of objects, each object (row) is represented via its potentials (columns) w.r.t. each of the classes of the training sample; order of the classes in columns corresponds to the one in the argument cardinalities
.
Aizerman, M.A., Braverman, E.M., and Rozonoer, L.I. (1970). The Method of Potential Functions in the Theory of Machine Learning. Nauka (Moscow).
Pokotylo, O. and Mosler, K. (2015). Classification with the pot-pot plot. Mimeo.
ddalpha.train
and ddalpha.classify
for application, depth.potential
for calculation of the potential.
# Generate a bivariate normal location-shift classification task # containing 20 training objects class1 <- mvrnorm(50, c(0,0), matrix(c(1,1,1,4), nrow = 2, ncol = 2, byrow = TRUE)) class2 <- mvrnorm(50, c(1,1), matrix(c(1,1,1,4), nrow = 2, ncol = 2, byrow = TRUE)) data <- rbind(class1, class2) plot(data, col = c(rep(1,50), rep(2,50))) # potential with rule of thumb bandwidth ds = depth.space.potential(data, c(50, 50)) # draw.ddplot(depth.space = ds, cardinalities = c(50, 50)) # potential with bandwidth = 0.5 and joint scaling ds = depth.space.potential(data, c(50, 50), kernel.bandwidth = 0.5, pretransform = "1Mom") # draw.ddplot(depth.space = ds, cardinalities = c(50, 50)) # potential with bandwidth = 0.5 and separate scaling ds = depth.space.potential(data, c(50, 50), kernel.bandwidth = 0.5, pretransform = "NahMom") # or without pretransform # draw.ddplot(depth.space = ds, cardinalities = c(50, 50)) data <- getdata("hemophilia") cardinalities = c(sum(data$gr == "normal"), sum(data$gr == "carrier")) ds = depth.space.potential(data[,1:2], cardinalities) # draw.ddplot(depth.space = ds, cardinalities = cardinalities)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.