Man pages for npetraco/CRFutil
Handy Utility Functions for Use with CRF and gRbase packages

adj2formulaForm pair-wise formula from adjacency matrix. XXXX
align.distributionsAlign joint distributions in table form, to a reference joint...
compare_edgesXXXX
compare_edges_SAFEISHSend in two or more models in the form of a list of crf...
complement.at.idxConvenience function to complement a node in a configuration....
compute.full.distributionCompute the joint distribution, with just an input crf object
compute.model.matrixUtility function to compute model matrix
conditional.config.energyEnergy function for energy of a conditional configuration of...
conditional.config.energy2Energy function for energy of a conditional configuration of...
conditional.config.energy.oldOlder implementation of Energy function for energy of a...
conditional.energy.gradientGradient of a condtional energy for a node and a...
config.energyEnergy function for a configuration of states
config.potentialProduct of potentials function over a configuration of states
copy.crf(Deep) Copy and return a new independent crf object
count_row_matchesA quick and dirty function to find the frequency of a...
delta.alphaCompute the delta-alpha matrix \boldsymbol \Delta_X_i=1
distribution.calcCompute the joint distribution, assuming a crf object is...
distribution.from.energiesCompute the joint distribution from the node and edge...
distribution.from.potentialsCompute the joint distribution from the node and edge...
dump.crfPrint out all contents of a crf object
edge.marginalCompute an edge marginal
edges2adjForm adjacency matrix from edge matrix. XXXX
EoneOne-body (node) energy function
EtwoTwo-body (edge) energy function
exp_listExp a bunch of stuff (vectors, matrices, etc) in a list
feature.meansUtility function to compute mean vector of unconditional...
fit_bayes_logisticJoint distribution from bayes logistic regression fit of...
fit_bayes_loglinearJoint distribution from bayes poisson regression fit of...
fit_bayes_loglinear2Joint distribution from bayes poisson regression fit of...
fit_bayes_zipJoint distribution from bayes poisson regression fit of...
fit_empiricalEmpirical joint distribution
fit_logisticJoint distribution from logistic regression fit of parameters
fit_loglinearJoint distribution from Poisson regression fit of parameters
fit_mleJoint distribution from MLE fit of parameters for full MRF...
fit_mle_paramsMLE fit of parameters ONLY for full MRF loglikelihood
fit_trueJoint distribution from true parameters for MRF
flatten.marginal.edge.beliefsFlatten belief matrices output by marginal.edge.bels to make...
generate_brunner_lizardsGenerate a little lizard data model from Brunner course for...
generate_gRbase_lizardsGenerate a little lizard data model from the gRbase package...
generate_koller_misconception_modelGenerate the original Koller-Friedman Misconception model...
generate_random_modelGenerate a random model using Erdos Renyi game
generate_schmidt_small_modelGenerate the original Schmidt small chain model used in Notes
generate_star_modelGenerate the star model used in their book and the Notes
generate_tesseract_modelGenerate the tesseract model used in their book and the Notes
generate_triangle_modelGenerate the original triangle model used in Notes
get_configuration_frequenciesGet the frequencies of configurations
get.incoming.messagesGrab incoming messages from the neighboring nodes and put...
get.node.idxsUtility function to convert a parameter index to the...
get.par.idxUtility function to convert node and edge indices to the...
get.pathGet a (shortest) path between two nodes
get.root.pathsGet all paths from chosen root node to all leaf nodes
glmnet2graph_infoPull info needed for a crf object out of a glmnet fit output
grad.negloglikUtility function to compute gradient of log likelihood
grad.neglogpseudolik.configUtility function to SEPARATELY compute gradient negative log...
grad.neglogpseudolik.FIXMEGradient of sample negative log pseudo-likelihood
init.loopy.message.storageInitialize an empty set of list containers to hold messages...
init.message.storageInitialize an empty set of list containers to hold messages
KLDCompute the Kullback-Leibler distance between two...
loglin2crfConvert loglin, loglm or dModel (all really loglin) object to...
log_listTake the log of stuff (vectors, matrices, etc) in a list
logsumexpLog sum exp trick. From Brendon Brewer's DNest code:
logsumexp2Log sum exp trick. From Brendon Brewer's DNest code:
make.empty.fieldInstantiate an empty field
make.f2v.msgMake factor to variable (node) message
make.gRbase.beliefsDecorate fit node and edge marginal beliefs to make...
make.gRbase.potentialsDecorate initalized mrf-object to make potentials compatible...
make.latticeQuick generate a lattice graph
make.par.from.all.potentialsMake a new parameter vector from ALL of the potential values...
make.par.from.potentialsThis version makes a parameter vector from the potentials...
make.potsMake potentials from input parameter vector.
make.v2f.msgMake factor to variable (node) message
marginal.edge.bayes.beleifs.indep.indicmarginal edge bayes independence indicators from beliefs
marginal.edge.bayes.bels.plotmarginal edge bayes posterior belief plots
marginal.edge.bayes.loglinmarginal edge fit using vanalla baysian poisson regression...
marginal.edge.bayes.plotmarginal edge plot for bayes posterior parameter output
marginal.edge.bayes.potentials.indep.indicmarginal edge bayes independence indicators
marginal.edge.belsMarginal edge beliefs from parameter point estimates.
marginal.edge.bels.bayesMarginal edge beliefs from bayes posterior sample
marginal.edge.emp.prMarginal edge empirical probs from a sample of data
marginal.edge.loglinmarginal edge fit using poisson regression glm
marginal.edge.mrfmarginal edge fit with MLE within the CRF framework
message.typeGet message type depending on name
mrf2pwfgConvert Markov Random Field to pairwise (two-body) factor...
mrf.exact.nllWork around for CRF bug evaluating nll for different...
mrf.glmnet.logistic.fitFit a MRF via cross-validation glmnet LASSO logistic...
mrf.junction.nllWork around for CRF bug evaluating nll for different...
mrf.lbp.nllWork around for CRF bug evaluating nll for different...
mrf.sample.plotPlot a sample of states node-wise
mrf.standard.fitFit a MRF parameterized in the standard way
negloglikExperiment: Modified Port of Schmidt UGM_MRF_NLL.m
neglogpseudolikSample negative log pseudo-likelihood
neglogpseudolik2Sample negative log pseudo-likelihood
neglogpseudolik.configUtility function to compute negative log pseudo-likelihood....
nexGet all neighbors of start.node except end.node
node.marginalCompute a node marginal
nodes2params.listFunction to find which nodes are associated with which...
nodes2params.list2Function to find which nodes are associated with which...
par2logpotsReformat parameter vector to CRF object from node.pot and...
params2nodes.listFunction to find which parameters are associated with which...
pass.messagePass a message over an edge on a factor graph
phi.componentUtility function to compute phi component CONDITIONED for...
phi.featuresUtility function to compute unconditional features...
phi.features.explicitUtility function to compute labeled explicit unconditional...
plot_crfPlot a crf object
process.logistic.fit.JAGSProcess JAGS output for logistic fit
process.logistic.fit.stanProcess Stan output for logistic fit
pseudolikelihoods.from.energiesCompute the pseudolikelihoods from the node and edge...
pseudolikelihoods.from.energies2Revised: Compute the pseudolikelihoods from the node and edge...
reorder_configsSpits out permutation to re-order configs in targ with...
row.matchCode from prodlim library to match a row in a matrix
shift.potsShift node potentials back to the originally fit parameter...
sim.field.randomSimulate an MRF with random unary (node) and pair (edge)...
sim.field.random.simplestSimulate an MRF with random unary (node) and pair (edge)...
sim.ising.field.randomSimulate an MRF with random unary (node) and pair (edge)...
sim.random.fieldSimulate an random MRF with random unary (node) and pair...
symbolic.conditional.energySpit out latex expression for E(Xi|X/Xi) given i, X and a...
UGM_MRF_computeSuffStatPort of Schmidt UGM_MRF_computeSuffStat.m
UGM_MRF_makePotentialsPort of Schmidt UGM_MRF_makePotentials.m
UGM_MRF_NLLExperiment: Port of Schmidt UGM_MRF_NLL.m
update_CRFutilEasily update the CRFutil library by installing the current...
npetraco/CRFutil documentation built on Nov. 23, 2023, 11:30 a.m.