Learn R Programming

dosearch (version 1.0.8)

get_benchmark: 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)

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.

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.

Author

Santtu Tikka

Examples

Run this code

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)

Run the code above in your browser using DataLab