Search very locally to find slightly better projections to polish a broader search.

search_polish(
  current,
  alpha = 0.5,
  index,
  tries,
  polish_max_tries = 30,
  cur_index = NA,
  n_sample = 100,
  polish_cooling = 1,
  ...
)

Arguments

current

the current projection basis

alpha

the angle used to search the target basis from the current basis

index

index function

tries

the counter of the outer loop of the opotimiser

polish_max_tries

maximum number of iteration before giving up

cur_index

the index value of the current basis

n_sample

number of samples to generate

polish_cooling

percentage of reduction in polish_alpha when no better basis is found

...

other arguments being passed into the search_polish()

Examples

data(t1)
best_proj <- t1[, , dim(t1)[3]]
attr(best_proj, "data") <- NULL
best_proj <- unclass(drop(best_proj))
animate_xy(
  flea[, 1:6],
  guided_tour(holes()),
    search_f = search_polish(
         polish_max_tries = 5),
  start = best_proj
)
#> 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.527  0.039  
#> -0.040  0.391  
#> -0.037  0.456  
#> 0.059  0.524  
#> -0.846  -0.007  
#> 0.027  0.602  
#> Using half_range 66