train_balk is a function that trains a binomial naive bayes classifier for sequence data

train_balk(
  seqc,
  snps_pos,
  meta,
  binomial_n = 1,
  laplace = 1,
  snp_id = NULL,
  prior = NULL,
  fit_prior = FALSE
)

Arguments

seqc

A list of sequences

snps_pos

A vector of SNP positions

meta

A data frame containing the metadata, require isolate and target columns

binomial_n

The number of classes for the binomial naive bayes, default to 1 - bernoulli, 2 - binomial (support heterozygous SNPs)

laplace

The Laplace smoothing parameter

snp_id

A vector of SNP IDs, if not provided, it will be inferred from the SNP positions

prior

The prior probabilities of the classes

fit_prior

Whether to learn class prior probabilities

Value

A list containing the classifier and the transformation levels