Top Banner
Vehicle ID PO Tutorial Spring 2012 1 PROBABILISTIC ONTOLOGY DEVELOPMENT OF THE VEHICLE ID PROBLEM Spring 2012 This tutorial will generally follow a Probabilistic Ontology Development Methodology (PODM). The model will be used to infer vehicle type from MTI, imaging sensor reports, weather reports and GIS reports. Background: 1. Vehicles exist in an area of interest with some prior probability. A MEBN model is used to determine the type of vehicle that is approaching. 2. A military commander receives input from some or all of his available sensors, including MTI, Imaging sensors, and GIS reports. A current weather forecast may be available. 3. The class diagram (Figure 1) shows relationships of features that immediately affect the likelihood of a determination of vehicle type. There are three basic types of entity: contacts (objects such as vehicles that we wish to identify), reports (evidence about contacts derived from sensors), and regions (places where contacts can be located). The diagram shows associations between these entity types: vehicles can be located in regions (hasLocation association) and reports provide evidence about contacts (hasReportedEntity association). There are also entities to represent the terrain type of a region, the vehicle type of a contact, and the content of a report. These entity types and associations are also shown on the diagram: hasTerrainType connects a region with its associated terrain type; hasVehicleType connects a vehicle contact with the type of vehicle; and hasImagingDetection connects an image report with its content. Figure 1 – Vehicle ID Class Diagram
22

VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Mar 13, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  1  

PROBABILISTIC  ONTOLOGY  DEVELOPMENT    OF  THE  VEHICLE  ID  PROBLEM  

Spring  2012  

This  tutorial  will  generally  follow  a  Probabilistic  Ontology  Development  Methodology  (PODM).    The  model  will  be  used  to  infer  vehicle  type  from  MTI,  imaging  sensor  reports,  weather  reports  and  GIS  reports.  

 

Background:  

1. Vehicles  exist  in  an  area  of  interest  with  some  prior  probability.    A  MEBN  model  is  used  to  determine  the  type  of  vehicle  that  is  approaching.  

2. A  military  commander  receives  input  from  some  or  all  of  his  available  sensors,  including  MTI,  Imaging  sensors,  and  GIS  reports.    A  current  weather  forecast  may  be  available.    

3. The  class  diagram  (Figure  1)  shows  relationships  of  features  that  immediately  affect  the  likelihood  of  a  determination  of  vehicle  type.  There  are  three  basic  types  of  entity:  contacts  (objects  such  as  vehicles  that  we  wish  to  identify),  reports  (evidence  about  contacts  derived  from  sensors),  and  regions  (places  where  contacts  can  be  located).  The  diagram  shows  associations  between  these  entity  types:  vehicles  can  be  located  in  regions  (hasLocation  association)  and  reports  provide  evidence  about  contacts  (hasReportedEntity  association).  There  are  also  entities  to  represent  the  terrain  type  of  a  region,  the  vehicle  type  of  a  contact,  and  the  content  of  a  report.  These  entity  types  and  associations  are  also  shown  on  the  diagram:  hasTerrainType  connects  a  region  with  its  associated  terrain  type;  hasVehicleType  connects  a  vehicle  contact  with  the  type  of  vehicle;  and  hasImagingDetection  connects  an  image  report  with  its  content.      

 Figure  1  –  Vehicle  ID  Class  Diagram  

Page 2: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  2  

4. Figure  2  is  a  Bayesian  network  (BN)  model    created  in  Netica  for  a  more  extensive  vehicle  identification  problem.  This  BN  model  can  be  used  to  test  the  probabilistic  ontology  created  in  Multi-­‐Entity  Bayesian  Network  (MEBN)  for  logic  errors.    The  Conditional  Probability  Tables  (CPT)  populated  for  this  model  will  be  used  to  populate  the  Local  Probability  Distributions  (LPD)  in  the  MEBN  model.  

5. We  will  be  creating  a  probabilistic  ontology  (PO)  for  a  part  of  this  model.  The  part  covered  by  the  tutorial  is  outlined  in  red.    We  will  note  how  to  extend  the  PO  to  include  the  full  set  of  RVs  shown  in  Figure  2.  

 Figure  2  -­‐  Vehicle  ID  Bayesian  Network  

Ontology  Development:  

1. Create  and  Save  the  Ontology  in  UnBBayes  i. Start  UnBBayes  ii. Select  Multi-entity Bayesian Network  button  (2nd  from  left)    iii. Select  Save net  button  (4th  from  left)  iv. Navigate  to  the  directory  of  your  choice  and  type  VehicleIDPO.ubf  and  Save  v. In  the  I/O  extension  conflict  pane,  select  UnBBayes File with PR-OWL 2.0  

and  OK  vi. At  the  OK  dialogue  click  OK  

Close  the  file  to  reset  the  ontology    

 

Page 3: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  3  

