View source: R/depth.projection.r
depth.space.projection | R Documentation |
Calculates the representation of the training classes in depth space using projection depth.
depth.space.projection(data, cardinalities,
method = "random", num.directions = 1000, seed = 0)
data |
Matrix containing training sample where each row is a |
cardinalities |
Numerical vector of cardinalities of each class in |
method |
to be used in calculations.
|
num.directions |
Number of random directions to be generated for |
seed |
the random seed. The default value |
The depth representation is calculated in the same way as in depth.projection
, see 'References' for more information and details.
Matrix of objects, each object (row) is represented via its depths (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
.
Donoho, D.L. (1982). Breakdown properties of multivariate location estimators. Ph.D. qualifying paper. Department of Statistics, Harvard University.
Liu, R.Y. (1992). Data depth and multivariate rank tests. In: Dodge, Y. (ed.), L1-Statistics and Related Methods, North-Holland (Amsterdam), 279–294.
Liu, X. and Zuo, Y. (2014). Computing projection depth and its associated estimators. Statistics and Computing 24 51–63.
Stahel, W.A. (1981). Robust estimation: infinitesimal optimality and covariance matrix estimators. Ph.D. thesis (in German). Eidgenossische Technische Hochschule Zurich.
Zuo, Y.J. and Lai, S.Y. (2011). Exact computation of bivariate projection depth and the Stahel-Donoho estimator. Computational Statistics and Data Analysis 55 1173–1179.
ddalpha.train
and ddalpha.classify
for application, depth.projection
for calculation of projection depth.
# Generate a bivariate normal location-shift classification task
# containing 20 training objects
class1 <- mvrnorm(10, c(0,0),
matrix(c(1,1,1,4), nrow = 2, ncol = 2, byrow = TRUE))
class2 <- mvrnorm(10, c(2,2),
matrix(c(1,1,1,4), nrow = 2, ncol = 2, byrow = TRUE))
data <- rbind(class1, class2)
# Get depth space using projection depth
depth.space.projection(data, c(10, 10), method = "random", num.directions = 1000)
depth.space.projection(data, c(10, 10), method = "linearize")
data <- getdata("hemophilia")
cardinalities = c(sum(data$gr == "normal"), sum(data$gr == "carrier"))
depth.space.projection(data[,1:2], cardinalities)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.