R/cluster-classifier.R
k_centroids.Rd
This function calculates the mean value for each feature of each class to calculate the prototypic centroids of the different groups
k_centroids(data, class)
data | a scaled gene expression |
---|---|
class | a vector with the samples classes |
returns a data.frame
with the estimated prototypic centroids
for each class with the features names as rownames
# load example dataset require(iC10TrainingData) require(pamr) data(train.Exp) calculate_distance <- select_distance(distancetype = "pearson")#>#> #> 1 2 3 4 #> 252 161 332 252centroids <- k_centroids(train.Exp, Pam)