2. Create  Ontology  Classes  i. On  the  Toolbar,  click  the  Open net  button  (3rd  from  left)  to  open  the  MEBN  ii. In  the  Open  dialogue,  navigate  to  the  location  of  your  saved VehicleIDPO.ubf  file,  

highlight  the  file,  and  select  Open      iii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK  iv. On  the OWL2 Entities tab,  select  the  Classes  tab  and  observe  the  superclass  Thing  at  

the  top  of  the  Class  hierarchy  pane  v. Click  on  the  superclass  Thing,  and  select  the  Add subclass  button  vi. Enter  the  first  subclass,  VehicleType, and  select  OK  vii. Select  the  VehicleType  class  and  then  the  Add sibling class  button  viii. Enter  the  next  subclass, Terrain,  and  select  OK  ix. Repeat  the  procedure  for  the  following  sibling  classes:  

• Contact

• Report

• Region

• ImagingDetection

When  you  finish,  the  Class  hierarchy  pane  should  look  like  the  following  (Figure  3)  

x.    Figure  3  –  Class  Hierarchy  

 xi. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    xii. In  the  Save  dialogue  highlight  VehicleIDPO.ubf  in  the  dialogue,  change  to  

VehicleIDPO_a.ubf,  and  select  Save  xiii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK    xiv. Observe  the  File  saved  dialogue  and  click  OK  

Note:  We  will  be  saving  the  ontology  and  probabilistic  ontology  after  each  major  step  in  the  process.    It  is  recommended  that  these  be  saved  using  sequential  letters  to  prevent  total  loss  of  work  in  case  of  a  catastrophic  software  glitch.  

Page 4: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  4  

3. Create  Object  Properties  of  Classes  i. Select  the  Object Properties  tab  and  then  click  the  topObjectProperty in  the

Object  property  hierarchy pane  ii. Select  the  Add sub property  button,  enter  hasVehicleType,  and  OK  iii. Select  the hasVehicleType  data  property  and  then  the Add sibling property

button    iv. Enter  the  next  data  property,  hasTerrainType,  and  OK  v. Repeat  the  procedure  for  the  following  object  properties:  

• hasReportedEntity

• hasLocation

• hasImagingDetection

When  you  finish,  the  Object  property  hierarchy  pane  should  resemble  the  following  (Figure  4)  

 Figure  4  –  Object  Property  Hierarchy  

 vi. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    vii. In  the  Save  dialogue  highlight  VehicleIDPO_a.ubf  in  the  dialogue,  change  to  

VehicleIDPO_b.ubf,    and  select  Save  

Page 5: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  5  

viii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK  

ix. Observe  the  File  saved  dialogue  and  click  OK    

4. Assign  Domain  and  Range  to  Each  Object  Property  i. On  the  Object Properties  tab,  select  hasImagingDetection and  select  Domains  in  

the  Description  pane  ii. On  the  Class hierarchy  tab  click  Thing,  highlight  Report,  and  click  OK  iii. On  the  Object Properties  tab,  select  Ranges  in  the  Description  pane  iv. On  the  Class hierarchy  tab  click  Thing,  highlight  ImagingDetection,  and  click  OK  v. Repeat  this  process  for  each  of  the  Object  properties  in  Table  1  vi. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    vii. In  the  Save  dialogue  highlight  VehicleIDPO_b.ubf  in  the  dialogue,  change  to  

VehicleIDPO_c.ubf,  and  select  Save  viii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK  ix. Observe  the  File  saved  dialogue  and  click  OK  

Table  1  –  Object  Property  Domain  and  Range  

Property   Domain   Range  hasImagingDetection Report ImagingDetection hasLocation Contact Region hasReportedEntity Report Contact hasTerrainType Region Terrain hasVehicleType Contact VehicleType

 5. Create  Data  Properties  of  Classes  with  Domain  and  Range  

i. Select  the  Data Properties  tab  and  then  click  the  topDataProperty in  the Object  property  hierarchy pane  

ii. Select  the  Add sub property  button,  enter  hasClearWeather,  and  OK  iii. On  the  Data Properties  tab,  select  hasClearWeather and  select  Domains  in  the  

Description  pane  iv. On  the  Class hierarchy  tab  click  Thing,  highlight  Region,  and  click  OK  v. Now  select  Ranges  in  the  Description  pane  vi. On  the  Built in datatypes  tab,  highlight  Boolean,  and  select  OK  vii. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    viii. In  the  Save  dialogue  highlight  VehicleIDPO_c.ubf  in  the  dialogue,  change  to  

VehicleIDPO_d.ubf,  and  select  Save  ix. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK  x. Observe  the  File  saved  dialogue  and  click  OK  

 

Page 6: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  6  

6. Assign  Individuals  to  Classes  i. On  the  Individuals  tab  expand  the  superclass  Thing  in  the  Class  hierarchy  pane  ii. Select  ImagingDetection  and  observe  the  empty  Members list:  in  the  Members  list  

