get_benchmark {dosearch}R Documentation

Benchmark a specific run of the search

Description

Returns the benchmarking information of an object of class "dosearch".

Usage

get_benchmark(x, run_again = FALSE, include_rules = FALSE)

Arguments

x

an object of class "dosearch".

run_again

a logical value. If TRUE, run the search again to obtain the benchmarking information if it was not requested in the function call that produced x.

include_rules

A logical value. If TRUE, also benchmark the time taken by each inference rule separately.

Value

A list with one or two elements. The first is always a numeric value of the total time taken by the search in milliseconds. The second is a numeric vector of the time taken by each inference rule (in the internal C++ implementation) of the search in milliseconds if include_rules = TRUE.

Author(s)

Santtu Tikka

Examples


data <- "P(x,y,z)"
query <- "P(y|do(x))"
graph <- "
  x -> y
  z -> x
  z -> y
"
x <- dosearch(data, query, graph, control = list(benchmark = FALSE))
get_benchmark(x, run_again = TRUE)

[Package dosearch version 1.0.8 Index]