SlideShare a Scribd company logo
UnBBayes – Plugin


                  Feature Overview
    ~ Usage and development of plugins for UnBBayes ~




1                  02/07/2010
    Contact: Shou Matsumoto (cardialfly@[yahoo|gmail].com)
Contents
       Concepts
       Features & Benefits
       Applications
       Sample Plugins (you may skip this section)
       Specification
       Extension Points’ Spec. (you may skip this section)
       Availability



2

    Project page: http://sourceforge.net/projects/unbbayes/
What is UnBBayes?

           UnBBayes is a probabilistic network
           framework written in Java. It has both a
Concepts




           GUI and an API with inference,
           sampling, learning and evaluation. It
           supports BN, ID, MSBN, OOBN, HBN,
           MEBN/PR-OWL, structure, parameter
           and incremental learning.


 3                Source: <http://sourceforge.net/projects/unbbayes/>
What is a plugin?

           A plugin consists of a computer program that
           interacts with a host application to provide a
           certain, usually very specific, function "on
Concepts




           demand“ [wikipedia].
           An UnBBayes’ plugin can be a folder, a ZIP or
           a JAR file located in “plugins” folder.
           Content of an ordinal UnBBayes’ plugin:
           –   Plugin descriptor (XML file)
           –   Classes (a program)
           –   Resources (e.g. icons, message files...)
 4                A plugin descriptor is the main and minimal content of a plugin
General Benefits of Plugins
Features & Benefits


                       To enable third-party developers to create
                       capabilities to extend an application
                       To support features yet unforeseen
                       To reduce the size of each application
                       To separate source code from an application
                       because of incompatible software licenses.
                       Modularization/Componentization of the
                       software
                       – Interfaces are modeled as extension points.
   5                           Modularization/componentization = organized system
General Features
Features & Benefits


                      Plugin dependency
                      Plugin’s version control
                      Plugins for Plugins
                      Hotplug
                      Flexible I/O handler



   6
Plugin dependency
                      We can develop new plugins reusing a pre-
Features & Benefits



                      existing one.
                      – A plugin may have some dependency to a pre-
                        existing one.
                      Pros:
                      – Fast development
                      – Less redundancy – smaller programs
                      Contras.
                      – Dependency hell
                         • If my plugin depends on “A” and “A” depends on “B” and
                           so on, my plugin will not work until the user obtains all
                           the dependencies.
   7                           A dependency is declared in plugin descriptor (XML)
Plugin’s version control
Features & Benefits


                      The application can manage several
                      different versions of a plugin.
                      – E.g. version 1.0.0, version 5.2.1...
                      Usually, the newest version is loaded by
                      the application.
                      – Except if a given plugin claims dependency
                        to a unique version.


   8                    There is no need to overwrite files in order to overwrite features anymore.
Plugins for Plugins
Features & Benefits


                      ...This application, under the academic
                      world, shall have a new birth of freedom
                      -- and that government of the plugin, by
                      the plugin, for the plugin, shall not perish
                      from the earth.
                      – If a plugin has an extension point, we can
                        add a plugin for it.
                      – In another words, we can have plugins
                        adding functionalities to another plugin.

   9                        An extension point is declared in plugin descriptor (XML)
Hotplug
Features & Benefits


                      Usually, there is no need to restart the
                      application in order to enable a plugin.
                      – Obviously, there are some exceptions.
                      UnBBayes has a menu item to “reload”
                      plugins at runtime.




 10
Flexible I/O handler
                      If more than one module plugin can handle a file,
Features & Benefits



                      ask for the user.




                      If more than one I/O plugin can handle a file, ask
                      for the user.


 11                                    File handling is flexible
Applications

               Development of a full new functionality
               – Projects / Modules
Applications




               – New formalisms
               Development of a new file format.
               Modeling new node types and/or CPD
               Usage of new Inference Algorithms
               Localization
               – E.g. Spanish, Japanese
 12
Summary of
               extension points
      New                        Split button for new modules
     Modules



                                                          I/O




                           New Nodes
                            and CPD
                                                     Inference
13              Localization                         Algorithm
Datamining Module -
                     UnBMiner
Sample Plugins




 14                A tool with 10 functionalities for massive data handling
Metaphor – Medical,
                      Human Identification
Sample Plugins




 15              A tool that offers an easy interface for finding entries and analisis. Expert Systems.
Sampling - Likelihood
                 Weighting, Monte Carlo, Gibbs
Sample Plugins




 16                   Generation of sample data sets from a given network.
Inference Algorithms –
                 Likelihood Weighting, Gibbs
Sample Plugins




 17                We can select another algorithm to compile a network under the core
OOBN Module’s Japanese
                     Localization
Sample Plugins




 18                   It is possible to add resource files as plugin
I/O – DNE, XMLBIF, NET
Sample Plugins




 19                   Save or load different network file formats
Conditional Probability
                 Distribution Using Scripts
Sample Plugins




 20                It is possible to edit a Conditional Probability Distribution using scripts
Specification

                UnBBayes uses Java Plugin Framework (JPF)
                for plugin support.
