About Peanut and PNetica

Peanut (a corruption of parameterized network, or Pnet) is a an object oriented layer designed to rest on top of CPTtools. In particular, it introduces a parameterized node (Pnode) class that can associates the parameters of the discrete partial credit models with the node object and a parameterized network (Pnet) class that contains a collection of parameterized nodes. The figure below givens the object model.

The most important method in the class is the GEMfit method, which uses the generalized EM algorithm to the CPTs for the parameterized nodes to a set of cases. It may offer other capabilities as it evolveds.

In order to keep the dependencies on a specific Bayes net package to a minimum, they were isolated in a separate package. The Peanut package defines a series of functions and the PNetica package provides methods for objects of the NeticaBN and NeticaNode classes (both from the RNetica package). The idea is similar to the relationship between the DBI and RMySQL packages.

I presented information about Peanut and PNetica at the UAI workshop in 2015. The offical paper is published in CEUR volume 1565, paper 4. Slides for the talk are available here (PDF).

I presented another talk about the application of Peanut to Physics Playground at the 2017 Bayesian Application Workshop. The proceedings where not published, but here are my papers:

New in Version 0.4 I've now added some node gadgets written in shiny (package shinyjs now required). These should making editing nodes a lot easier.

Peanut and PNetica License Information

Peanut and PNetica are made available under the Artistic License, version 2.0. PNetica depends on RNetica, which has a somewhat more complex license.

Current Version Status

The development versions have moved to Github: https://github.com/ralmond/Peanut/ and https://github.com/ralmond/PNetica/. The released versions have moved to r-universe: https://ralmond.r-universe.dev/ui#package:Peanut and https://ralmond.r-universe.dev/ui#package:PNetica

Peanut 0.9-1 (PNetica 0.9-1) changes to the various shiny gadgets to make them easier to embed in a shiny document.

Peanut 0.8-4 (PNetica 0.8-5) is a documentation cleanup release. In particular, PNetica is now fully documented with a full test script.

Peanut 0.8 (PNetica 0.8) is a release that accompanies the release of the EABN scoring engine. The basic idea is to allow EABN to score using Bayesian networks using only minimal function calls from RNetica. Currently, only a calls to RNetica::NeticaSession() and startSession() to initialize Netica, and a call to PNetica::BNWarehouse() to set up an initial warehouse are necessary. This should make it easier to swap out Netica for a different Bayes net engine in the future.

Peanut 0.7 (PNetica 0.7) Serious debugging release, with Peanut now being used for two operational products. The round trip between the four spreadsheet view and the Bayes net is now fully tested. I also have some scripts for automatically downloading the model specification from a Google Sheets URL. Example coming soon.

Peanut 0.6 (PNetica 0.6) adds formal Statistic object to aid in reporting after scoring. This is for interoperability with the EABN scoring engine.

Peanut 0.4 now has various shiny gadgets for editing and displaying CPTs.

