Package: FBMS 1.0

FBMS: Flexible Bayesian Model Selection and Model Averaging

Implements MJMCMC (mode jumping MCMC) described in Hubin and Storvik (2018) <doi:10.1016/j.csda.2018.05.020> and GMJMCMC (genetically modified MJMCMC) described in Hubin et al. (2021) <doi:10.1613/jair.1.13047> algorithms as well as the subsampling counterpart described in Lachmann et al. (2022) <doi:10.1016/j.ijar.2022.08.018> for flexible Bayesian model selection and model averaging.

Authors:Jon Lachmann [cre, aut], Aliaksandr Hubin [aut]

FBMS_1.0.tar.gz
FBMS_1.0.zip(r-4.5)FBMS_1.0.zip(r-4.4)FBMS_1.0.zip(r-4.3)
FBMS_1.0.tgz(r-4.4-x86_64)FBMS_1.0.tgz(r-4.4-arm64)FBMS_1.0.tgz(r-4.3-x86_64)FBMS_1.0.tgz(r-4.3-arm64)
FBMS_1.0.tar.gz(r-4.5-noble)FBMS_1.0.tar.gz(r-4.4-noble)
FBMS_1.0.tgz(r-4.4-emscripten)FBMS_1.0.tgz(r-4.3-emscripten)
FBMS.pdf |FBMS.html
FBMS/json (API)

