Package: Peanut 0.9-3

Peanut: Parameterized Bayesian Networks, Abstract Classes

This provides support of learning conditional probability tables parameterized using CPTtools. This provides and object oriented layer on top of a CPTtools, to facilitate calculations with Parameterized models for Bayesian networks. Peanut is a collection of abstract classes and generic functions defining a protocol, with the intent that the protocol can be implemented with different Bayes net engines. The companion pacakge PNetica provides an implementation using Netica and RNetica.

Authors:Russell Almond

Peanut_0.9-3.tar.gz
Peanut_0.9-3.zip(r-4.5)Peanut_0.9-3.zip(r-4.4)Peanut_0.9-3.zip(r-4.3)
Peanut_0.9-3.tgz(r-4.4-any)Peanut_0.9-3.tgz(r-4.3-any)
Peanut_0.9-3.tar.gz(r-4.5-noble)Peanut_0.9-3.tar.gz(r-4.4-noble)
Peanut_0.9-3.tgz(r-4.4-emscripten)Peanut_0.9-3.tgz(r-4.3-emscripten)
Peanut.pdf |Peanut.html
Peanut/json (API)

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

Peer review:

Bug tracker:https://github.com/ralmond/peanut/issues

On CRAN:

bayesian-networkknowledge-representation

2.48 score 1 stars 2 packages 4 scripts 131 exports 30 dependencies

Last updated 1 years agofrom:d6c4b8d0dd. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 08 2024
R-4.5-winNOTENov 08 2024
R-4.5-linuxNOTENov 08 2024
R-4.4-winNOTENov 08 2024
R-4.4-macNOTENov 08 2024
R-4.3-winNOTENov 08 2024
R-4.3-macNOTENov 08 2024

Exports:as.legal.nameas.Pnetas.PnodeBuildAllTablesBuildNetManifestBuildNodeManifestBuildTablecalcExpTablescalcPnetLLikecalcStatClearWarehouseCompensatoryGadgetDPCGadgetflattenStatsflog.tryGEMfitGetPriorWeightis.legal.nameis.Pnetis.PnetWarehouseis.Pnodeis.PnodeWarehouseis.validisPnodeContinuousMakeCompensatoryGadgetMakeDPCGadgetMakeOffsetGadgetMakeRegressionGadgetmaxAllTableParamsmaxCPTParamOffsetGadgetOmega2PnetPnetPnet2OmegaPnet2QmatPnetAdjoinPnetCompilePnetDescriptionPnetDescription<-PnetDetachPnetFindNodePnetHubPnetHub<-PnetMakeStubNodesPnetNamePnetName<-PnetPathnamePnetPathname<-PnetPnodesPnetPnodes<-PnetPriorWeightPnetPriorWeight<-PnetRemoveStubNodesPnetSerializePnetTitlePnetTitle<-PnetUnserializePnodePnodeAlphasPnodeAlphas<-PnodeBetasPnodeBetas<-PnodeDefaultAlphasPnodeDefaultBetasPnodeDescriptionPnodeDescription<-PnodeEAPPnodeEvidencePnodeEvidence<-PnodeLabelsPnodeLabels<-PnodeLinkPnodeLink<-PnodeLinkScalePnodeLinkScale<-PnodeLnAlphasPnodeLnAlphas<-PnodeMarginPnodeMedianPnodeMinPnodeModePnodeNamePnodeName<-PnodeNetPnodeNumParentsPnodeNumStatesPnodeParentNamesPnodeParentsPnodeParents<-PnodeParentStatesPnodeParentTvalsPnodePostWeightPnodePriorWeightPnodePriorWeight<-PnodeProbsPnodeProbs<-PnodeQPnodeQ<-PnodeRulesPnodeRules<-PnodeSDPnodeStateBoundsPnodeStateBounds<-PnodeStateDescriptionsPnodeStateDescriptions<-PnodeStatesPnodeStates<-PnodeStateTitlesPnodeStateTitles<-PnodeStateValuesPnodeStateValues<-PnodeTitlePnodeTitle<-Qmat2PnetRegressionGadgetshowStatisticStatNametopsortunserializePnetWarehouseCopyWarehouseDataWarehouseFetchWarehouseFreeWarehouseInventoryWarehouseMakeWarehouseManifestWarehouseManifest<-WarehouseSaveWarehouseSupplyWarehouseUnpack

Dependencies:clicpp11CPTtoolsdplyreinsumfansiformatRfutile.loggerfutile.optionsgenericsgluejsonlitelambda.rlifecyclemagrittrmathjaxrpillarpkgconfigpurrrR6Rcpprlangstringistringrtibbletidyrtidyselectutf8vctrswithr

Readme and manuals

Help Manual

