causal_net: Create a Causal net (also Heuristics net)

View source: R/causal_net.R

causal_netR Documentation

Create a Causal net (also Heuristics net)

Description

Creates a Causal net, also known as Heuristics net. This is similar to a processmapR process map. However, the causal map deals with parallelism by trying to identifying causal dependencies between activities by using different heuristics as documented in dependency_matrix.

Usage

causal_net(
  eventlog = NULL,
  dependencies = dependency_matrix(eventlog = eventlog, threshold = threshold,
    threshold_frequency = threshold_frequency, ...),
  bindings = causal_bindings(eventlog, dependencies),
  threshold = 0.9,
  threshold_frequency = 0,
  type = causal_frequency("absolute"),
  sec = NULL,
  type_nodes = type,
  type_edges = type,
  sec_nodes = sec,
  sec_edges = sec,
  ...
)

Arguments

eventlog

The event log for which a causal map should be computed. Can be left NULL for more control if parameters dependencies and bindings are provided directly.

dependencies

A dependency matrix created for the event log, for example, by dependency_matrix.

bindings

Causal bindings created by causal_bindings.

threshold

The dependency threshold to be used when using the default dependency matrix computation.

threshold_frequency

The frequency threshold to be used when using the default dependency matrix computation.

type

A causal map type. For example, causal_frequency or causal_performance.

sec

A causal process map type. Values are shown between brackets.

type_nodes

A causal map type to be used for nodes only.

type_edges

A causal map type to be used for edges only.

sec_nodes

A secondary causal map type for nodes only.

sec_edges

A secondary causal map type for edges only.

...

Further parameters forwarded to the default dependency_matrix function.

Details

Warning: Projected frequencies are heuristically determined and counts may not add up.

Value

A DiagrammeR graph of the causal map.

Examples

# Causal map with default parameters
causal_net(L_heur_1)

# Causal map with lower dependency treshold
causal_net(L_heur_1, threshold = .8)

# For even more control omit the `eventlog` parameter
# and provide `dependencies` and `bindings` directly.
d <- dependency_matrix(L_heur_1, threshold = .8)
causal_net(dependencies = d,
           bindings = causal_bindings(L_heur_1, d, "nearest"))

# The returned DiagrammeR object can be further augmented with
# panning and zooming before rendering:

library(magrittr)
causal_net(L_heur_1) %>%
 render_causal_net(render = TRUE) %>%
 DiagrammeRsvg::export_svg() %>%
 svgPanZoom::svgPanZoom()



heuristicsmineR documentation built on April 4, 2023, 5:11 p.m.