pane  iii. Select  the  Add individual  button,  type  Image_NoVehicle,  and  OK  iv. Repeat  the  process  for  the  other  individuals  as  specified  in  Table  2    v. From  the  File  menu,  select  Save  and  OK  

Table  2  –  Individuals  

Class   Individual(s)  ImagingDetection Image_NoVehicle

Image_Tracked Image_Wheeled

Report RepImg_1 RepImg_2 RepImg_3

Contact Track_1 Track_2 Track_3

Region Region_1 Region_2

Terrain Terr_OffRoad Terr_OnRoad Terr_VeryRough

VehicleType Obj_NonVehicle Obj_Tracked Obj_Wheeled

 7. Assign  Evidence  (Assertions)  to  Individuals  

i. On  the  Individuals  tab  expand  the  superclass  Thing  in  the  Class  hierarchy  pane  and  click  Report  

ii. In  the  Members  list  pane,  click  RepImg_1  iii. In  the  Property  assertions  pane,  select  Object property assertions  iv. Click  the  topObjectProperty  to  expand  and  select  hasReportedEntity  v. Scroll  through  the  list  of  Individuals  in  the  right  column,  select  Track_1,  and  OK  vi. Repeat  the  process  for  the  other  assertions  as  specified  in  Table  3.    vii. Click  Region  in  the  Class  hierarchy  pane  viii. In  the  Members  list  pane,  click  Region_1  ix. In  the  Property  assertions  pane,  select  Data property assertions  x. Click  the  topDataProperty  to  expand  and  select  hasClearWeather  xi. Select  boolean  from  the  type  dropdown  menu,  type  true  in  the  Value  pane,  and  select  

OK.  xii. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    xiii. In  the  Save  dialogue  highlight  VehicleIDPO_d.ubf  in  the  dialogue,  change  to  

VehicleIDPO_e.ubf,  and  select  Save  

Page 7: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  7  

xiv. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK  

xv. Observe  the  File  saved  dialogue  and  click  OK  

Table  3  –  Evidence  (Assertions)  

Class   Individual(s)   Property   Assertion  Report RepImg_1 hasReportedEntity Track_1

hasImagingDetection Image_Tracked RepImg_2 hasReportedEntity Track_2

hasImagingDetection Image_Wheeled RepImg_3 hasReportedEntity Track_3

hasImagingDetection Image_Wheeled Contact Track_1 hasLocation Region_1

Track_2 hasLocation Region_2 Track_3 hasLocation Region_2

Region Region_1 hasTerrainType Terr_OnRoad Region_2

 

8. Evaluate  Logic  with  the  Protégé  Reasoner  i. From  the  Reasoner  menu,  select  Synchronize reasoner  

§ Observe  Reasoner  progress  bar  ii. Select  Classes  tab  and  Class hierarchy (inferred)  sub-­‐tab  

§ Click  Thing  and  observe  the  subclasses  § There  should  be  no  RED  values  

iii. Close  the  MEBN  by  selecting  the  X  in  the  upper  right  corner    

Congratulations!    You  have  successfully  created  the  Vehicle  ID  Ontology.    

Probabilistic  Ontology  Development:  

9. Create  Initial  MEBN  Fragments  (MFrags)  i. On  the  Toolbar,  click  the  Open net  button  (3rd  from  left)  to  open  the  MEBN  ii. In  the  Open  dialogue,  navigate  to  the  location  of  your  saved VehicleIDPO_e.ubf  file,  

highlight  the  file,  and  select  Open      iii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK  iv. In  the  MTheory  tab,  observe  3  panes:  the  MTheory  tree  pane  at  the  top  left,  the  Description  

pane  at  the  bottom  left,  and  the  MFrag  workspace  pane  on  the  right.    If  you  see  only  two  panes,  drag  the  lower  right-­‐hand  corner  of  the  window  to  enlarge  the  window  until  three  panes  are  visible.  Click  the  Insert MFrag  button  (Flag  with  an  ‘F’)  

v. Highlight  DMFrag1  in  the  text  box  at  the  center  of  the  workspace  (Figure  5),  type  VehicleType_MF,  and  RETURN.    Observe  the  MFrag  name  change  in  the  text  box,  the  top  of  the  MFrag  window,  and  the  MTheory  tree  

Page 8: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  8  

 Figure  5  –  MFrag  Creation  

vi. Create  additional  MFrags.    Be  sure  to  select RETURN for  each  after  entering  the  name  of  the  MFrag.  

§ ImagingReport_MF § Reference_MF

vii. Now  change  the  name  of  the  MTheory.  To  do  this,  click  the  Edit the MTheory  button  just  above  the  Insert MFrag  button.  Highlight  MEBN  in  the  text  box  at  the  center  of  the  workspace,  type  VehicleIDPO,  and  RETURN.    Observe  the  MTheory  name  change  in  the  text  box  and  the  MTheory  tree  