Specification




                – JPF is a open-source, LGPL licenced plug-in
                  mechanism adapted from Eclipse's plug-in
                  mechanism.
                The “core” of UnBBayes is the BN module.
                – All other modules/functionalities are being
                  refactored as plugins.
                The core has its plugin descriptor to declare
                extension points (unbbayes.core).

 21                    Everything is configured using plugin descriptors (XML)
Folder Structure

                        Place the
                      plugins here
Specification




                                       These are
                                     default plugins
                                       that come
                                      with the core
 22
Modules
Extension Points’ Spec.



                            UnBBayes' modules are basically swing
                            internal frames.
                          <extension-point id="Module">
                            <!--class extends unbbayes.util.extension.UnBBayesModule-->
                            <parameter-def id="class"/>
                            <!--builder implements unbbayes.util.extension.UnBBayesModuleBuilder-->
                            <parameter-def id="builder" multiplicity="none-or-one" />
                            <parameter-def id="name"/>
                            <parameter-def id="description" multiplicity="none-or-one" />
                            <parameter-def id="icon" multiplicity="none-or-one" />
                            <!--category creates new menu items on demmand-->
                            <parameter-def id="category" multiplicity="none-or-one" />
                          </extension-point>

 23                                       These XML definitions follow the JPF specification.
Sample Module - UnBMiner
                          <?xml version="1.0" ?>
Extension Points’ Spec.


                          <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd">
                          <plugin id="unbbayes.datamining" version="0.0.1">
                            <requires>
                               <import plugin-id="unbbayes.util.extension.core"/>
                            </requires>
                            <runtime>
                               <library id="unbminer" path="classes/" type="code">
                                  <export prefix="*" />
                               </library>
                               <library type="resources" path="icons/" id="icons" />
                            </runtime>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="Module" id="unbminer">
                               <parameter id="class" value="unbbayes.datamining.gui.extension.UnBMinerJPFModule" />
                               <parameter id="name" value="Data Mining Project" />
                               <parameter id="builder" value="unbbayes.datamining.gui.extension.UnBMinerJPFModule" />
                                         <parameter id="description" value="UnBBayes Dataminer - UnBMiner" />
                                         <parameter id="icon" value="mining.png" />
                                         <parameter id="category" value="tool" />
                            </extension>
                          </plugin>
 24                                          This is how UnBMiner's plugin descriptor (plugin.xml) looks like
Inference Algorithm
Extension Points’ Spec.



                             This is basically a panel (for options)
                              – This panel holds an implementation of
                                  unbbayes.util.extension.bn.inference.IInferenceAlgorithm,
                                  which runs a specific inference algorithm.

                          <extension-point id="InferenceAlgorithm">
                            <!--class extends
                              unbbayes.util.extension.bn.inference.InferenceAlgorithmOptionPanel-->
                            <parameter-def id="class"/>
                          </extension-point>




 25                                   Inference Algorithms are usually started when we "compile" a BN
Sample Algorithm - Gibbs
                          <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0"
Extension Points’ Spec.


                               "http://jpf.sourceforge.net/plugin_1_0.dtd">
                          <plugin id="unbbayes.simulation.sampling.GibbsSampling" version="1.0.0">
                            <requires><import plugin-id="unbbayes.util.extension.core"/><import plugin-
                               id="unbbayes.simulation.montecarlo.sampling"/></requires>
                            <runtime>
                               <library id="gibbs" path="classes/" type="code"><export prefix="*" /></library>
                               <library type="resources" path="icons/" id="icons" />
                            </runtime>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="Module" id="gibbsSampling">
                               <parameter id="class" value="unbbayes.gui.GibbsSamplingModule" />
                               <parameter id="name" value="Gibbs Sampling" />
                               <parameter id="builder" value="unbbayes.gui.GibbsSamplingModule" />
                               <parameter id="description" value="Sampling using Gibbs" />
                               <parameter id="icon" value="sampling.png" />
                               <parameter id="category" value="sampling" />
                            </extension>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="InferenceAlgorithm" id="gibbsAlgorithm">
                               <parameter id="class" value="unbbayes.gui.option.GibbsSamplingOptionPanel" />
                            </extension>
                          </plugin>

 26                                              A single plugin.xml may implement several extension points
I/O
                            This is just a combination of
Extension Points’ Spec.




                            unbbayes.io.BaseIO and a name
                             – The name is displayed when a conflict occurs


                                 <extension-point id="PNIO">
                                   <parameter-def id="class"/>
                                   <parameter-def id="name"/>
                                 </extension-point>


 27                       A single plugin.xml may specify several extension points - a plugin may expect several plugins
Sample I/O - DNE
Extension Points’ Spec.


                          <?xml version="1.0" ?>
                          <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0"
                             "http://jpf.sourceforge.net/plugin_1_0.dtd">
                          <plugin id="unbbayes.io.DneIO" version="1.0.0">
                            <requires>
                               <import plugin-id="unbbayes.util.extension.core"/>
                            </requires>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="PNIO"
                             id="DneIO">
                               <parameter id="class" value="unbbayes.io.DneIO" />
                               <parameter id="name" value="DNE" />
                            </extension>
                          </plugin>

 28                                      This is how DNE's plugin descriptor (plugin.xml) looks like
