Computes embedding-based metrics for the specified level.
Usage
getEmbeddingMetrics(
x,
labels,
metrics = NULL,
distance = "euclidean",
level = "class",
...
)Arguments
- x
A data.frame or matrix (with features as columns and items as rows) from which the metrics will be computed.
- labels
A vector containing the labels of the predicted clusters. Must be a vector of characters, integers, numerics, or a factor, but not a list.
- metrics
The metrics to compute. See details.
- distance
The distance metric to use (default euclidean).
- level
The level to calculate the metrics. Options include
"element","class"and"dataset".- ...
Optional arguments. See details.
Details
The allowed values for metrics depend on the value of level:
If
level = "element", the allowedmetricsare:"SW".If
level = "class", the allowedmetricsare:"meanSW","minSW","pnSW","dbcv".If
level = "dataset", the allowedmetricsare:"meanSW","meanClassSW","pnSW","minClassSW","cdbw","cohesion","compactness","sep","dbcv".
The function(s) that the optional arguments ... passed to depend on the
value of level:
If
level = "element", optional arguments are passed tostats::dist().If
level = "class", optional arguments are passed todbcv().If
level = "dataset", optional arguments are passed todbcv()orCDbw().