jade | R Documentation |
Learn parameters of a Bayesian Network in a discriminative way by Adaptive Differential Evolution with optional external Archive
jade(
NP = 40,
G = 100,
data,
class.name,
c = 0.1,
structure = c("nb", "tancl", "hc"),
pB = 0.05,
edgelist = NULL,
archive = TRUE,
verbose = 25,
...
)
NP |
positive integer giving the number of candidate solutions in the initial population. |
G |
positive integer specifying the maximum number of generations that may be performed before the algorithm is halted. |
data |
The data frame from which to learn the classifier. |
class.name |
A character. Name of the class variable. |
c |
A numeric. An adaptation parameter. Default is 0.1. |
structure |
A character. Name of the structure learning function. "tan" uses Tree Augmented Network. "nb" uses Naive Bayes. "hc" uses Hill Climbing. |
pB |
A numeric. JADE mutation strategy. |
edgelist |
A matrix. An optional edge list to use a custom BN structure that will replace de learned structure. |
archive |
A logical. If TRUE, trial vector r2 is randomly selected from the union of the current population and the external archive. |
verbose |
positive integer indicating the number of generations until the iteration progress should be printed. |
... |
other structure learning options from tan_cl or tan_hc. |
An object of class DE
, which is a list with the following components:
Best |
A |
BestCLL |
A numeric specifying the Conditional Log-Likelihood of the best individual. |
pobFinal |
A list of |
CLLPobFinal |
A numeric vector specifying the Conditional Log-Likelihood of the final population. |
N.evals |
An integer giving the total number of evaluations. |
convergence |
A numeric vector giving the maximum Conditional Log-Likelihood at each generation. |
evaluations |
An integer vector giving the total number of evaluations at each generation. |
# Load data
data(car)
# Parameter learning with "JADE with Archive" variant, and structure with
# hill-climbing algorithm, so argument "k" must be provided.
dpl.jade <- jade(NP = 40, G = 50, data = car, class.name = names(car)[7], c = 0.1,
structure = "hc", pB = 0.05, edgelist = NULL, archive = TRUE, verbose = 5, k = 3)
# Print results
print(dpl.jade)
## Not run: plot(dpl.jade)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.