viii. When  you  have  finished,  the  MTheory  Tree  should  appear  similar  to  Figure  6  

 Figure  6  –  MTheory  Tree  

 ix. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    x. In  the  Save  dialogue  highlight  VehicleIDPO_e.ubf  in  the  dialogue,  change  to  

VehicleIDPO_f.ubf,  and  select  Save  

Page 9: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  9  

xi. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

xii. Observe  the  File  saved  dialogue  and  click  OK  xiii. Close  UnBBayes  to  update  the  owl  files  

 10. Populate  the  initial  set  of  MFrags  

i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  VehicleIDPO_f.ubf,  and  click  Open  

ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

iii. In  the  Property2Node  tab,  select  the  Show MTheory tree  button,  and  double-­‐click  VehicleType_MF  MFrag    

iv. Select  the  Show OWL Properties  button,  and  highlight  the hasVehicleType  property  v. Drag  the  hasVehicleType  property  into  the  workspace  to  create  a  resident  node  vi. Drag  the  hasTerrainType  property  into  the  workspace  to  create  a  resident  node  vii. Right  click  on  the  resident  nodes  and  Resize to fit text  viii. Create  a  resident  node(s)  for  each  of  the  other  MFrags  by  dragging  and  dropping  the  

appropriate  property  as  shown  in  Table  4.    In  each  case,  perform  the  following  steps  on  the  Property2Node  tab:  

a.  Select  the  Show  MTheory  tree  button  b.  Double-­‐click  the  MFrag  of  interest  (e.g.  ImagingReport_MF)  c.  Click  the  Show  OWL  Properties  tab  d.  Drag  the  appropriate  OWL  Property  into  the  workspace  (e.g.  hasClearWeather)  e.  Right  click  on  the  resident  node  and  Resize  to  fit  text  

Table  4  –  Resident  Nodes  in  MFrags  

MFrag OWL Property / Resident Node VehicleType_MF hasTerrainType

hasVehicleType Reference_MF hasReportedEntity

hasLocation ImagingReport_MF hasClearWeather

hasImagingDetection  

ix. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    x. In  the  Save  dialogue  highlight  VehicleIDPO_f.ubf  in  the  dialogue,  change  to  

VehicleIDPO_g.ubf,  and  select  Save e  xi. In  the I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  

the  dropdown  menu  and  click  OK    xii. Observe  the  File  saved  dialogue  and  click  OK  xiii. Close  UnBBayes  to  update  the  owl  files  

   

Page 10: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  10  

11. Assign  States  to  resident  nodes  i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  

VehicleIDPO_g.ubf,  and  click  Open  ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK    iii. Select  the  Show Mtheory  tree  button  of  the  MTheory  tab  iv. Double-­‐click  the  VehicleType_MF    MFrag  in  the  MTheory  Tree  pane  and  click  the  

hasVehicleType()  resident  node  v. Select  the  Insert category states  button  and  the  Add a pre-defined state  

button  vi. Select  Obj_NonVehicle  from  the  Existent  States  pane  and  the  plus  sign  (+)  vii. Observe  the  state  (Obj_NonVehicle)  in  the  Resident  Node  pane  viii. Select  the  Obj_Wheeled  and  Obj_Tracked  states  in  a  similar  fashion  and  observe  their  

presence  in  the  Resident  Node  pane  ix. Assign  category  states  to  other  appropriate  nodes  according  to  the  first  five  rows  of  Table  5  

by  completing  the  following  steps:  a.  Select  the  Show  MTheory  tree  button  b.  Double-­‐click  the  appropriate  MFrag  in  the  MTheory  Tree  pane  and  click  the  

resident  node  in  the  workspace  c.  Select  the  Insert  category  states  button  and  Add  a  pre-­‐defined  state  button  d. Select  the  state  from  the  Existent  States  pane  and  the  plus  sign(+)  e. Observe  the  Resident  Node  pane  and  repeat  for  each  state  of  the  MFrag  

Table  5  –  MFrag  States  

MFrag Resident Node Entries Type VehicleType_MF hasVehicleType Obj_NonVehicle/Obj_Wheeled/

Obj_Tracked Category

hasTerrainType Terr_VeryRough/Terr_OffRoad/ Terr_OnRoad

Category

ImagingReport_MF hasImagingDetection Image_NoVehicle/Image_Wheeled/Image_Tracked

Category

hasClearWeather true / false / absurd Boolean Reference_MF hasReportedEntity Contact Object

hasLocation Region Object

 x. Assign  Boolean  states  to  hasClearWeather  node  in  ImagingReport_MF    as  shown  in  

in  Table  5  by  completing  the  following  steps  a. Select  the  ShowMTheory  tree  button  b. Double-­‐click  ImagingReport_MF  MFrag  in  the  MTheory  Tree  pane  and  click  the  