The current version (Peanut 0.4-1, PNetica 0.3-6) now has a complete set of functions for going from tables to nets and back (Pnet2Omega, Pnet2Qmat, Qmat2Pnet, and Omega2Pnet). The users manual is partially completed (updated pages for most of the functions, but still haven't rewritten the package level functions). It has also been rewriten to work with RNetica version 0.5 and up.

PNetica version 0.3-4 seems to be having some problems with the AbsorbNodes function in RNetica. I have not yet tracked down the issue, as a work around, simply leave the extra nodes in place. Update: The issue appears to be related to nets where some nodes have visual information and others do no. Brent is promising me a fix soon. Meanwhile, you can work around by manually deleting the visual information in the .dne files (this are the sections beginning V1, V2, ...).

Peanut Releases

The following releases are archived here:

ReleaseSourceWindows BinaryMac BinaryManualNotes
0.1-2Peanut_0.1-2.tar.gz Peanut_0.1-2.zip Peanut_0.1-2.tgz Peanut-manual_0.1-2.pdf Initial Trial Release
0.1-3Peanut_0.1-3.tar.gz Peanut_0.1-3.zip Peanut_0.1-3.tgz Peanut-manual_0.1-3.pdf Manual Cleanup
0.2-2Peanut_0.2-2.tar.gz Peanut_0.2-2.zip Peanut_0.2-2.tgz Peanut-manual_0.2-2.pdf Spreadsheet functions and debugging
0.3-4Peanut_0.3-4.tar.gz Peanut_0.3-4.zip Peanut_0.3-4.tgz Peanut-manual_0.3-4.pdf RNetica 0.5 compatability, S4 methods, Qmat2Pnet, Omega2Pnet
0.4-1Peanut_0.4-1.tar.gz Peanut_0.4-1.zip Peanut_0.4-1.tgz Peanut-manual_0.4-1.pdf Added node gadgets.
0.6-1Peanut_0.6-1.tar.gz Peanut_0.6-1.zip Peanut_0.6-1.tgz Peanut-manual_0.6-1.pdf Added Statistics.
0.6-2Peanut_0.6-2.tar.gz Peanut_0.6-2.zip Peanut_0.6-1.tgz Peanut-manual_0.6-2.pdf Debugging and Manual catchup.
0.7-1Peanut_0.7-1.tar.gz Peanut_0.7-1.zip Peanut_0.7-1.tgz Peanut-manual_0.7-1.pdf Round trip from spreadsheet.
0.8-3Peanut_0.8-3.tar.gz Peanut_0.8-3.zip Peanut_0.8-3.tgz Peanut-manual_0.8-3.pdf EABN cleanup.
0.8-4Peanut_0.8-4.tar.gz Peanut_0.8-4.zip Peanut_0.8-4.tgz Peanut-manual_0.8-4.pdf PNetica documentation cleanup.
Note the source versions have been compiled and tested under Linux/Unix, Mac OS X and Windows.

PNetica Releases

The following releases are archived here:
ReleaseSourceWindows BinaryMac BinaryManualNotes
0.1-2PNetica_0.1-2.tar.gz PNetica_0.1-2.zip PNetica_0.1-2.tgz No Manual Initial Trial Release
0.1-3PNetica_0.1-3.tar.gz PNetica_0.1-3.zip PNetica_0.1-3.tgz PNetica-manual_0.1-3.pdf Manual Complete
0.2-2PNetica_0.2-2.tar.gz PNetica_0.2-2.zip PNetica_0.2-2.tgz PNetica-manual_0.2-2.pdf Spreadsheet functions and debugging
0.3-4PNetica_0.3-4.tar.gz PNetica_0.3-4.zip PNetica_0.3-4.tgz Manual has not be updated RNetica 0.5 compatability, Qmat2Pnet, Omega2Pnet
0.3-6PNetica_0.3-6.tar.gz PNetica_0.3-6.zip PNetica_0.3-6.tgz PNetica-manual_0.3-6.pdf Now properly gets session information from nets.
0.6-1PNetica_0.6-1.tar.gz PNetica_0.6-1.zip PNetica_0.6-1.tgz PNetica-manual_0.6-1.pdf Added Statistics.
0.6-2PNetica_0.6-2.tar.gz PNetica_0.6-2.zip PNetica_0.6-2.tgz PNetica-manual_0.6-2.pdf Added Statistics.
0.7-1PNetica_0.7-1.tar.gz PNetica_0.7-1.zip PNetica_0.7-1.tgz PNetica-manual_0.7-1.pdf Round trip from spreadsheet.
0.8-3PNetica_0.8-3.tar.gz PNetica_0.8-3.zip PNetica_0.8-3.tgz PNetica-manual_0.8-3.pdf Round trip from spreadsheet.
0.8-5PNetica_0.8-5.tar.gz PNetica_0.8-5.zip PNetica_0.8-5.tgz PNetica-manual_0.8-5.pdf Documentation backfill and cleanup.

Note the source versions have been compiled and tested under Linux/Unix, Mac OS X and Windows.

Development Version

The development versions have moved to Github: https://github.com/ralmond/Peanut/ and https://github.com/ralmond/PNetica/.

The older development version is available as subversion repositories at: https://pluto.coe.fsu.edu/svn/common/Peanut/trunk/, https://pluto.coe.fsu.edu/svn/common/PNetica/.

If you have patches or other correspondence about Peanut you can contact me at russell.g.almond@gmail.com. If you are filing a bug report (please raise an issue on github), please be sure to include:

  1. The version number of Peanut and R that you are using.
  2. Your operating system and whether it is 64 or 32 bit.
  3. The exact text of any error message that is generated.
  4. A small script that reproduces the problem (if at all possible).

I would also be willing to host alternatives to PNetica using other Bayes net packages on this server (either Web or Subversion). Contact me for details.

Legal Notices

Netica and Norsys are registered trademarks of Norsys, LLC, used by permission.

Although Norsys has been generally supportive of the RNetica project, they do not offer formal support in any way. (In particular, the do not currently have anybody on staff who knows R.) All support requests should be sent to the package maintainers.

The software is offered AS IS, without any warranty of any kind. Support is provided on a volunteer basis, and may not be immediately forthcoming.

Site last updated on 2021-06-23.