Resources - Localization
Extension Points’ Spec.



                             This is basically a
                             java.util.ListResourceBundle
                              – Naming: <ClassName>_<LocaleID>
                                    •   Resources_es.class (Spanish)
                                    •   Resources_pt.class (Portuguese)
                                    •   Resources_ja.class (Japanese)

                          <extension-point id="ResourceBundle">
                            <parameter-def id="class"/>
                          </extension-point>


 29                          This extension point is a bridge between JPF mechanism and ResourceBundle mechanism
Sample Localization
                          <?xml version="1.0" ?>
Extension Points’ Spec.


                          <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd">
                          <plugin id="unbbayes.oobn.resources.ja" version="1.0.0">
                            <requires><import plugin-id="unbbayes.util.extension.core"/></requires>
                            <runtime>
                               <library id="oobnResource_ja" path="classes/" type="code"><export prefix="*" /></library>
                            </runtime>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_gui_ja">
                               <parameter id="class" value="unbbayes.gui.oobn.resources.OOBNGuiResource_ja" />
                            </extension>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_controller_ja">
                               <parameter id="class" value="unbbayes.controller.oobn.resources.OOBNControllerResources_ja" />
                            </extension>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_io_ja">
                               <parameter id="class" value="unbbayes.io.oobn.resources.OOBNIOResources_ja" />
                            </extension>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_prs_ja">
                               <parameter id="class" value="unbbayes.prs.oobn.resources.Resources_ja" />
                            </extension>
                          </plugin>


 30                                  Unfortunatelly, most of classes load resources statically, so hotplug is only partial.
New Types of Nodes
                                This is a Node and a set of additional information
Extension Points’ Spec.



                                to display it within GUI.
                          <extension-point id="PluginNode">
                          <!--class implements unbbayes.prs.extension.IPluginNode-->
                            <parameter-def id="class"/>
                          <!--shapeClass implements unbbayes.draw.extension.IPluginUShape-->
                            <parameter-def id="shapeClass"/>
                            <parameter-def id="name"/>
                          <!--panelBuilder implements unbbayes.gui.table.extension.IProbabilityFunctionPanelBuilder-->
                            <parameter-def id="panelBuilder"/>
                            <parameter-def id="description" multiplicity="none-or-one" />
                            <parameter-def id="icon" multiplicity="none-or-one" />
                            <parameter-def id="cursor" multiplicity="none-or-one" />
                          </extension-point>

 31                             Inference algorithms or I/O must be implemented separately to compile/save these nodes
Sample Nodes
                          <?xml version="1.0" ?>
Extension Points’ Spec.


                          <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd">
                          <plugin id="unbbayes.prs.extension.impl.ProbabilisticNodePluginStub" version="1.0.0">
                            <requires> <import plugin-id="unbbayes.util.extension.core"/> </requires>
                            <runtime>
                               <library id="ProbabilisticNodePluginStub" path="classes/" type="code">
                                  <export prefix="*" />
                               </library>
                               <library type="resources" path="icons/" id="ProbabilisticNodePluginStub_icons" />
                            </runtime>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="PluginNode" id="ProbabilisticNodePluginStub">
                               <parameter id="class" value="unbbayes.prs.extension.impl.ProbabilisticNodePluginStub" />
                               <parameter id="shapeClass" value="unbbayes.draw.extension.impl.DefaultPluginUShape" />
                               <parameter id="name" value="Boolean Node For Plugin Test" />
                               <parameter id="panelBuilder" value= "unbbayes.gui.table.extension.StubPanelBuilder" />
                               <parameter id="description" value="This is a stub in order to test plugins" />
                               <parameter id="icon" value="icon_stub.gif" />
                               <parameter id="cursor" value="cursor_stub.gif" />
                            </extension>
                          </plugin>


 32                                                                 This is a sample stub.
Probability Distribution
                                         Editor
Extension Points’ Spec.



                             Identical to “New Node Type” plugin
                               – Difference: these are for nodes already
                                 incorporated into UnBBayes’ core
                                    • E.g. unbbayes.prs.bn.ProbabilisticNode

                          <extension-point id="ProbabilityFunctionPanel">
                            <parameter-def id="class"/> <!--Node‘s class-->
                            <parameter-def id="name"/>
                            <parameter-def id="panelBuilder"/> <!--Panel to edit node-->
                            <parameter-def id="description" multiplicity="none-or-one" />
                            <parameter-def id="icon" multiplicity="none-or-one" />
                          </extension-point>

 33                                         See the specs of "New Node Type" plugin for details
Sample Probability
                                              Distribution Editor
                          <?xml version="1.0" ?>
