profileRotation.Rd
Ideally a projection pursuit index should be roation invariant, we test this explicitly by profiling the index while rotating a distribution.
profileRotation(d, indexList, indexLabels, n = 200)
index values for each rotation step
d <- as.matrix(sinData(2, 30))
#> New names:
#> • `` -> `...1`
#> • `` -> `...2`
indexList <- list(tourr::holes(), scagIndex("stringy"), mineIndexE("MIC"))
indexLabels <- c("holes", "skinny", "mic")
pRot <- profileRotation(d, indexList, indexLabels, n = 50)
#> Error in dplyr::summarise(., intermediate_scags(vars = c(Var1, Var2), data = all_data, scags = scags, out.rm, euclid, pb)): ℹ In argument: `intermediate_scags(...)`.
#> ℹ In group 1: `Var1 = V2` `Var2 = V1`.
#> Caused by error in `colnames<-`:
#> ! attempt to set 'colnames' on an object with less than two dimensions
plotRotation(pRot)
#> Error: object 'pRot' not found