hasClearWeather  resident  node  in  the  workspace  c. Select  the  Insert boolean entity states  button  on  the  Resident  Node  

pane  d. Click  the  plus  sign(+)  

Page 11: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  11  

xi. Assign  Object  entity  states  to  hasLocation  and  hasReportedEntity  nodes  in  Reference_MF  MFrag  by  completing  the  following  steps  

a. Select  the  ShowMTheory  tree  button  b. Double-­‐click  Reference_MF  MFrag  in  the  MTheory  Tree  pane  and  click  the  

hasReportedEntity  resident  node  in  the  workspace  c. Select  the  Insert object entity states  button  on  the  Resident  Node  

pane    d. Select  Contact  from  the  dropdown  menu  and  the  plus  sign(+)  e. Click  the  hasLocation  resident  node  in  the  workspace  f. Select  the  Insert object entity states  button  on  the  Resident  Node  

pane    g. Select  Region  from  the  dropdown  menu  and  the  plus  sign(+)  

 xii. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)  xiii. In  the  Save  dialogue  highlight  VehicleIDPO_g.ubf  in  the  dialogue,  change  to  

VehicleIDPO_h.ubf,  and  select  Save  xiv. In  the I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  

the  dropdown  menu  and  click  OK    xv. Observe  the  File  saved  dialogue  and  click  OK  xvi. Close  UnBBayes  to  update  the  owl  files  

 12. Assign  Ordinary  Variables  to  the  MFrags  

i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  VehicleIDPO_h.ubf,  and  click  Open  

ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

iii. Select  the  MTheory  tab  and  observe  the  newly  created  resident  nodes  (Figure  7)  

 Figure  7  –  Resident  Nodes  of  MFrags  

Page 12: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  12  

iv. Double-­‐click  on  the  VehicleType_MF  MFrag  and  observe  the hasVehicleType()  node  in  the  workspace  

v. Select  the Insert Ordinary Variable  button  and  click  in  the  workspace  above  the  hasVehicleType()  node  

vi. Highlight  the  variable  name  above  the  workspace,  type  the  variable  name  ctc,  and  RETURN  (note  the  lower-­‐case  variable  name)  

vii. From  the  dropdown  menu  above  the  workspace,  select  Contact  viii. Right-­‐click  the  new  variable  and  Resize to fit text  ix. Click  on  the  hasVehicleType resident  node  and  observe  the  Resident  Node  pane  appear  

to  the  left  of  the  workspace  x. Select  the  Edit Arguments  button,  ()  xi. Double-­‐click  the  ctc(Contact)  variable  under  the  VehicleType_MF  MFrag  and  observe  

the  variable  name  ctc has  appeared  in  the  Name:  field  and  in  the  resident  node  in  the  workspace  

xii. Right-­‐click  the  resident  node  and  Resize to fit text  xiii. Create  Ordinary  Variables  for  the  MFrags  according  to  Table  6.      In  each  case,  perform  the  

following  steps:  a.    Select  the  Show MTheory tree  button  from  the  MTheory  tab  b.  Double-­‐click  the  appropriate  MFrag  (e.g.    VehicleType_MF)  c.  Select  the  Insert Ordinary Variable  button  and  click  in  the  workspace  above  

the  resident  node  d.  Highlight  the  variable  name  above  the  workspace,  type  the  appropriate  variable  

name,  and  RETURN  (remember  to  use  lower-­‐case  variable  names)  e.  From  the  dropdown  menu  above  the  workspace,  select  the  appropriate  class  of  

variable  f.  Right-­‐click  the  ordinary  variable  and  Resize to fit text  g.  Click  on  the  appropriate resident  node  and  observe  the  Resident  Node  pane  appear  

to  the  left  of  the  workspace  h.  Select  the  Edit Arguments  button,  ()  i.  Double-­‐click  the  appropriate  variable  under  the  appropriate  MFrag  and  observe  the  

variable  name  has  appeared  in  the  Name:  field  and  in  the  resident  node  in  the  workspace  

j. Right-­‐click  the  resident  node  and  Resize to fit text  

Table  6  –  Ordinary  Variables  

MFrag Variable Name Variable Type Resident Node VehicleType_MF ctc Contact hasVehicleType

rgn Region hasTerrainType Reference_MF ctc Contact hasLocation

rpt Report hasReportedEntity ImagingReport_MF rpt Report hasImagingDetection

rgn Region hasClearWeather ctc Contact

Page 13: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  13  

 xiv. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    xv. In  the  Save  dialogue  highlight  VehicleIDPO_h.ubf  in  the  dialogue,  change  to  

VehicleIDPO_i.ubf,  and  select  Save  xvi. In  the I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  

the  dropdown  menu  and  click  OK    xvii. Observe  the  File  saved  dialogue  and  click  OK  xviii. Close  UnBBayes  to  update  the  owl  files  

 13. Insert  Input  Nodes  and  Arcs  for  the  MFrags  