Help pageTopics
Parameterized Bayesian Networks, Abstract ClassesPeanut-package Peanut
Builds a network manifest from a list of PnetsBuildNetManifest
Builds a table describing a set of PnodesBuildNodeManifest
Builds the conditional probability table for a PnodeBuildAllTables BuildTable
Calculate expected tables for a parameterized networkcalcExpTables
Calculates the log likelihood for a set of data under a Pnet modelcalcPnetLLike
Shiny gadget for editinging compensatory pnodesCompensatoryGadget MakeCompensatoryGadget
Shiny gadget for editinging compensatory pnodesDPCGadget MakeDPCGadget
Flattens a statistic list into a numeric or character vector.flattenStats
Trys to execute an expression with errors logged.flog.try
Fits the parameters of a parameterized network using the GEM algorithmGEMfit
Checks to see if names are valid for objects in warehouse.as.legal.name is.legal.name
Functions for handling continuous nodes.isPnodeContinuous PnodeStateBounds PnodeStateBounds<-
Find optimal parameters of Pnet or Pnode to match expected tablesmaxAllTableParams maxCPTParam
Shiny gadget for editinging (offset) conjuctive and disjunctive pnodesMakeOffsetGadget OffsetGadget
Constructs a parameterized network from an Omega matrix.Omega2Pnet
A Parameterized Bayesian networkas.Pnet is.Pnet Pnet Pnet,ANY-method
Class '"Pnet"'Pnet-class
Constructs an Omega matrix from a parameterized network.Pnet2Omega
Makes an augmented Q-matrix from a collection of parameterized netsPnet2Qmat
Merges (or separates) two Pnets with common variablesPnetAdjoin PnetDetach
Compiles a Parameterized Bayesian NetworkPnetCompile
Finds nodes in a parameterized network.PnetFindNode
Returns the name of the hub net if this is a spoke net.PnetHub PnetHub<-
Creates (or removes) references to nodes in a networkPnetMakeStubNodes PnetRemoveStubNodes
Gets or Sets the name of a Netica network.PnetName PnetName,NULL-method PnetName<-
Returns the path associated with a network.PnetPathname PnetPathname<-
Returns a list of Pnodes associated with a PnetPnetPnodes PnetPnodes<- PnodeNet
Gets the weight to be associated with the prior table during EM learningGetPriorWeight PnetPriorWeight PnetPriorWeight<- PnodePriorWeight PnodePriorWeight<-
Writes/restores network from a string.PnetSerialize PnetUnserialize unserializePnet WarehouseUnpack
Gets the title or comments associated with a parameterized network.PnetDescription PnetDescription<- PnetTitle PnetTitle<-
Class '"PnetWarehouse"'PnetWarehouse PnetWarehouse-class
A Parameterized Bayesian network nodeas.Pnode is.Pnode Pnode
Class '"Pnode"'Pnode-class
Access the combination function slope parameters for a PnodePnodeBetas PnodeBetas<-
Reshapes alpha or beta vector based on rule and parentsPnodeDefaultAlphas PnodeDefaultBetas
Accesses the value to which a given node has been instantiated.PnodeEvidence PnodeEvidence<-
Lists or changes the labels associated with a parameterize node.PnodeLabels PnodeLabels<-
Accesses the link function associated with a PnodePnodeLink PnodeLink<-
Accesses the link function scale parameter associated with a PnodePnodeLinkScale PnodeLinkScale<-
Access the combination function slope parameters for a PnodePnodeAlphas PnodeAlphas.default PnodeAlphas<- PnodeAlphas<-.default PnodeLnAlphas PnodeLnAlphas<-
A minimal Pnode class for use in interface construction.PnodeMin
Gets or sets name of a parameterized node.PnodeName PnodeName<-
Gets or sets the parents of a parameterized node.PnodeNumParents PnodeParentNames PnodeParents PnodeParents<- PnodeParentStates
Fetches a list of numeric variables corresponding to parent statesPnodeParentTvals
Fetches the posterior weight associated with a nodePnodePostWeight
Gets or sets the conditional probability table associated with a Netica node.PnodeProbs PnodeProbs<-
Accesses a state-wise Q-matrix associated with a PnodePnodeQ PnodeQ<-
Accesses the combination rules for a PnodePnodeRules PnodeRules<-
Accessor for states of a parameterized node.PnodeNumStates PnodeStates PnodeStates<-
Accessors for the titles and descriptions associated with states of a parameterized node.PnodeStateDescriptions PnodeStateDescriptions<- PnodeStateTitles PnodeStateTitles<-
Accesses the numeric values associated with the state of a parameterized node.PnodeStateValues PnodeStateValues<-
Pnode Marginal StatisticsPnodeEAP PnodeMargin PnodeMedian PnodeMode PnodeSD
Gets the title or Description associated with a parameterized node node.PnodeDescription PnodeDescription<- PnodeTitle PnodeTitle<-
Class '"PnodeWarehouse"'PnodeWarehouse PnodeWarehouse-class
Makes or adjusts parameterized networks based on augmented Q-matrixQmat2Pnet
Shiny gadget for editinging compensatory pnodesMakeRegressionGadget RegressionGadget
Key functions for the Statistics classcalcStat Statistic
Class '"Statistic"'calcStat,Statistic-method show,Statistic-method Statistic-class StatName StatName,Statistic-method
Topologically sorts the rows and columns of an Omega matrixtopsort
A cache for Pnets or PnodesClearWarehouse is.PnetWarehouse is.PnodeWarehouse is.valid Warehouse WarehouseFetch WarehouseFree WarehouseMake WarehouseSave WarehouseSupply WarehouseSupply,ANY-method
Copies and object in the warehouseWarehouseCopy WarehouseCopy,default-method
Manipulates the manifest for a warehouseWarehouseData WarehouseInventory WarehouseManifest WarehouseManifest<-