data(fourpeaks)
d <- fourpeaks()
#build Morse-Smale complex
ms <- msc.nn.svm(y=d[,1], x=d[, 2:3], nLevels=15, knn = 10)
#predict parttion assignments at level 15
ms$predictLevel = 13
p <- predict(ms, d[, 2:3])
Run the code above in your browser using DataLab