Convex-hull-peeling depth#
- DepthEucl.qhpeeling(x: ndarray | None = None, evaluate_dataset: bool = False) ndarray [source]
Calculates the convex hull peeling depth of points w.r.t. a multivariate data set.
- Usage
qhpeeling(x, data)
- Arguments
- x: array-like or None, default=None
Matrix of objects (numerical vector as one object) whose depth is to be calculated; each row contains a d-variate point. Should have the same dimension as data.
- evaluate_datasetbool, default=False
Determines if dataset loaded will be evaluated. Automatically sets x to dataset
- References
Barnett, V. (1976). The ordering of multivariate data. Journal of the Royal Statistical Society, Series A, 139, 318–355.
Eddy, W. F. (1981). Graphics for the multivariate two-sample problem: Comment. Journal of the American Statistical Association, 76, 287–289.
- Examples
>>> from depth.model import DepthEucl >>> mat1=[[1, 0, 0, 0, 0],[0, 2, 0, 0, 0],[0, 0, 3, 0, 0],[0, 0, 0, 2, 0],[0, 0, 0, 0, 1]] >>> mat2=[[1, 0, 0, 0, 0],[0, 1, 0, 0, 0],[0, 0, 1, 0, 0],[0, 0, 0, 1, 0],[0, 0, 0, 0, 1]] >>> x = np.random.multivariate_normal([1,1,1,1,1], mat2, 10) >>> data = np.random.multivariate_normal([0,0,0,0,0], mat1, 100) >>> model=DepthEucl().load_dataset(data) >>> model.qhpeeling(x) [0. 0. 0. 0. 0. 0. 0.01 0. 0. 0.01]