c_regularity {stops} | R Documentation |
c-regularity calculates c-regularity as 1 - OPTICS cordillera for k=2. The higher the more regular.
Description
c-regularity calculates c-regularity as 1 - OPTICS cordillera for k=2. The higher the more regular.
Usage
c_regularity(
confs,
q = 1,
epsilon = 2 * max(dist(confs)),
distmeth = "euclidean",
dmax = NULL,
digits = 10,
scale = 0,
...
)
Arguments
confs |
a numeric matrix or a dist object |
q |
The norm used for the Cordillera. Defaults to 1 (and should always be 1 imo). |
epsilon |
The epsilon parameter for OPTICS (called epsilon_max in the paper). Defaults to 2 times the maximum distance between any two points. |
distmeth |
The distance to be computed if X is not a symmetric matrix or a dist object (otherwise ignored). Defaults to Euclidean distance. |
dmax |
The winsorization value for the highest allowed reachability. If used for comparisons this should be supplied. If no value is supplied, it is NULL (default), then dmax is taken from the data as minimum of epsilon or the largest reachability. |
digits |
The precision to round the raw Cordillera and the norm factor. Defaults to 10. |
scale |
Should X be scaled if it is an asymmetric matrix or data frame? Can take values TRUE or FALSE or a numeric value. If TRUE or 1, standardisation is to mean=0 and sd=1. If 2, no centering is applied and scaling of each column is done with the root mean square of each column. If 3, no centering is applied and scaling of all columns is done as X/max(standard deviation(allcolumns)). If 4, no centering is applied and scaling of all columns is done as X/max(rmsq(allcolumns)). If FALSE, 0 or any other numeric value, no standardisation is applied. Defaults to 0. |
... |
Additional arguments to be passed to |
Value
a numeric value; regularity
Examples
hpts<-expand.grid(seq(-5,5),seq(-5,5))
c_regularity(hpts)
hpts2<-cbind(jitter(hpts[,1]),jitter(hpts[,2]))
c_regularity(hpts2)