This is a novel method for finding more interesting projections for the guided tour. It works by first taking a small step in n random directions, and then picking the direction that looks most promising (based on the height of the index function), which is effectively a gradient search. Then it performs a linear search along the geodesic in that direction, traveling up to half way around the sphere.

search_geodesic(
  current,
  alpha = 1,
  index,
  tries,
  max.tries = 5,
  ...,
  n = 5,
  delta = 0.01,
  cur_index = NA
)

Arguments

current

starting projection

alpha

maximum distance to travel (currently ignored)

index

interestingness index function

tries

the counter of the outer loop of the opotimiser

max.tries

maximum number of failed attempts before giving up

...

other arguments being passed into the search_geodesic()

n

number of random steps to take to find best direction

delta

step size for evaluation of best direction

cur_index

index value for starting projection, set NA if it needs to be calculated

Details

You should not to have call this function directly, but should supply it to the guided_tour as a search strategy.

Examples

animate_xy(flea[, 1:6], guided_tour(holes(), search_f = search_geodesic))
#> Converting input data to the required matrix format.
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> Value  1.582   0.0 % better 
#> No better bases found after 25 tries.  Giving up.
#> Final projection: 
#> -0.452  0.123  
#> 0.370  -0.028  
#> 0.571  -0.069  
#> 0.085  -0.932  
#> 0.472  0.311  
#> -0.320  -0.119  
#> Using half_range 66