Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alexplatasl/dplbnde/llms.txt

Use this file to discover all available pages before exploring further.

dplbnDE supports four BN structure options, controlled by the structure argument available in all algorithm functions.

Structure options

The simplest structure: the class is the sole parent of every feature. No edges between features.
result <- DEbest(
  NP = 30, G = 50,
  data = car,
  class.name = names(car)[7],
  structure = "nb"
)
When to use: as a fast baseline, or when you have limited data and need to avoid overfitting the structure.

Comparing structures

Run the same DE variant with different structures and compare CLL:
library(dplbnDE)
data(car)
cn <- names(car)[7]

res_nb  <- lshade(NP=20, G=30, data=car, class.name=cn, structure="nb",  verbose=0)
res_tan <- lshade(NP=20, G=30, data=car, class.name=cn, structure="tan", verbose=0)
res_hc  <- lshade(NP=20, G=30, data=car, class.name=cn, structure="hc",  verbose=0, k=3)

cat("NB  CLL:", res_nb$BestCLL,  "\n")
cat("TAN CLL:", res_tan$BestCLL, "\n")
cat("HC  CLL:", res_hc$BestCLL,  "\n")
A higher (less negative) CLL indicates a better-fitting discriminative model. TAN and HC typically outperform NB when features have meaningful pairwise dependencies.

Passing extra arguments to structure learners

Any ... arguments are forwarded to bnclassify::tan_cl or bnclassify::tan_hc. For example, the k parameter for hill-climbing sets the number of cross-validation folds:
result <- jade(NP=30, G=50, data=car, class.name="class",
               structure="hc", k=5)

Build docs developers (and LLMs) love