Extension Points’ Spec.



                          <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd">
                          <plugin id="edu.gmu.seor.prognos.unbbayesplugin.cps" version="1.0.0">
                            <requires> <import plugin-id="unbbayes.util.extension.core"/> </requires>
                            <runtime>
                               <library id="cps" path="classes/" type="code">
                                  <export prefix="*" />
                               </library>
                               <library type="resources" path="icons/" id="cps_icons" />
                            </runtime>
                            <extension plugin-id="unbbayes.util.extension.core" point-id="ProbabilityFunctionPanel"
                               id="cps_ProbabilisticNode">
                               <parameter id="class" value="unbbayes.prs.bn.ProbabilisticNode" />
                               <parameter id="name" value="Script edition" />
                               <parameter id="panelBuilder" value=
                               "edu.gmu.seor.prognos.unbbayesplugin.cps.gui.extension.CPSPanelBuilder" />
                               <parameter id="description" value="Edit conditional probability function using scripts" />
                               <parameter id="icon" value="new_script.png" />
                            </extension>
                          </plugin>


 34                                               This is the plugin descriptor (plugin.xml) for CPS plugin
Availability

               Currently, these extension points and
               sample plugins are only available in the
Availability




               sourceforge’s SVN (trunk).
               – By now, there are no releases supporting
                 plugins yet.
               SVN repository URL:
               – https://unbbayes.svn.sourceforge.net/svnroot
                 /unbbayes/trunk/UnBBayes

 35                A release version for UnBBayes w/ plugin support is yet to come
Finally
What plugins can do for you



                              Plugins can enable third-party developers to
                              extend UnBBayes
                              – Develop features yet unforeseen
                                    • New formalisms
                                    • Customization
                              – Flexible software license
                                    • Separate sources of incompatible licenses.
                              – Fast development
                                    • Plugin dependency control
                              Plugins reduce the size of UnBBayes
                              – Distribution is easier and application is light

36                             Although this is already an open source project, plugins makes it easier to customize

More Related Content

PDF
超簡単!Subversion入門 概念編
KEY
UnBBayes Overview
PDF
[2018] 오픈스택 5년 운영의 경험
PDF
[242]open stack neutron dataplane 구현
PDF
IntelliJ IDEA を完全にマスターする話
PDF
Openstack Networking Internals - first part
PDF
SDN입문 (Overlay and Underlay)
PDF
今日こそ理解するHot変換
超簡単!Subversion入門 概念編
UnBBayes Overview
[2018] 오픈스택 5년 운영의 경험
[242]open stack neutron dataplane 구현
IntelliJ IDEA を完全にマスターする話
Openstack Networking Internals - first part
SDN입문 (Overlay and Underlay)
今日こそ理解するHot変換

What's hot (20)

PPTX
Deep Dive on GSLB with VMware NSX Advanced Load Balancer (Avi Networks)
PPTX
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
PDF
Scouter와 influx db – grafana 연동 가이드
PDF
オンプレミス回帰の動きに備えよ ~クラウドの手法をオンプレミスでも実現するには~(CloudNative Days Fukuoka 2023 発表資料)
PDF
NFVアプリケーションをOpenStack上で動かす為に - OpenStack最新情報セミナー 2017年7月
PDF
專案分層架構 twMVC#18
PDF
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
PDF
Jenkins 2.0 Pipeline & Blue Ocean
PDF
DEXCS2022OF_Install.pdf
PDF
Large scale overlay networks with ovn: problems and solutions
PDF
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
PDF
ブロケード FC ファブリックスイッチオペレーション講座(前編)
PDF
CloudStack and cloud-init
PDF
Introduction to Initramfs - Initramfs-tools and Dracut
PPTX
Scylla Summit 2022: Scylla 5.0 New Features, Part 1
PDF
React Native 入門
PDF
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
PDF
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
ODP
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
PPTX
OpenStack Neutron's Distributed Virtual Router
Deep Dive on GSLB with VMware NSX Advanced Load Balancer (Avi Networks)
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Scouter와 influx db – grafana 연동 가이드
オンプレミス回帰の動きに備えよ ~クラウドの手法をオンプレミスでも実現するには~(CloudNative Days Fukuoka 2023 発表資料)
NFVアプリケーションをOpenStack上で動かす為に - OpenStack最新情報セミナー 2017年7月
專案分層架構 twMVC#18
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
Jenkins 2.0 Pipeline & Blue Ocean
DEXCS2022OF_Install.pdf
Large scale overlay networks with ovn: problems and solutions
OpenStack超入門シリーズ いまさら聞けないNeutronの使い方
ブロケード FC ファブリックスイッチオペレーション講座(前編)
CloudStack and cloud-init
Introduction to Initramfs - Initramfs-tools and Dracut
Scylla Summit 2022: Scylla 5.0 New Features, Part 1
React Native 入門
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
DRBD/Heartbeat/Pacemakerで作るKVM仮想化クラスタ
OpenStack Neutron's Distributed Virtual Router
Ad

Similar to UnBBayes Plugin Framework (20)

