Child pages
  • Memory Management

Contents

Overview

With increasing complexity, Bayesian networks can become very large and consume large amounts of computer memory. In this context it is important to carefully manage the available resources of your computer. This needs to be done via the Java Heap Space, which can be configured in a number of ways depending on the operating system. 

Instructions

Along with your BayesiaLab program, you will also find the Memory Manager under All Programs in the Windows Start Menu.

Simply double-click it to launch.

Once started, you can set the Initial Memory and the Maximum Memory available to be made available to BayesiaLab. The latter parameter effectively determines how large a Bayesian network can grow within BayesiaLab. Set the parameters to the desired values and restart BayesiaLab.

Memory constraints can manifest themselves in a number of ways, but most often they occur when switching from the Modeling Mode to the Validation Mode, after having learned a fairly complex network. If this occurs frequently, you may want to adjust the Maximum Memory setting. However, please note that memory requirements can grow exponentially and can easily exceed any available memory by several orders of magnitude.  

Mac users will take a different approach for setting these parameters.

Go to the BayesiaLab folder with your Applications folder.

Right-click on BayesiaLab and select Show Package Contents.

Within the Contents folder that comes up, open Info.plist with a text editor such as TextEdit.

Scroll down to the bottom of the file and locate the string highlighted below:

Modify this string to reflect your desired configuration.

<string>-Xms1024M -Xmx8096M</string>

The numerical value after "-Xms" stands for the Initial Memory allocation, the value after "-Xmx" is for the Maximum Memory allocation. Note that the suffix "M" stands for "Megabyte." The settings shown in this example are from a MacBook with 16GB of RAM, which allows this fairly large 8GB allocation for the Maximum Memory

Save this file, without changing anything else, and BayesiaLab will launch the next time with these new parameters. You may need to experiment with these settings until you find a practical balance regarding allocation of resources.

Memory constraints can manifest themselves in a number of ways, but most often they occur when switching from the Modeling Mode to the Validation Mode, after having learned a fairly complex network. If this occurs frequently, you may want to adjust the Maximum Memory setting. However, please note that memory requirements can grow exponentially and can easily exceed any available memory by several orders of magnitude.