I wondered if anybody would be able to help with some R code for unsupervised recursive feature elimination (uRFE), please?
In short, I ran an unsupervised SOM, partitioned with k-medoids, but would also like to identify uRFE using the silhouette score.
Attached some dummy code below. If possible, I would appreciate help with some code to do uRFE on the SOM, and therefore identify which features are most relevant when clustering
library(aweSOM)
#IRIS DATA
full.data <- iris
train.data <- full.data[, c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width")]
train.data <- scale(train.data)
#SOM INITITIALISATION + MAP
set.seed(1465)
init <- somInit(train.data, 4, 4)
iris.som <- kohonen::som(train.data, grid = kohonen::somgrid(4, 4, "hexagonal"),
rlen = 100, alpha = c(0.05, 0.01), radius = c(2.65,-2.65),
dist.fcts = "sumofsquares", init = init)
#SOM CLUSTERS
superclust_pam <- cluster::pam(iris.som$codes[[1]], 3)
superclasses_pam <- superclust_pam$clustering
3