PDF
664 eclipse plugin
PDF
Plugin theme
PDF
QtQuick Day 3
PPTX
Thrift vs Protocol Buffers vs Avro - Biased Comparison
PDF
BeJUG JavaFx In Practice
PPTX
Plugin architecture (Extensible Application Architecture)
PDF
GR8Conf 2009. The Grails Plugin System by Graeme Rocher
PDF
Create *real* modular Java applications - a brief introduction -
PDF
PDF
Osgi Sun 20080820
PPTX
Managing modular software for your nu get, c++ and java development
PPTX
Lifting variability from C to mbeddr-C
PDF
Project Zero JavaOne 2008
ODP
Firebird 3: provider-based architecture, plugins and OO approach to API
PDF
Make Your Builds More Groovy
PDF
make builds groovy
KEY
groovy & grails - lecture 6
PDF
Rest style web services (google protocol buffers) prasad nirantar
PDF
Real World Technologies
PPTX
Plug in framework made easy
664 eclipse plugin
Plugin theme
QtQuick Day 3
Thrift vs Protocol Buffers vs Avro - Biased Comparison
BeJUG JavaFx In Practice
Plugin architecture (Extensible Application Architecture)
GR8Conf 2009. The Grails Plugin System by Graeme Rocher
Create *real* modular Java applications - a brief introduction -
Osgi Sun 20080820
Managing modular software for your nu get, c++ and java development
Lifting variability from C to mbeddr-C
Project Zero JavaOne 2008
Firebird 3: provider-based architecture, plugins and OO approach to API
Make Your Builds More Groovy
make builds groovy
groovy & grails - lecture 6
Rest style web services (google protocol buffers) prasad nirantar
Real World Technologies
Plug in framework made easy
Ad

More from Rommel Carvalho (20)

PPTX
Ouvidoria de Balcão vs Ouvidoria Digital: Desafios na Era Big Data
PDF
Como transformar servidores em cientistas de dados e diminuir a distância ent...
PPTX
Proposta de Modelo de Classificação de Riscos de Contratos Públicos
PPTX
Categorização de achados em auditorias de TI com modelos supervisionados e nã...
PPTX
Mapeamento de risco de corrupção na administração pública federal
PDF
Ciência de Dados no Combate à Corrupção
PDF
Aplicação de técnicas de mineração de textos para classificação automática de...
PDF
Filiação partidária e risco de corrupção de servidores públicos federais
PDF
Uso de mineração de dados e textos para cálculo de preços de referência em co...
PDF
Detecção preventiva de fracionamento de compras
PDF
Identificação automática de tipos de pedidos mais frequentes da LAI
PDF
BMAW 2014 - Using Bayesian Networks to Identify and Prevent Split Purchases i...
PDF
A GUI for MLN
PDF
URSW 2013 - UMP-ST plug-in
PDF
Integração do Portal da Copa @ Comissão CMA do Senado Federal
KEY
Dados Abertos Governamentais
KEY
Modeling a Probabilistic Ontology for Maritime Domain Awareness
PDF
Probabilistic Ontology: Representation and Modeling Methodology
PDF
SWRL-F - A Fuzzy Logic Extension of the Semantic Web Rule Language
ODP
Default Logics for Plausible Reasoning with Controversial Axioms
Ouvidoria de Balcão vs Ouvidoria Digital: Desafios na Era Big Data
Como transformar servidores em cientistas de dados e diminuir a distância ent...
Proposta de Modelo de Classificação de Riscos de Contratos Públicos
Categorização de achados em auditorias de TI com modelos supervisionados e nã...
Mapeamento de risco de corrupção na administração pública federal
Ciência de Dados no Combate à Corrupção
Aplicação de técnicas de mineração de textos para classificação automática de...
Filiação partidária e risco de corrupção de servidores públicos federais
Uso de mineração de dados e textos para cálculo de preços de referência em co...
Detecção preventiva de fracionamento de compras
Identificação automática de tipos de pedidos mais frequentes da LAI
BMAW 2014 - Using Bayesian Networks to Identify and Prevent Split Purchases i...
A GUI for MLN
URSW 2013 - UMP-ST plug-in
Integração do Portal da Copa @ Comissão CMA do Senado Federal
Dados Abertos Governamentais
Modeling a Probabilistic Ontology for Maritime Domain Awareness
Probabilistic Ontology: Representation and Modeling Methodology
SWRL-F - A Fuzzy Logic Extension of the Semantic Web Rule Language
Default Logics for Plausible Reasoning with Controversial Axioms

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Cell Structure & Organelles in detailed.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Basic Mud Logging Guide for educational purpose
PDF
Pre independence Education in Inndia.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Institutional Correction lecture only . . .
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O7-L3 Supply Chain Operations - ICLT Program
Cell Structure & Organelles in detailed.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Basic Mud Logging Guide for educational purpose
Pre independence Education in Inndia.pdf
Computing-Curriculum for Schools in Ghana
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Sports Quiz easy sports quiz sports quiz
PPH.pptx obstetrics and gynecology in nursing
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Institutional Correction lecture only . . .
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
01-Introduction-to-Information-Management.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
O5-L3 Freight Transport Ops (International) V1.pdf

