A jellyfish optimiser for projection pursuit guided tour

search_jellyfish(current, index, tries, max.tries = 50, ...)

check_dup(bases, min_dist)

Arguments

current

starting projection, a list of basis of class "multi-bases"

index

index function

tries

the counter of the outer loop of the opotimiser

max.tries

the maximum number of iteration before giving up

...

other arguments being passed into the search_jellyfish()

bases

a list of bases extracted from the data collection object, see examples

min_dist

the minimum distance between two bases

Examples

library(dplyr)
#> 
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#> 
#>     filter, lag
#> The following objects are masked from ‘package:base’:
#> 
#>     intersect, setdiff, setequal, union
res <- animate_xy(flea[, 1:6], guided_tour(lda_pp(cl = flea$species),
search_f = search_jellyfish))
#> Converting input data to the required matrix format.
#> Error in as.matrix(data) %*% proj: non-conformable arguments
bases <- res |> filter(loop == 1) |> pull(basis) |> check_dup(0.1)
#> Error: object 'res' not found
animate_xy(data = flea[,1:6], tour_path = planned_tour(bases), col = flea$species)
#> Converting input data to the required matrix format.
#> Error: object 'bases' not found