This function is a wrapper for hyperoverlap_detect for pairwise overlap detection between multiple entities.
hyperoverlap_set(x, y, kernel = "polynomial",kernel.degree = 3, cost = 1000,
stoppage.threshold = 0.2, write.to.file = FALSE,
path = NULL,
sample.dimensionality.omit = "FALSE")A long-form matrix with the following columns:
entity1,
entity2,
shape,
polynomial.order (if kernel="polynomial"),
result,
number.of.points.misclassified.
If specified, individual Hyperoverlap-class objects are written to file.
A matrix or data.frame containing the variables of interest for both entities.
A vector of labels.
Character. Either "linear" or "polynomial" (default = "polynomial").
Parameter needed for kernel = polynomial (default = 3).
Specifies the SVM margin 'hardness'. Default value is 1000, but can be increased for improved accuracy (although this increases runtimes and memory usage).
Numeric. If the number of points misclassified using a linear hyperplane exceeds this proportion of the number of observations, non-linear separation is not attempted. Must be between 0 and 1 (default = 0.2).
Logical. If TRUE, each hyperoverlap-class object is saved as a .rds file.
Character. Path to write .rds files to. Ignored if write.to.file=FALSE
Logical. If TRUE, omits any entity pairs with a combined sample size less than n+1, where n is the number of dimensions (see details).
In n dimensions, any set of points up to n+1 points can be separated using a linear hyperplane. This may produce an artefactual non-overlap result.
The sample.dimensionality.omit parameter gives two options for dealing with these pairs when they form part of a larger analysis.
If sample.dimensionality.omit = "TRUE", this pair is removed from the analysis (result = NA).
If sample.dimensionality.omit = "FALSE", the pair is included, but a warning is printed.
data(iris)
hyperoverlap.iris.set = hyperoverlap_set(iris[1:3],iris$Species, kernel="linear")
Run the code above in your browser using DataLab