# Install 'FBMS' in R:
install.packages('FBMS', repos = c('https://jonlachmann.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • breastcancer - Breast Cancer Wisconsin (Diagnostic) Data Set
  • exoplanet - Excerpt from the Open Exoplanet Catalogue data set

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

56 exports 0.09 score 8 dependencies 2 scripts 176 downloads

Last updated 9 months agofrom:4d99c1653b. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 22 2024
R-4.5-win-x86_64OKAug 22 2024
R-4.5-linux-x86_64OKAug 22 2024
R-4.4-win-x86_64OKAug 22 2024
R-4.4-mac-x86_64OKAug 22 2024
R-4.4-mac-aarch64OKAug 22 2024
R-4.3-win-x86_64OKAug 22 2024
R-4.3-mac-x86_64OKAug 22 2024
R-4.3-mac-aarch64OKAug 22 2024

Exports:compute_effectscos_degdiagn_ploterfexp_dblfbmsgaussgaussian.loglikgaussian.loglik.alphagelugen.params.gmjmcmcgen.params.mjmcmcgen.probs.gmjmcmcgen.probs.mjmcmcgmjmcmcgmjmcmc.parallelhslinear.g.prior.logliklogistic.logliklogistic.loglik.alphamarginal.probsmerge_resultsmjmcmcmjmcmc.parallelmodel.stringngelunhsnotnrelup0p05p0p0p0p05p0p1p0p2p0p3p0pm05p0pm1p0pm2p2p3pm05pm1pm2reluset.transformssigmoidsin_degsqrootstring.populationstring.population.modelsto23to25to35to72troot

Dependencies:BHbigmemorybigmemory.srifastglmGenSARcppRcppEigenuuid

FBMS - Flexible Bayesian Model Selection and Model Averaging

Rendered fromFBMS-guide.Rmdusingknitr::rmarkdownon Aug 22 2024.

Last update: 2023-12-22
Started: 2023-12-22

Readme and manuals

Help Manual

Help pageTopics
Flexible Bayesian Model Selection and Model AveragingFBMS-package FBMS
Breast Cancer Wisconsin (Diagnostic) Data Setbreastcancer
Compute effects for specified in labels covariates using a fitted model.compute_effects
Cosine function for degreescos_deg
Plot convergence of best/median/mean/other summary log posteriors in timediagn_plot
erf functionerf
Excerpt from the Open Exoplanet Catalogue data setexoplanet
Double exponential functionexp_dbl
Fit a BGNLM model using Genetically Modified Mode Jumping Markov Chain Monte Carlo (MCMC) sampling. Or Fit a BGLM model using Modified Mode Jumping Markov Chain Monte Carlo (MCMC) sampling.fbms
Gaussian functiongauss
Log likelihood function for gaussian regression with a prior p(m)=r*sum(total_width).gaussian.loglik
Log likelihood function for gaussian regression for alpha calculation This function is just the bare likelihood function Note that it only gives a proportional value and is equivalent to least squaresgaussian.loglik.alpha
GELU functiongelu
Generate a parameter list for GMJMCMC (Genetically Modified MJMCMC)gen.params.gmjmcmc
Generate a parameter list for MJMCMC (Mode Jumping MCMC)gen.params.mjmcmc
Generate a probability list for GMJMCMC (Genetically Modified MJMCMC)gen.probs.gmjmcmc
Generate a probability list for MJMCMC (Mode Jumping MCMC)gen.probs.mjmcmc
Main algorithm for GMJMCMC (Genetically Modified MJMCMC)gmjmcmc
Run multiple gmjmcmc (Genetically Modified MJMCMC) runs in parallel returning a list of all results.gmjmcmc.parallel
heavy side functionhs
Log likelihood function for linear regression using Zellners g-priorlinear.g.prior.loglik
Log likelihood function for logistic regression with a prior p(m)=sum(total_width) This function is created as an example of how to create an estimator that is used to calculate the marginal likelihood of a model.logistic.loglik
Log likelihood function for logistic regression for alpha calculation This function is just the bare likelihood functionlogistic.loglik.alpha
Function for calculating marginal inclusion probabilities of features given a list of modelsmarginal.probs
Merge a list of multiple results from many runs This function will weight the features based on the best mlik in that population and merge the results together, simplifying by merging equivalent features (having high correlation).merge_results
Main algorithm for MJMCMC (Genetically Modified MJMCMC)mjmcmc
Run multiple mjmcmc runs in parallel, merging the results before returning.mjmcmc.parallel
Function to generate a function string for a model consisting of featuresmodel.string
Negative GELU functionngelu
negative heavy side functionnhs
not xnot
negative ReLu functionnrelu
p0 polynomial termp0
p05 polynomial termp05
p0p0 polynomial termp0p0
p0p05 polynomial termp0p05
p0p1 polynomial termp0p1
p0p2 polynomial termp0p2
p0p3 polynomial termp0p3
p0pm05 polynomial termp0pm05
p0pm1 polynomial termsp0pm1
p0pm2 polynomial termp0pm2
p2 polynomial termp2
p3 polynomial termp3
Function to plot the results, works both for results from gmjmcmc and merged results from merge.resultsplot.gmjmcmc
Plot a gmjmcmc_merged runplot.gmjmcmc_merged
Function to plot the results, works both for results from gmjmcmc and merged results from merge.resultsplot.mjmcmc
Plot a mjmcmc_parallel runplot.mjmcmc_parallel
pm05 polynomial termpm05
pm1 polynomial termpm1
pm2 polynomial termpm2
Predict using a gmjmcmc result object.predict.gmjmcmc
Predict using a merged gmjmcmc result object.predict.gmjmcmc_merged
Predict using a gmjmcmc result object from a parallel run.predict.gmjmcmc_parallel
Predict using a mjmcmc result object.predict.mjmcmc
Predict using a mjmcmc result object from a parallel run.predict.mjmcmc_parallel
Print method for "feature" classprint.feature
ReLu functionrelu
Set the transformations option for GMJMCMC (Genetically Modified MJMCMC), this is also done when running the algorithm, but this function allows for it to be done manually.set.transforms
Sigmoid functionsigmoid
Sine function for degreessin_deg
Square root functionsqroot
Function to get a character respresentation of a list of featuresstring.population
Function to get a character respresentation of a list of modelsstring.population.models
Function to print a quick summary of the resultssummary.gmjmcmc
Function to print a quick summary of the resultssummary.gmjmcmc_merged
Function to print a quick summary of the resultssummary.mjmcmc
Function to print a quick summary of the resultssummary.mjmcmc_parallel
To the 2.3 power functionto23
To 2.5 powerto25
To 3.5 powerto35
To the 7/2 power functionto72
Cube root functiontroot