Introduction to jSMILE

From DSL

Jump to: navigation, search

What is jSMILE

jSMILE is a platform independent* library of Java classes for reasoning in graphical probabilistic models, such as Bayesian networks and influence diagrams. It can be embedded in programs that use graphical probabilistic models as their reasoning engines.

It is enough for jSMILE to have JRE installed so it be used to create stand-alone applications, applets, and servlets. In this documentation, we concentrate on the use of jSMILE library in a stand-alone application.

Model building and inference are under full control of the application program, as the jSMILE library serves merely as a set of tools and structures that facilitates them. Decision Systems Laboratory has also developed a graphical interface to SMILE, called GeNIe (Graphical Network Interface), which runs under all 32-bit Windows versions. The latest version of GeNIe can be downloaded from the DSL Web site.


If You Have Used SMILE Before

jSMILE is a Java Native Interface (JNI) library that enables the access to SMILE C++ libraries from Java applications. jSMILE is not functionally identical to SMILE in that it does not provide access to all the classes included in the original C++ libraries. However, the essential part of the SMILE interface has been exposed. jSMILE is easier and more intuitive to use compared to C++ libraries. It is possible to tailor the library according to special needs as its source code is provided (consult the [Extending jSMILE Library section]).


The Packages

There are two packages relevant to jSMILE:

1. jSMILE X Y Z: compiled jSMILE library version X.Y for platform Z.

2. SMILE Wrappers Documentation:

  • jsmile_tutorials\application\ - a sample Java application (with Eclipse project)
  • jsmile_tutorials\servlet\ - a sample Java servlet (with Eclipse project)

3. SMILE Wrappers Sources:

  • jsmile\c_library\ - C++ language side of the library (with Microsoft Visual Studio 2003 [version 7.1] project)
  • jsmile\java_library\ - Java language side of the library (with Eclipse project)

All packages can be obtained from SMILE Web site download page.


Before Starting the Implementation

The only thing that a programmer has to take care of before working with jSMILE is setting the environment path to the location the library (lib\win32\jsmile.dll). Under Windows platforms, we have to either add lib\win32\ folder to the PATH environment variable, or put the library in one of the folders already included in this variable.

If the library is not accessible, an exception with "no jsmile in java.library.path" message will be thrown.

* jSMILE package contains a ready-to-use library only for 32-bit Windows platforms only. 
Source code of the library is provided, so a version for other platform can be easily created. 
Some useful information on creating the library can be found in  Extending jSMILE Library section.
Personal tools