ClusteringAlgo {sharp} | R Documentation |
(Weighted) clustering algorithm
Description
Runs the (weighted) clustering algorithm specified in the argument
implementation
and returns matrices of variable weights, and the
co-membership structure. This function is not using stability.
Usage
ClusteringAlgo(
xdata,
nc = NULL,
eps = NULL,
Lambda = NULL,
scale = TRUE,
row = TRUE,
implementation = HierarchicalClustering,
...
)
Arguments
xdata |
data matrix with observations as rows and variables as columns. |
nc |
matrix of parameters controlling the number of clusters in the
underlying algorithm specified in |
eps |
radius in density-based clustering, see
|
Lambda |
vector of penalty parameters. |
scale |
logical indicating if the data should be scaled to ensure that all variables contribute equally to the clustering of the observations. |
row |
logical indicating if rows (if |
implementation |
function to use for clustering. Possible functions
include |
... |
additional parameters passed to the function provided in
|
Value
A list with:
selected |
matrix of binary selection status. Rows correspond to different model parameters. Columns correspond to predictors. |
weight |
array of model coefficients. Rows correspond to different model parameters. Columns correspond to predictors. Indices along the third dimension correspond to outcome variable(s). |
comembership |
array of model coefficients. Rows correspond to different model parameters. Columns correspond to predictors. Indices along the third dimension correspond to outcome variable(s). |
See Also
Other underlying algorithm functions:
CART()
,
PenalisedGraphical()
,
PenalisedOpenMx()
,
PenalisedRegression()
Examples
# Simulation of 15 observations belonging to 3 groups
set.seed(1)
simul <- SimulateClustering(
n = c(5, 5, 5), pk = 100
)
# Running hierarchical clustering
myclust <- ClusteringAlgo(
xdata = simul$data, nc = 2:5,
implementation = HierarchicalClustering
)