UnBBayes Plugin Framework

  • 1. UnBBayes – Plugin Feature Overview ~ Usage and development of plugins for UnBBayes ~ 1 02/07/2010 Contact: Shou Matsumoto (cardialfly@[yahoo|gmail].com)
  • 2. Contents Concepts Features & Benefits Applications Sample Plugins (you may skip this section) Specification Extension Points’ Spec. (you may skip this section) Availability 2 Project page: http://sourceforge.net/projects/unbbayes/
  • 3. What is UnBBayes? UnBBayes is a probabilistic network framework written in Java. It has both a Concepts GUI and an API with inference, sampling, learning and evaluation. It supports BN, ID, MSBN, OOBN, HBN, MEBN/PR-OWL, structure, parameter and incremental learning. 3 Source: <http://sourceforge.net/projects/unbbayes/>
  • 4. What is a plugin? A plugin consists of a computer program that interacts with a host application to provide a certain, usually very specific, function "on Concepts demand“ [wikipedia]. An UnBBayes’ plugin can be a folder, a ZIP or a JAR file located in “plugins” folder. Content of an ordinal UnBBayes’ plugin: – Plugin descriptor (XML file) – Classes (a program) – Resources (e.g. icons, message files...) 4 A plugin descriptor is the main and minimal content of a plugin
  • 5. General Benefits of Plugins Features & Benefits To enable third-party developers to create capabilities to extend an application To support features yet unforeseen To reduce the size of each application To separate source code from an application because of incompatible software licenses. Modularization/Componentization of the software – Interfaces are modeled as extension points. 5 Modularization/componentization = organized system
  • 6. General Features Features & Benefits Plugin dependency Plugin’s version control Plugins for Plugins Hotplug Flexible I/O handler 6
  • 7. Plugin dependency We can develop new plugins reusing a pre- Features & Benefits existing one. – A plugin may have some dependency to a pre- existing one. Pros: – Fast development – Less redundancy – smaller programs Contras. – Dependency hell • If my plugin depends on “A” and “A” depends on “B” and so on, my plugin will not work until the user obtains all the dependencies. 7 A dependency is declared in plugin descriptor (XML)
  • 8. Plugin’s version control Features & Benefits The application can manage several different versions of a plugin. – E.g. version 1.0.0, version 5.2.1... Usually, the newest version is loaded by the application. – Except if a given plugin claims dependency to a unique version. 8 There is no need to overwrite files in order to overwrite features anymore.
  • 9. Plugins for Plugins Features & Benefits ...This application, under the academic world, shall have a new birth of freedom -- and that government of the plugin, by the plugin, for the plugin, shall not perish from the earth. – If a plugin has an extension point, we can add a plugin for it. – In another words, we can have plugins adding functionalities to another plugin. 9 An extension point is declared in plugin descriptor (XML)
  • 10. Hotplug Features & Benefits Usually, there is no need to restart the application in order to enable a plugin. – Obviously, there are some exceptions. UnBBayes has a menu item to “reload” plugins at runtime. 10
  • 11. Flexible I/O handler If more than one module plugin can handle a file, Features & Benefits ask for the user. If more than one I/O plugin can handle a file, ask for the user. 11 File handling is flexible
  • 12. Applications Development of a full new functionality – Projects / Modules Applications – New formalisms Development of a new file format. Modeling new node types and/or CPD Usage of new Inference Algorithms Localization – E.g. Spanish, Japanese 12
  • 13. Summary of extension points New Split button for new modules Modules I/O New Nodes and CPD Inference 13 Localization Algorithm
  • 14. Datamining Module - UnBMiner Sample Plugins 14 A tool with 10 functionalities for massive data handling
  • 15. Metaphor – Medical, Human Identification Sample Plugins 15 A tool that offers an easy interface for finding entries and analisis. Expert Systems.
  • 16. Sampling - Likelihood Weighting, Monte Carlo, Gibbs Sample Plugins 16 Generation of sample data sets from a given network.
  • 17. Inference Algorithms – Likelihood Weighting, Gibbs Sample Plugins 17 We can select another algorithm to compile a network under the core
  • 18. OOBN Module’s Japanese Localization Sample Plugins 18 It is possible to add resource files as plugin
  • 19. I/O – DNE, XMLBIF, NET Sample Plugins 19 Save or load different network file formats
  • 20. Conditional Probability Distribution Using Scripts Sample Plugins 20 It is possible to edit a Conditional Probability Distribution using scripts
  • 21. Specification UnBBayes uses Java Plugin Framework (JPF) for plugin support. Specification – JPF is a open-source, LGPL licenced plug-in mechanism adapted from Eclipse's plug-in mechanism. The “core” of UnBBayes is the BN module. – All other modules/functionalities are being refactored as plugins. The core has its plugin descriptor to declare extension points (unbbayes.core). 21 Everything is configured using plugin descriptors (XML)
  • 22. Folder Structure Place the plugins here Specification These are default plugins that come with the core 22
  • 23. Modules Extension Points’ Spec. UnBBayes' modules are basically swing internal frames. <extension-point id="Module"> <!--class extends unbbayes.util.extension.UnBBayesModule--> <parameter-def id="class"/> <!--builder implements unbbayes.util.extension.UnBBayesModuleBuilder--> <parameter-def id="builder" multiplicity="none-or-one" /> <parameter-def id="name"/> <parameter-def id="description" multiplicity="none-or-one" /> <parameter-def id="icon" multiplicity="none-or-one" /> <!--category creates new menu items on demmand--> <parameter-def id="category" multiplicity="none-or-one" /> </extension-point> 23 These XML definitions follow the JPF specification.
  • 24. Sample Module - UnBMiner <?xml version="1.0" ?> Extension Points’ Spec. <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd"> <plugin id="unbbayes.datamining" version="0.0.1"> <requires> <import plugin-id="unbbayes.util.extension.core"/> </requires> <runtime> <library id="unbminer" path="classes/" type="code"> <export prefix="*" /> </library> <library type="resources" path="icons/" id="icons" /> </runtime> <extension plugin-id="unbbayes.util.extension.core" point-id="Module" id="unbminer"> <parameter id="class" value="unbbayes.datamining.gui.extension.UnBMinerJPFModule" /> <parameter id="name" value="Data Mining Project" /> <parameter id="builder" value="unbbayes.datamining.gui.extension.UnBMinerJPFModule" /> <parameter id="description" value="UnBBayes Dataminer - UnBMiner" /> <parameter id="icon" value="mining.png" /> <parameter id="category" value="tool" /> </extension> </plugin> 24 This is how UnBMiner's plugin descriptor (plugin.xml) looks like
  • 25. Inference Algorithm Extension Points’ Spec. This is basically a panel (for options) – This panel holds an implementation of unbbayes.util.extension.bn.inference.IInferenceAlgorithm, which runs a specific inference algorithm. <extension-point id="InferenceAlgorithm"> <!--class extends unbbayes.util.extension.bn.inference.InferenceAlgorithmOptionPanel--> <parameter-def id="class"/> </extension-point> 25 Inference Algorithms are usually started when we "compile" a BN
  • 26. Sample Algorithm - Gibbs <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" Extension Points’ Spec. "http://jpf.sourceforge.net/plugin_1_0.dtd"> <plugin id="unbbayes.simulation.sampling.GibbsSampling" version="1.0.0"> <requires><import plugin-id="unbbayes.util.extension.core"/><import plugin- id="unbbayes.simulation.montecarlo.sampling"/></requires> <runtime> <library id="gibbs" path="classes/" type="code"><export prefix="*" /></library> <library type="resources" path="icons/" id="icons" /> </runtime> <extension plugin-id="unbbayes.util.extension.core" point-id="Module" id="gibbsSampling"> <parameter id="class" value="unbbayes.gui.GibbsSamplingModule" /> <parameter id="name" value="Gibbs Sampling" /> <parameter id="builder" value="unbbayes.gui.GibbsSamplingModule" /> <parameter id="description" value="Sampling using Gibbs" /> <parameter id="icon" value="sampling.png" /> <parameter id="category" value="sampling" /> </extension> <extension plugin-id="unbbayes.util.extension.core" point-id="InferenceAlgorithm" id="gibbsAlgorithm"> <parameter id="class" value="unbbayes.gui.option.GibbsSamplingOptionPanel" /> </extension> </plugin> 26 A single plugin.xml may implement several extension points
  • 27. I/O This is just a combination of Extension Points’ Spec. unbbayes.io.BaseIO and a name – The name is displayed when a conflict occurs <extension-point id="PNIO"> <parameter-def id="class"/> <parameter-def id="name"/> </extension-point> 27 A single plugin.xml may specify several extension points - a plugin may expect several plugins
  • 28. Sample I/O - DNE Extension Points’ Spec. <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd"> <plugin id="unbbayes.io.DneIO" version="1.0.0"> <requires> <import plugin-id="unbbayes.util.extension.core"/> </requires> <extension plugin-id="unbbayes.util.extension.core" point-id="PNIO" id="DneIO"> <parameter id="class" value="unbbayes.io.DneIO" /> <parameter id="name" value="DNE" /> </extension> </plugin> 28 This is how DNE's plugin descriptor (plugin.xml) looks like
  • 29. Resources - Localization Extension Points’ Spec. This is basically a java.util.ListResourceBundle – Naming: <ClassName>_<LocaleID> • Resources_es.class (Spanish) • Resources_pt.class (Portuguese) • Resources_ja.class (Japanese) <extension-point id="ResourceBundle"> <parameter-def id="class"/> </extension-point> 29 This extension point is a bridge between JPF mechanism and ResourceBundle mechanism
  • 30. Sample Localization <?xml version="1.0" ?> Extension Points’ Spec. <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd"> <plugin id="unbbayes.oobn.resources.ja" version="1.0.0"> <requires><import plugin-id="unbbayes.util.extension.core"/></requires> <runtime> <library id="oobnResource_ja" path="classes/" type="code"><export prefix="*" /></library> </runtime> <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_gui_ja"> <parameter id="class" value="unbbayes.gui.oobn.resources.OOBNGuiResource_ja" /> </extension> <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_controller_ja"> <parameter id="class" value="unbbayes.controller.oobn.resources.OOBNControllerResources_ja" /> </extension> <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_io_ja"> <parameter id="class" value="unbbayes.io.oobn.resources.OOBNIOResources_ja" /> </extension> <extension plugin-id="unbbayes.util.extension.core" point-id="ResourceBundle" id="oobn_prs_ja"> <parameter id="class" value="unbbayes.prs.oobn.resources.Resources_ja" /> </extension> </plugin> 30 Unfortunatelly, most of classes load resources statically, so hotplug is only partial.
  • 31. New Types of Nodes This is a Node and a set of additional information Extension Points’ Spec. to display it within GUI. <extension-point id="PluginNode"> <!--class implements unbbayes.prs.extension.IPluginNode--> <parameter-def id="class"/> <!--shapeClass implements unbbayes.draw.extension.IPluginUShape--> <parameter-def id="shapeClass"/> <parameter-def id="name"/> <!--panelBuilder implements unbbayes.gui.table.extension.IProbabilityFunctionPanelBuilder--> <parameter-def id="panelBuilder"/> <parameter-def id="description" multiplicity="none-or-one" /> <parameter-def id="icon" multiplicity="none-or-one" /> <parameter-def id="cursor" multiplicity="none-or-one" /> </extension-point> 31 Inference algorithms or I/O must be implemented separately to compile/save these nodes
  • 32. Sample Nodes <?xml version="1.0" ?> Extension Points’ Spec. <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd"> <plugin id="unbbayes.prs.extension.impl.ProbabilisticNodePluginStub" version="1.0.0"> <requires> <import plugin-id="unbbayes.util.extension.core"/> </requires> <runtime> <library id="ProbabilisticNodePluginStub" path="classes/" type="code"> <export prefix="*" /> </library> <library type="resources" path="icons/" id="ProbabilisticNodePluginStub_icons" /> </runtime> <extension plugin-id="unbbayes.util.extension.core" point-id="PluginNode" id="ProbabilisticNodePluginStub"> <parameter id="class" value="unbbayes.prs.extension.impl.ProbabilisticNodePluginStub" /> <parameter id="shapeClass" value="unbbayes.draw.extension.impl.DefaultPluginUShape" /> <parameter id="name" value="Boolean Node For Plugin Test" /> <parameter id="panelBuilder" value= "unbbayes.gui.table.extension.StubPanelBuilder" /> <parameter id="description" value="This is a stub in order to test plugins" /> <parameter id="icon" value="icon_stub.gif" /> <parameter id="cursor" value="cursor_stub.gif" /> </extension> </plugin> 32 This is a sample stub.
  • 33. Probability Distribution Editor Extension Points’ Spec. Identical to “New Node Type” plugin – Difference: these are for nodes already incorporated into UnBBayes’ core • E.g. unbbayes.prs.bn.ProbabilisticNode <extension-point id="ProbabilityFunctionPanel"> <parameter-def id="class"/> <!--Node‘s class--> <parameter-def id="name"/> <parameter-def id="panelBuilder"/> <!--Panel to edit node--> <parameter-def id="description" multiplicity="none-or-one" /> <parameter-def id="icon" multiplicity="none-or-one" /> </extension-point> 33 See the specs of "New Node Type" plugin for details
  • 34. Sample Probability Distribution Editor <?xml version="1.0" ?> Extension Points’ Spec. <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd"> <plugin id="edu.gmu.seor.prognos.unbbayesplugin.cps" version="1.0.0"> <requires> <import plugin-id="unbbayes.util.extension.core"/> </requires> <runtime> <library id="cps" path="classes/" type="code"> <export prefix="*" /> </library> <library type="resources" path="icons/" id="cps_icons" /> </runtime> <extension plugin-id="unbbayes.util.extension.core" point-id="ProbabilityFunctionPanel" id="cps_ProbabilisticNode"> <parameter id="class" value="unbbayes.prs.bn.ProbabilisticNode" /> <parameter id="name" value="Script edition" /> <parameter id="panelBuilder" value= "edu.gmu.seor.prognos.unbbayesplugin.cps.gui.extension.CPSPanelBuilder" /> <parameter id="description" value="Edit conditional probability function using scripts" /> <parameter id="icon" value="new_script.png" /> </extension> </plugin> 34 This is the plugin descriptor (plugin.xml) for CPS plugin
  • 35. Availability Currently, these extension points and sample plugins are only available in the Availability sourceforge’s SVN (trunk). – By now, there are no releases supporting plugins yet. SVN repository URL: – https://unbbayes.svn.sourceforge.net/svnroot /unbbayes/trunk/UnBBayes 35 A release version for UnBBayes w/ plugin support is yet to come
  • 36. Finally What plugins can do for you Plugins can enable third-party developers to extend UnBBayes – Develop features yet unforeseen • New formalisms • Customization – Flexible software license • Separate sources of incompatible licenses. – Fast development • Plugin dependency control Plugins reduce the size of UnBBayes – Distribution is easier and application is light 36 Although this is already an open source project, plugins makes it easier to customize