get_benchmark: Benchmark a specific run of the search

Description Usage Arguments Value Author(s) Examples

View source: R/dosearch.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
9
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)

dosearch documentation built on Aug. 19, 2021, 5:07 p.m.