get_discrete_structure_filter: Filter blacklist and whitelist before training bayesian...

Description Usage Arguments Value Examples

View source: R/main.R

Description

Filter blacklist and whitelist before training bayesian network

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
get_discrete_structure_filter(
  discrete_data,
  desire_layers,
  quantile_number,
  continuous_variables,
  discrete_variables,
  known_structure,
  corr_threshold,
  is_blacklist_internal,
  is_variable_only,
  is_blacklist_other,
  custom_blacklist,
  custom_whitelist,
  debug = FALSE
)

Arguments

desire_layers

Number of layers for training bayesian network, less than or equal current layers

quantile_number

For type is "discrete", number of quantile for each continuous variable

continuous_variables

Column names of continuous dynamic KPI

discrete_variables

Column names of discrete dynamic KPI

known_structure

Relation between KPI specific by user

corr_threshold

Threshold for filter arcs with low correlation

is_blacklist_internal

Is blacklist all internal arcs in n-i layers (n is number layers, i = 1..n-1)

is_variable_only

Is known_structure is KPI only, without time notation

is_blacklist_other

Is blacklist all except whitelist

custom_blacklist

Blacklist specific by user

custom_whitelist

Whitelist sepcific by user

continuous_data

A data frame which rows are financial reports and columns is KPI pre-processed

Value

An object with blacklist and whitelist of network

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data("preprocessed")
data("data_small")
continuous_data <- preprocessed$data
desire_layers <- preprocessed$desire_layers
quantile_number <- preprocessed$quantile_number
continuous_dynamic_variables <- preprocessed$continuous_dynamic_variables
continuous_static_variables <- preprocessed$continuous_static_variables
discrete_static_variables <- preprocessed$discrete_static_variables
known_structure <- NULL
corr_threshold <- 0.4
is_blacklist_internal <- TRUE
is_variable_only <- TRUE
is_blacklist_other <- FALSE
custom_blacklist <- NULL
custom_whitelist <- NULL
bl_wl <- tfdbn::get_continuous_structure_filter(continuous_data, desire_layers, quantile_number, continuous_dynamic_variables,
                                                continuous_static_variables, discrete_static_variables,
                                                known_structure, corr_threshold, is_blacklist_internal,
                                                is_variable_only, is_blacklist_other,
                                                custom_blacklist, custom_whitelist)

bayes-modeling/wrmbn documentation built on Dec. 19, 2021, 6:45 a.m.