pcd_cccd_classifier: The PCD classifier based on the cover of the two (or more)...

View source: R/pcd.R

pcd_cccd_classifierR Documentation

The PCD classifier based on the cover of the two (or more) classes wherein the points inside the convex hull are classified with PCDs, and ones that are outside with CCCDs

Description

The PCD classifier based on the cover of the two (or more) classes wherein the points inside the convex hull are classified with PCDs, and ones that are outside with CCCDs

Usage

pcd_cccd_classifier(data, classes, map = "pe", p_pcd = 1, p_cccd = 1)

Arguments

data

An m-by-d matrix of the training data set.

classes

A vector of length n indicating the labels of the classes.

map

The Proximity Map associated with the classifier. "pe" for the Proportional-edge proximity maps and "cs" for the Central-similarity proximity maps.

p_pcd

The value of the parameter associated with the proximity map of the PCD.

p_cccd

The value of the parameter associated with the CCCD.

Value

A proximity catch digraph and a class cover catch digraph with the minimum dominating set and the associated proximity regions.

Examples


# input parameters
ntest <- 100     # test data size for each class
nx <- 300        # training data size of x class (majority)
r <- 0.1         # Imbalance Ratio
de <- 0.5        # delta, the overlapping parameter
dimx <- 2        # number of dimensions

# training the classifier
set.seed(1)
x0 <- matrix(runif(dimx*nx,0,1),nrow=nx)
x1 <- matrix(runif(dimx*nx*r,de,1+de),nrow=nx*r)
x <- rbind(x0,x1)
classes <- rep(1:2,c(nx,nx*r))
graph_pcd <- pcd_cccd_classifier(x,classes,map="pe",p_pcd=1,p_cccd=1)

Artur-man/PCDSL documentation built on Feb. 24, 2024, 11:15 p.m.