i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  VehicleIDPO_i.ubf,  and  click  Open  

ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

iii. Select  the  MTheory  tab  and  observe  the  resident  nodes  iv. Double-­‐click  the  ImagingReport_MF  MFrag  and  observe  it  appear  in  the  workspace  v. Select  the  Insert Input Node  button  and  click  in  the  workspace  above  the  

hasImagingDetection  resident  node  to  place  the  input  node  vi. Select  the  Reset  button  to  use  the  selection  tool  vii. Click  on  the  newly  created  input  node  viii. Double  click  on  the  hasVehicleType  node  in  the  Resident  List  ix. Select  ctc  from  the  Contact_label  dropdown  list  x. Right  click  on  the  hasVehicleType(ctc)  input  node  and  Resize  to  fit  text  xi. Select  the  Insert edge button  (Arrow)  and  click/drag  an  edge  from  the  input  node  to  

the  resident  node  xii. Click/drag  an  edge  from  the  hasClearWeather  resident  node  to  the  

hasImagingDetection  resident  node  xiii. Click  in  the  workspace  

The  ImagingDetection_MF  MFrag  should  appear  as  in  Figure  8  

 

Figure  8  –  ImagingDetection_MF  MFrag  with  Input  Node  

Page 14: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  14  

xiv. Double-­‐click  the  VehicleType_MF  MFrag  and  observe  it  appear  in  the  workspace  xv. Select  the  Insert edge button  (Arrow)  and  click/drag  an  edge  from  the  

hasTerrainType(rgn)  node  to  the  hasVehicleType(ctc)  node    xvi. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    xvii. the  Save  dialogue  highlight  VehicleIDPO_i.ubf  in  the  dialogue,  change  to  

VehicleIDPO_j.ubf,  and  select  Save  xviii. In  the I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  

the  dropdown  menu  and  click  OK    xix. Observe  the  File  saved  dialogue  and  click  OK  xx. Close  UnBBayes  to  update  the  owl  files  

 13. Populate  the  Local  Distribution  Tables  (LDT)  

i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  VehicleIDPO_j.ubf,  and  click  Open  

ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

iii. Select  the  Show MTheory tree  button  of  the  MTheory  tab  iv. Double-­‐click  VehicleType_MF  and  observe  it  appear  in  the  workspace  v. Click  the  hasTerrainType(rgn)  resident  node  in  the  workspace  vi. Select  the  Edit table  button  in  the  Resident  node  pane  and  enter  the  following  in  the  

text  workspace:  

 

The  dialogue  should  now  appear  as  shown  in  Figure  9    

 Figure  9  –  Local  Distribution  Table  for  hasTerrainType(rgn)  Resident  node  

 

[        Terr_OnRoad  =  .41,        Terr_OffRoad  =  .31,        Terr_VeryRough  =  .28  ]  

Page 15: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  15  

Note:  the  buttons  at  the  top  of  the  LPD  text  workspace  and  the  states  and  arguments  in  the  States  and  Arguments  pane  can  be  used  to  expedite  creation  of  LPDs.  For  example,  the  distribution  shown  in  Figure  9  can  be  entered  as  follows.  First,  click  on  the  default  button  at  the  top  of  the  window.  Then,  fill  in  numbers  for  the  word  “formula”  in  each  line  of  the  expression  that  appears.    Note  also  that  typing  state  or  variable  names  in  LPD  formulas  is  unnecessary.    Double-­‐clicking  on  a  state  name  in  the  States  window  will  cause  that  state  name  to  be  entered  into  the  LPD  text  window.  Double-­‐clicking  on  an  ordinary  variable  name  in  the  Arguments  window  will  cause  that  ordinary  variable  name  to  be  entered  into  the  LPD  text  window.      

vii. Select  the  Compile  button  and  observe  the  Success  dialogue  viii. Select  the  Save  button  and  observe  the  Success  dialogue  ix. Select  the  Exit  button  x. Repeat  the  process  for  each  of  the  other  LDTs,  using  Figures  10-­‐12  below.    For  each  LDT,  

complete  the  following  steps:  a.  Select  the  Show MTheory tree  button  of  the  MTheory  tab  b.  Double-­‐click  the  appropriate  MFrag  and  in  the  MTheory  Tree  pane  and  the  

appropriate  resident  node  in  the  workspace      c.  Select  the  Edit table  button  in  the  Resident  node  pane  and  duplicate  the  code  

in  the  input  pane  d.  Select  the  Compile  button  and  observe  the  Success  dialogue  e.  Select  the  Save  button  and  observe  the  Success  dialogue  f.  Select  the  Exit  button  

 

Figure  10  –  LDT  for  hasVehicleType(ctc)  Resident  node

 

 Figure  11  –  LDT  hasClearWeather(rgn)  Resident  node  

