-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddm.html
685 lines (685 loc) · 30 KB
/
ddm.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>dlvhex</title>
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css"></link>
<link rel="stylesheet" type="text/css" media="all" href="css/text.css"></link>
<link rel="stylesheet" type="text/css" media="all" href="css/960.css"></link>
<link rel="stylesheet" type="text/css" media="all" href="css/style.css"></link>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<!-- Title -->
<div class="container_12">
<div class="grid_12" id="title">
<h1>dlvhex
<span style="color:red; font-size:large;">Version 2.2.0 is out!</span>
<span style="color:red; font-size:large;">We moved to <a href="https://github.com/hexhex/">github.com/hexhex</a>!</span>
</h1>
</div>
</div>
<!-- Menu -->
<div class="container_12">
<div class="grid_12" id="menu">
<a href="index.html">About</a>
<a href="people.html">People</a>
<a href="download.html">Download</a>
<a href="support.html">Support</a>
<a href="documentation.html">Documentation</a>
<a href="http://asptut.gibbi.com/">Demo & ASP Tutorial</a>
<a href="related.html">Related Work</a>
<a href="applications.html">Applications</a>
<a href="literature.html">Literature</a>
</div>
</div>
<!-- Information -->
<div class="container_12">
<div class="grid_9">
<h2>The Decision Diagram Merging System</h2>
<p>
The DDM System (decisiondiagramsplugin) adds support for working with decision diagrams to dlvhex. In consists of two major components:
<ul>
<li>A <a href="#converter">tool for conversion</a> between different file formats</li>
<li><a href="#operators">Operators</a> for decision diagram modification and merging.
</ul>
The <a href="#controlscript">constrol script</a> may simplify merging considerably.
</p>
<p>
For a quick introduction, take a look at our <a href="#examples">examples</a>.
</p>
<hr>
<h3 id="converter">File Format Conversions</h3>
<p>
Decision diagrams can be stored in different file formats. While some of
them are human-readable, others are better for automatic processing.
</p>
<p>
Our system is implemented on top of the logic programming system <a href="./../dlvhex">dlvhex</a>.
In order to process diagrams it is necessary to encode them as set of facts.
But this is inconvenient for humans. Hence, the usual workflow is to store
diagrams as DOT graphs and convert them to sets of facts only before merging.
The output is then a diagram again encoded as a set of facts, which is back-converted
into a DOT graph as a postprocessing step.
</p>
<p>
The supported file formats of our converter are described in the following subsections.
To see how the converter is called from command line, read the section on <a href="#conversion">Conversion</a>.
</p>
<h4>DOT</h4>
<p>
The <a href="http://www.graphviz.org">DOT file format</a> is intuitively readable and thus fit for being used as
human readable format for representing decision diagrams. Additionally it
is well suited for being visualized using the dot tools.
</p>
<p>
Consider the following decision diagram.
<img src="ddexample.png" alt="">
</p>
<p>
Then the following snippet shows a its implementation as DOT file.<br>
<code>
digraph G {<br>
root -> case1 ["A<10"];<br>
root -> case2 ["A>20"];<br>
root -> elsecase["else"];<br>
root -> case3["else"];<br>
case1 -> case1a["B<10"];<br>
case1 -> case1b["else"];<br>
case2 -> case2a["B<16"];<br>
case2 -> case2b["else"];<br>
case1a["Clas sA"];<br>
case1b["ClassB"];<br>
case2a["ClassA"];<br>
case2b["ClassB"];<br>
case3["ClassC"];<br>
}
</code>
</p>
<p>
Valid decision diagrams must
<ul>
<li>have exactly one root node (which does not need to be explicitly mentioned, but which is implicitly identified by the fact that it has no
ingoing edges)</li>
<li>use only directed edges</li>
<li>use only edges that are labeled either with <code>else</code> or with conditions of form <code>X # Y</code> where X and Y can be arbitrary strings and
# is an operator from {<, <=, =,>,>=}</li>
<li>have leaf nodes that are labeled with arbitrary strings that encode the
classification in this node</li>
</ul>
</p>
<h4>Sets of Facts</h4>
<p>
dlvhex cannot directly load this format because its input must be
a logic program. Thus a diagram must be represented using atom formulas.
We define the following predicates:
<ul>
<li><code>root(X)</code><br>
To define that some constant X is defined as the root node</li>
<li><code>innernode(X)</code><br>
To define some constant X to be an inner node</li>
<li><code>leafnode(X,Y)</code><br>
To define that some constant X is a leaf node with label Y</li>
<li><code>conditionaledge(X,Y,A,C,B)</code><br>
To define that a conditional edge with condition A # B (where the
operation # is given by C) leads from node X to Y</li>
<li><code>root(X)</code><br>
To define that an unconditional edge goes from X to Y</li>
</ul>
</p>
<p>
The above diagram can therefore be implemented as follows.<br>
<code>
root(root).<br>
innernode(case1).<br>
innernode(case2).<br>
leafnode(case3,"ClassC").<br>
leafnode(case1a,"ClassA").<br>
leafnode(case1b,"ClassB").<br>
leafnode(case2a,"ClassA").<br>
leafnode(case2b,"ClassB").<br>
conditionaledge(root,case1,"A","<","10").<br>
conditionaledge(root,case2,"A",">","20").<br>
elseedge(root,case3).<br>
conditionaledge(case1,case1a,"B","<","10").<br>
elseedge(case1,case1b).<br>
conditionaledge(case2,case2a,"B","<","16").<br>
elseedge(case2,case2b).
</code>
</p>
<h4>Answer-Sets</h4>
<p>
A very simple and obvious translation from HEX programs into answer-sets
is to to put all the facts simply as atoms in an answer-set. The above
diagram can therefore also be implemented as:<br>
<code>
{root(root),<br>
innernode(case1),<br>
innernode(case2),<br>
leafnode(case3,"ClassC"),<br>
leafnode(case1a,"ClassA"),<br>
leafnode(case1b,"ClassB"),<br>
leafnode(case2a,"ClassA"),<br>
leafnode(case2b,"ClassB"),<br>
conditionaledge(root,case1,"A","<","10"),<br>
conditionaledge(root,case2,"A",">","20"),<br>
elseedge(root,case3),<br>
conditionaledge(case1,case1a,"B","<","10"),<br>
elseedge(case1,case1b),<br>
conditionaledge(case2,case2a,"B","<","16"),<br>
elseedge(case2,case2b)}
</code>
</p>
<h4>RapidMiner XML Format</h4>
<p>
<a href="http://www.rapidminer.com">RapidMiner</a> is an open-source data mining tool. It uses a priprietary XML
file format to store decision trees. This format is also supported by our converter.
The details are not relevant for practical work and
are skipped therefore. It is only important to know that the import and
export functionality for this file format is necessary to process RapidMiner
classifiers by the decisiondiagramplugin.
</p>
<h3 id="conversion">Conversion</h3>
<p>
For the conversion between the introduced file formats, the plugin installs
a tool called <code>graphconverter</code>. It can be used to translate diagrams in any of
the supported file formats into semantically equivalent versions in another
format. Assume that the diagram is stored in file <code>"mydiagram.dot"</code>. Then
the conversion into the according HEX program is done by entering:
</p>
<p align="center">
<code>graphconverter dot hex < mydiagram.dot > mydiagram.hex</code>
</p>
<p>
The result is a set of facts that can be loaded by dlvhex. After dlvhex has
done its job, the output will be an answer-set, which is ill-suited for begin
read by humans. Thus the plugin also supports conversions in the other
direction. Assume that dlvhex' output is stored in file <code>"answerset.as"</code> (using
the silent mode such that the output contains the pure answer-set without
any additional information about dlvhex). Then the conversion is done by:
</p>
<p align="center">
<code>graphconverter as dot < mydiagram.as > mydiagram.hex</code>
</p>
<p>
Between the two converter calls, the diagram is given as HEX program
<code>"mydiagram.hex"</code> that can be processed by dlvhex. Even though in principle
one can do arbitrary computations upon this representation, it is
intended to be used as part of the input for a merging task.
</p>
<p>
Note that graphconverter reads from standard input and writes to standard output.
It expects either one or two parameters. If one parameter is
passed, it can be anything of:
</p>
<ul>
<li><code>--toas</code><br>
Converts a DOT file into an answer-set</li>
<li><code>--todot</code><br>
Converts an answer-set into a DOT file</li>
<li><code>--help</code><br>
Displays an online help message</li>
</ul>
<p>
Note that <code>--toas</code> and <code>--todot</code> are only abbreviations for
frequent conversions. The more general program call (as used above) passes two parameters,
where the first one states the source format and the second one the desired
destination format. Both parameters can be anything from the following list.
</p>
<table summary="">
<tr>
<td><b>Format</b></td> <td><b>Parameter name</b></td>
</tr>
<tr>
<td>DOT graph</td> <td><code>dot</code></td>
</tr>
<tr>
<td>HEX program</td> <td><code>hexprogram</code> or <code>hex</code></td>
</tr>
<tr>
<td>answer-set</td> <td><code>answerset</code> or <code>as</code></td>
</tr>
<tr>
<td>RapidMiner XML</td> <td><code>rmxml</code> or <code>xml</code></td>
</tr>
</table>
<hr>
<h2 id="operators">Applying Operators</h2>
<p>
This section presupposes familarity with the mergingplugin <a href="meld.html"><code>MELD</code></a>, especially the
usage of merging plans and operators. For a detailled description see the
according documentation.
</p>
<p>
The DDM System ships with several special merging and modification operators
for decision diagrams. They expect the belief bases to be
sets of facts which were generated out of decision diagrams using the <a href="#converter"><code>graphconverter</code></a>.
The output will again be a set of facts that encodes a
diagram, which can be back-converted into a DOT file. Intermediate results
are sets of answer-sets.
</p>
<p>
The following snippet shows a typical merging task definition that uses the operators
unfold and tobinarydecisiontree. Note that the decision diagram encoded
as logic program was directly pasted into the mapping rules. This was
only done in order to give the program as one self-contained example. In
practice, the mapping rules would rather access an external source by the
use of external atoms.<br><br>
<code>
[commonsignature]<br>
predicate:root/1;<br>
predicate:innernode/1;<br>
predicate:leafnode/2;<br>
predicate:conditionaledge/5;<br>
predicate:elseedge/2;<br>
[beliefbase]<br>
name:kb1;<br>
mapping:"<br>
root(root).<br>
innernode(root).<br>
innernode(v1).<br>
innernode(v2).<br>
innernode(v3).<br>
leafnode(leaf1,class1).<br>
leafnode(leaf2,class2).<br>
leafnode(leaf3,class3).<br>
conditionaledge(root,v1,x,\'<\',y).<br>
conditionaledge(root,v2,z,\'<\',y).<br>
elseedge(root,v3).<br>
conditionaledge(v1,leaf1,a,\'<\',y).<br>
conditionaledge(v1,leaf2,b,\'<\',y).<br>
elseedge(v1,leaf3).<br>
conditionaledge(v2,leaf1,aa,\'<\',y).<br>
conditionaledge(v2,leaf2,bb,\'<\',y).<br>
elseedge(v2,leaf3).<br>
conditionaledge(v3,leaf1,aaa,\'<\',y).<br>
conditionaledge(v3,leaf2,bbb,\'<\',y).<br>
elseedge(v3,leaf3).<br>
";<br>
<br>
[mergingplan]<br>
{<br>
operator:tobinarydecisiontree;<br>
{<br>
operator:unfold;<br>
{kb1}<br>
}<br>
}
</code>
</p>
<p>
The following subsections describe the operators that are included in
the plugin. Note that this is just a very quick and informal description
that should enable the user to explore the capabilities or adapt operators
according to individual needs. For a more detailled and formal description
we refer to the <a href="#conclusion">references</a>.
</p>
<h3>Modification Operators</h3>
Operators with arity 1 are called <em>modification operators</em>. They
do not integrate multiple diagrams but manipulate a single one. This
is often useful to simplify the structure of the diagram before it is
actually merged with others.
<h4>unfold</h4>
<p>
The input is a collection of belief sets, where each of them
encodes general decision diagrams. The output will
contain the same number of diagrams, where each of them has (independently)
been converted into a tree. This is done by duplication of shared subtrees.
</p>
<h4>tobinarydecisiondiagram</h4>
<p>
The operator expects
the input to encode a diagram that is a tree, i.e. it contains no sharing of
subnodes.
Then the output is again a tree where each node has at most two
successors (binary tree). This is done by introduction of intermediate nodes.
</p>
<h4>orderbinarydecisiontree</h4>
<p>
The operator is again unary. It expects its input to be a binary decision
tree. Its output will a semantically equivalent binary decision tree, where
on each path from the root to a leaf node, the variables are only queried in
lexical ordering.
</p>
<h4>simplify</h4>
<p>
The input is a collection of belief sets containing an arbitrary number
of decision diagrams. Each of them is then (independently)
simplified by some algorithms that will leave the semantics of
the diagram unchanged. That is, only the structure of the diagram will be
modified, which makes them more readable.
</p>
<p>
The simplification algorithm will reuse common subtrees (an can thus be seen as
the converse of unfolding) and eliminate redundant case distinctions.
</p>
<h3>Merging Operators</h3>
Now we describe the actual merging operators with an arity n> 1.
<h4>userpreferences</h4>
<p>
This operator is n-ary, i.e. arbitrary many diagrams can be passed. Additionally
it expects arbitrary many key-value pairs as parameters, where the
keys are ignored and the values are of form:
</p>
<p align="center">
X>>Y or X>n>Y
</p>
<p>
where X and Y are the names of class labels (as used in leaf nodes) and n
is a positive integer. A rule of form X>> Y expresses that "in doubt, X is
preferred to Y", whereas X>n> Y states "X is preferred to Y if there are
at least n more input diagrams that vote for X than for Y".
</p>
<p>
The output is a diagram where each domain element is classified according
to this rules. Note that the rules are evaluated in top-down manner.
That is, the result of of a prior rule can be overwritten by a later (applicable!) rule.
</p>
<h4>majorityvoting</h4>
<p>
The input can be any number of (general) decision diagrams. The output
is a diagram where each domain element is automatically classified by each
of the inputs. Then the final class label is determined by majority decision.
In case that this does not lead to a unique result, the input diagram with
the least index forces its decision.
</p>
<h4>avg</h4>
<p>
The operator expects exactly two ordered binary trees as input parameter.
The result will again be an ordered binary tree of the following form.
</p>
<p>
For each node from the root to the leafs, if one of the input trees contains
condition X # c1 and the other one X # c2, the resulting tree will contain
X # ((c1 + c2) / 2), i.e. the mean of the comparison value is computed. In case that
one of the inputs contains X # c1 and the other one Y # c2, the result will
contain X # c1 at this position (since X is lexically smaller than Y), and the
second diagram is incorporated recursivly in both subtrees.
</p>
<p>
In case of contradicting leaf nodes or incompatible comparison operators
(e.g. X < c1 and X> c2), the result is "unknown".
</p>
<hr>
<h2 id="controlscript">Control Script</h2>
<p>
The merging process may be considerably simplified by the use of our control script.
It will automatically call <code>graphconverter</code> and MELD in the right order.
</p>
<p>
This allows you to specify arbitrary input formats (DOT, HEX, Answer Set, RapidMiner XML)
in your merging tasks, using the <code>source</code>-Attribute of belief bases.
</p>
<p>
A call of
<p align="center">
<code>./merge.sh mergingplan.mp</code>
</p>
will automatically do the conversion of the input and output diagrams, as well
as the call of MELD. The script will print the name of the file with the final result.
</p>
<p>
Download of the Control Script:
<a href="./decisiondiagramsplugin/ddmcontrolscript.tar.gz">ddmcontrolscript.tar.gz</a>
</p>
<p>
For an example, see <a href="#example3">Example 3</a>
</p>
<hr>
<h2 id="examples">Examples</h2>
<p>
The following examples may be copied into a textfile <code>diag.mp</code> and executed by the <a href="meld.html"><code>MELD</code> System</a> by entring.
</p>
<p align="center">
<code>dlvhex --merging --filter=root,innernode,leafnode,elseedge,conditionaledge diag.mp</code>
</p>
<h4 id="example1">Example 1</h4>
<p>
This merging plan translates an arbitrary decision diagram into an ordered binary tree.<br><br>
<code>
[common signature]<br>
predicate: root/1;<br>
predicate: innernode/1;<br>
predicate: leafnode/2;<br>
predicate: conditionaledge/5;<br>
predicate: elseedge/2;<br>
<br>
[belief base]<br>
name: kb1;<br>
mapping: "<br>
root(c).<br>
innernode(c).<br>
innernode(b).<br>
innernode(a).<br>
leafnode(leaf1, class1).<br>
leafnode(leaf2, class2).<br>
conditionaledge(c, a, c, \'<\', x).<br>
elseedge(c, b).<br>
conditionaledge(b, leaf2, b, \'<\', x).<br>
elseedge(b, leaf1).<br>
conditionaledge(a, leaf1, a, \'<\', x).<br>
elseedge(a, leaf2).<br>
";<br>
<br>
[merging plan]<br>
{<br>
operator: orderbinarydecisiontree;<br>
{<br>
operator: tobinarydecisiontree;<br>
{<br>
operator: unfold;<br>
{<br>
kb1<br>
};<br>
};<br>
};<br>
}
</code>
</p>
<h4 id="example2">Example 2</h4>
<p>
Here we see a merging plan for integrating two decision diagrams using userpreference operation.<br><br>
<code>
[common signature]<br>
predicate: root/1;<br>
predicate: innernode/1;<br>
predicate: leafnode/2;<br>
predicate: conditionaledge/5;<br>
predicate: elseedge/2;<br>
<br>
[belief base]<br>
name: kb1;<br>
mapping: "<br>
root(rootA).<br>
innernode(rootA).<br>
leafnode(leaf1A, class1).<br>
leafnode(leaf2A, class2).<br>
conditionaledge(rootA, leaf1A, a, \'<\', x).<br>
elseedge(rootA, leaf2A).<br>
";<br>
<br>
[belief base]<br>
name: kb2;<br>
mapping: "<br>
root(rootB).<br>
innernode(rootB).<br>
leafnode(leaf1B, class1).
leafnode(leaf2B, class2).<br>
conditionaledge(rootB, leaf1B, b, \'<\', x).<br>
elseedge(rootB, leaf2B).<br>
";<br>
<br>
[merging plan]<br>
{<br>
operator: userpreferences;<br>
preferencerule: "class1>> class2";<br>
{<br>
kb1<br>
};<br>
{<br>
kb2<br>
};<br>
}
</code>
</p>
<h4 id="example3">Example 3</h4>
<p>
The following merging plan is a generalization of <a href="#example1">Example 1</a>.
Instead of hard-coding the diagrams in the merging plan, it accesses the file <code>diagram.dot</code> (which can be an arbitrary diagram in DOT format). Call this merging plan with our <a href="#controlscript">Control Script</a> to perform all required conversions automatically.<br><br>
<code>
[common signature]<br>
predicate: root/1;<br>
predicate: innernode/1;<br>
predicate: leafnode/2;<br>
predicate: conditionaledge/5;<br>
predicate: elseedge/2;<br>
<br>
[belief base]<br>
name: kb1;<br>
source: "diagram.dot";<br>
<br>
[merging plan]<br>
{<br>
operator: orderbinarydecisiontree;<br>
{<br>
operator: tobinarydecisiontree;<br>
{<br>
operator: unfold;<br>
{<br>
kb1<br>
};<br>
};<br>
};<br>
}
</code>
</p>
<h4 id="exampledna">Example: DNA Classification</h4>
<p>
DNA is the carrier of genetic information in all known living beings.
Protein databases, such as <a href="http://expasy.org/sprot">SWISSPROT</a>,
store known DNA sequences and the proteins encoded by them.
Nowadays, DNA strings are mostly created by automatic sequencing procedures.
</p>
<p>
However, since only a minor part of the overall DNA of an organism is actually coding proteins,
it becomes necessary to filter the result of a sequencing procedure.
Each sequence needs to be classified as <em>coding</em> or <em>noncoding</em>.
This can be done by the use of statistical features, i.e., numeric values computed over
sequences, which are known to vary significantly between the two classes.
Such features can then be used to train decision diagrams using machine-learning tools
</p>
<p>
An advanced method is to train <em>multiple</em> decision diagrams and merge them subsequently
into a single one. Some people (e.g., Steven Salzberg) have observed, that this
has advantages compared to training of monolithic classifiers, such as increased accuracy,
parallel computing, decrease of the size of the necessary training set.
</p>
<p>
We have repeated this experiment to show the capabilities of our system.
For this purpose, we have implemented Steven Salzberg's merging procedure
as merging operator for DDM.
This archive linked below contains all the files needed for the DNA classification example.
</p>
<p>
To run the experiment, perform the following steps:
<ol>
<li>The three input models (model1.xml, model2.xml, model3.xml) are given in
RapidMiner's file format. They were trained over a set of sequences
drawn randomly from file "dna_trainingdata.xls" resp. "dna_trainingdata.ods".
For each of the input trees, we have drawn 10 sequences.<br><br></li>
<li>Using graphconverter, we have converted each of the input trees in RapidMiner's
format into sets of facts:<br>
<code>graphconverter rmxml hex < model1.xml> model1.hex</code><br>
<code>graphconverter rmxml hex < model2.xml> model2.hex</code><br>
<code>graphconverter rmxml hex < model3.xml> model3.hex</code><br>
<br>
Note: The files modeli.png show renderings of the trees. This is only for
convenience of the reader and not required to create the merged tree.
<br><br></li>
<li>The trees are then merged into model_merged.as by executing the merging plan
salzbergoperator.mp, which will apply the merging algorithm developed by
Steven Salzbarg.<br>
<br>
This produces a merged classifier, encoded as belief set, which is stored in file
model_merged.as.<br><br></li>
<li>The output tree model_merged.as is then converted into RapidMiner's format by
executing:<br>
<br>
<code>graphconverter as rmxml < model_merged.as> model_merged.xml</code>
<br><br></li>
<li>Finally, this model can be loaded into RapidMiner and used for classification.<br>
<br>
We have used a set consisting of 2000 sequences (1000 coding, 100 noncoding),
which is shown in file "<code>dna_testdata.xls</code>" resp. "<code>dna_testdata.ods</code>".
<br>
The DNA datasets stem from <a href="http://www.fruitfly.org/sequence/human-datasets.html">http://www.fruitfly.org/sequence/human-datasets.html</a>.
They were extracted by Fickett and Tung from the Human Genome Project in 1992.<br></li>
</ol>
Alternatively, you may execute <code>run.sh</code>, which will automatically
merge all input decision diagrams named <code>modelXYZ.xml</code> in the current directory
(where <code>XYZ</code>
are arbitrary strings)
into output decision diagram named <code>merged_model.xml</code>.
</p>
<p>
Required files:
<a href="./decisiondiagramsplugin/dnaclassification.tar.gz">dnaclassification.tar.gz</a>
</p>
<p>
Note: The file contains input decision diagrams <code>model1.xml</code>,
<code>model2.xml</code>, <code>model3.xml</code>.
You may replace them by your own diagrams, e.g., trained by RapidMiner,
and experiment with the resulting diagram <code>merged_model.xml</code>.
</p>
<hr>
<h2 id="conclusion">Conclusion</h2>
For a more detailed and formal description of the operators, see <a href="http://www.ub.tuwien.ac.at/dipl/2010/AC07808795.pdf">Merging of Biomedical Decision Diagrams</a>. For an
introduction to the belief merging framework see <a href="http://www.ub.tuwien.ac.at/dipl/2010/AC07808210.pdf">Development of a Belief Merging Framework for dlvhex</a>.
</div>
<div class="grid_3">
<p> </p>
<p>
<img width="100%" height="100%" src="images/logo_whitebg.png" alt="logo" id="logo">
</p>
<p>
<div style="font-size: 14pt"><label for="q">Search this website</label></div>
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input name="cx" id="cx" value="010363983165505105153:4bhl-l5ixd4" type="hidden" alt="Search this website">
<input name="ie" id="ie" value="UTF-8" type="hidden" alt="Search this website">
<input style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" name="q" id="q" size="19" type="text">
<input name="sa" id="sa" value="Search" type="submit">
</div>
</form>
</p>
<p>
<a href="https://github.com/hexhex/">dlvhex source code @ github.com</a><br>
<!-- a href="https://sourceforge.net/projects/dlvhex/">dlvhex: Sourceforge project</a><br/ -->
<!-- <a href="http://www.polleres.net/dlvhex-sparql">SPARQL Plugin</a><br> -->
<a href="actionplugin.html">Action Plugin</a><br>
<a href="mergingplugin.html">MELD: Belief Merging Plugin</a><br>
<a href="ddm.html">DecisionDiagrams Plugin</a><br>
<a href="../mcsie">MCSIE Plugin</a><br>
<a href="stringplugin.html">String Plugin</a><br>
<a href="https://sourceforge.net/projects/dlvhex-semweb/">dlvhex-semweb Project</a><br>
<a href="doap.rdf">Description-Of-A-Project</a>
</p>
<p>
<span style="font-size: 14pt">Documentation:</span><br>
<a href="https://github.com/hexhex/core/blob/master/README">README</a><br>
<a href="doc2x">doxygen</a><br>
<a href="doc2x/group__pluginframework.html">Writing Plugins</a>
<!--
<a href="doc1x">doxygen version 1.X</a><br>
<a href="doc1x/group__pluginframework.html">Writing Plugins 1.X</a><br>
-->
</p>
</div> <!-- grid_3 -->
</div> <!-- container_12 -->
</body>
</html>
<!--
Local Variables:
mode: xml
End:
-->