Calculates search strategies from path metrics.

call_strategy(metrics, model = "default")



An rtrack_metrics object from calculate_metrics, a list of such objects or an rtrack_experiment object.


The strategy calling model that should be used. Default models have been implemented for for Morris water maze and Barnes maze (mwm_rf_v7 and mb_rf_v1 respectively; both trained on mouse data).


An rtrack_strategies object. The calls element contains the called strategy/strategies as well as confidence scores for all possible strategies.


This function implements a classifier based on a trained random forest model. If the model parameter is left at "default", then the default model for the appropriate experiment type will be automatically selected. Please note that search strategies are only available for Morris water maze and Barnes maze at this stage. It is expected that other models will be added in the future and your feedback is welcome.


track_file <- system.file("extdata", "", package = "Rtrack")
arena_description <- system.file("extdata", "Arena.txt", package = "Rtrack")
arena <- read_arena(arena_description)
path <- read_path(track_file, arena, track.format = "")
metrics <- calculate_metrics(path, arena)
strategies <- call_strategy(metrics)
# Inspect the strategy call
#>   strategy            name confidence           1           2           3
#> 1        6 directed search  0.7076923 0.003076923 0.006153846 0.003076923
#>            4    5         6         7 8 9
#> 1 0.08923077 0.04 0.7076923 0.1507692 0 0