if  any  rgn  have  (  hasTerrainType  =  Terr_OnRoad  )  [        Obj_Tracked  =  .13,        Obj_Wheeled  =  .22,        Obj_NonVehicle  =  .65  ]  else  if  any  rgn  have  (  hasTerrainType  =  Terr_OffRoad  )  [        Obj_Tracked  =  .10,        Obj_Wheeled  =  .03,        Obj_NonVehicle  =  .87  ]  else  [        Obj_Tracked  =  .07,        Obj_Wheeled  =  0,        Obj_NonVehicle  =  .93  ]  

[        true  =  .75,        false  =  .25  ]  

Page 16: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  16  

   

Page 17: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  17  

 Figure  12  –  LDT  for  hasImagingDet(rpt)  Resident  node  

 xi. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    

if  any  ctc  have  (  hasVehicleType  =  Obj_Tracked    )  [      if  any  rgn  have  (  hasClearWeather  =  true  )  [            Image_Tracked  =  .80,            Image_Wheeled  =  .15,            Image_NoVehicle  =  .05      ]  else  if  any  rgn  have  (  hasClearWeather  =  false  )  [                  Image_Tracked  =  .60,                  Image_Wheeled  =  .30,                  Image_NoVehicle  =  .10      ]  else  [            Image_Tracked  =  .15,            Image_Wheeled  =  .15,            Image_NoVehicle  =  .70      ]  ]  else  if  any  ctc  have  (  hasVehicleType  =  Obj_Wheeled  )  [      if  any  rgn  have  (  hasClearWeather  =  true  )  [            Image_Tracked  =  .10,            Image_Wheeled  =  .80,            Image_NoVehicle  =  .10      ]  else  if  any  rgn  have  (  hasClearWeather  =  false  )  [            Image_Tracked  =  .20,            Image_Wheeled  =  .60,            Image_NoVehicle  =  .20      ]  else  [            Image_Tracked  =  .15,            Image_Wheeled  =  .15,            Image_NoVehicle  =  .70      ]  ]  else  if  any  ctc  have  (  hasVehicleType  =  Obj_NonVehicle    )  [      if  any  rgn  have  (  hasClearWeather  =  true  )  [            Image_Tracked  =  .05,            Image_Wheeled  =  .05,            Image_NoVehicle  =  .90          ]  else  [            Image_Tracked  =  .15,            Image_Wheeled  =  .15,            Image_NoVehicle  =  .70      ]  ]  else  [      Image_Tracked  =  .15,      Image_Wheeled  =  .15,      Image_NoVehicle  =  .70  ]    

Page 18: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  18  

xii. In  the  Save  dialogue  highlight  VehicleIDPO_j.ubf  in  the  dialogue,  change  to  VehicleIDPO_k.ubf,  and  select  Save  

xiii. In  the I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

xiv. Observe  the  File  saved  dialogue  and  click  OK  xv. Close  UnBBayes  to  update  the  owl  files

 14. Add  Context  Nodes  

i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  VehicleIDPO_k.ubf,  and  click  Open  

ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  dropdown  menu  and  click  OK    

iii. Double-­‐click  the  VehicleType_MF MFrag  in  the  MTheory  Tree  of  the  Mtheory  Tab  iv. Click  the  Insert Context Node  button  and  drop  a  context  node  onto  the  workspace  v. Click  the  Reset  button  vi. Click  on  the  new  context  node  and  observe  the  Context  Node  pane  to  the  left  of  the  

workspace  vii. Click  formula  in  the  Context  Node  pane  and  then  the Equal sign (=)  button  viii. Click  op_1  and  then  the  Add ordinary variable  button  ix. Double-­‐click  rgn(Region)  and  observe  the  variable  rgn  in  the  new  context  node  x. Now  click  op_2  and  then  the  Add node  button  xi. Double-­‐click  the  hasLocation  resident  node  xii. Now  double-­‐click  hasLocation  in  the  formula  editor  of  the  Context  Node  pane  xiii. Select  ctc  from  the  dropdown  menu  of  the  Contact_label  pane,  below  xiv. Right  click  on  the  context  node  and  Resize to fit text  xv. Add  context  nodes  to  each  of  the  MFrags  in  Table  9  using  the  following  steps:      

a.    Select  the  Show MTheory tree  button  from  the  MTheory  tab  b.  Double-­‐click  the  appropriate  MFrag  (e.g.    VehicleType_MF)  c.  Select  the  Insert Context Node  button  and  click  in  the  workspace  below  the  

ordinary  variables  d.  Click  on  the  new  context  node,  then  click  formula  and  the  Equal sign (=)  in  

the  Context  Node  pane  e. Click  op_1  and  then  the  Add ordinary variable  button  f. Double-­‐click  the  appropriate  variable  g. Click  op_2 and  then  the  Add node  button  h. Double-­‐click  the  appropriate  resident  node  i. Double-­‐click  the  resident  node  in  the  formula  editor  and  select  the  appropriate  

variable  from  the  dropdown  menu  j. Right  click  the  new  context  node  and  Resize to fit text  

 

Page 19: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  19  

Table  9  –  Context  Nodes  

MFrag Ordinary Variable

Resident Node Resident Node Variable

VehicleType_MF rgn hasLocation ctc ImagingReport_MF rgn hasLocation ctc

ctc hasReportedEntity rpt  

xvi. Observe  the  full  MTheory  by  clicking  on  the  See  MTheory.  The  MFrags  and  nodes  can  be  moved  around  on  the  page  to  improve  the  appearance  of  the  result,  as  shown  in  Figure  13.  

 

Figure  13  –  Vehicle  ID  Probabilistic  Ontology  

xvii. On  the  Toolbar,  click  the  Save net  button  (4th  from  left)    xviii. In  the  Save  dialogue  highlight  VehicleIDPO_k.ubf  in  the  dialogue,  change  to  

VehicleIDPO_l.ubf,  and  select  Save  xix. In  the I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  

the  dropdown  menu  and  click  OK  xx. Observe  the  File  saved  dialogue  and  click  OK  xxi. Close  UnBBayes  to  update  the  owl  files  

 

 

Page 20: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  20  

15.  Test  the  MEBN  Theory  with  a  simple  network  i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  

VehicleIDPO_l.ubf,  and  click  Open  ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK    iii. On  the  MTheory  tab,  select  the  Open MEBN Options  button  (8th  from  left)  iv. On  the  Knowledge Base  tab  of  the  MEBN  Options  dialogue,  check  the  Protégé

reasoners (for PR-OWL 2)  button  and  Confirm  v. Click  the  Load Knowledge Base  button  (2nd  from  left)  and  observe  Loading

knowledge base… in  the  lower  left  corner  of  the  window  vi. When  the  Message  dialogue  appears,  click  OK    vii. Select  the Execute Query button  (1st  on  left),  highlight hasVehicleType and

Select  viii. In  the Query pane,  select Track_1(Contact) from  the Contact  Label dropdown  

menu  and  click Execute  ix. Observe Generating SSBN… in  the  lower  left  corner  of  the  window  and  wait  for  the  

reasoner  to  finish  x. Click  the  Propagate evidences  button  (3rd  from  left)  and  observe  the  created  SSBN  

shown  in  Figure  14  

   

Figure  14  –  Track_1  Simple  Test  Case  

 xi. Note  how  this  SSBN  matches  the  original  Netica  BN  with  similar  evidence  (Figure  15).  

Page 21: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  21  

   

Figure  15  –  Netica  Model  of  Track_1  Simple  Test  Case  

16. Test  the  MEBN  Theory  with  an  Advanced  Case  i. Start  UnBBayes  and  from  the  Toolbar,  select  the  Open net  button,  highlight  

VehicleIDPO_l.ubf,  and  click  Open  ii. In  the  I/O  Extension  conflict  dialogue,  select  UnBBayes File with PR-OWL 2.0  from  the  

dropdown  menu  and  click  OK    iii. On  the  MTheory  tab,  select  the  Open MEBN Options  button  (8th  from  left)  iv. On  the  Knowledge Base  tab  of  the  MEBN  Options  dialogue,  check  the  Protégé

reasoners (for PR-OWL 2)  button  and  Confirm  v. Click  the  Load Knowledge Base  button  (2nd  from  left)  and  observe  Loading

knowledge base… in  the  lower  left  corner  of  the  window  vi. Click  OK  in  the  Message  dialogue  vii. Select  the Execute Query button  (1st  on  left),  highlight hasVehicleType and

Select  viii. In  the Query pane,  select Track_3(Contact) from  the Contact  Label dropdown  

menu  and  click Execute  ix. Observe Generating SSBN… in  the  lower  left  corner  of  the  window  and  wait  for  the  

reasoner  to  finish  x. Click  the  Propagate evidences  button  (3rd  from  left)  and  observe  the  created  SSBN.  

Drag  nodes  to  match  the  SSBN  shown  in  Figure  19  

Page 22: VehicleIDPO Tutorial kbl 120304 v7 - George Mason Universitymason.gmu.edu/~klaskey/GraphicalModels/VehicleIDPO Tutorial_kbl_120304... · Vehicle’IDPO’Tutorial’ ’ 4’ Spring’2012’

Vehicle  ID  PO  Tutorial     Spring  2012  22  

   

Figure  16  –  Track_3  Advanced  Test  Case  

xi. Note  how  this  SSBN  matches  the  original  Netica  BN  with  similar  evidence  (Figure  17).  

   

Figure  17  –  Netica  Model  of  Track_3  Advanced  Test  Case  

   

Congratulations!      You  have  completed  the  Vehicle  Identification  Tutorial!