// ~->[DNET-1]->~ // File created by Norsys using Netica 1.12 on Aug 30, 1998 at 19:01:36. bnet Car_Diagnosis_0 { comment = "\n\ Car Diagnosis 0 Copyright 1998 \ Norsys Software Corp.\n\n\ This is a simplified example belief network to represent the \ working \n\ relationships between parts of a car.\n\n\ It has only the nodes and links; it does not have any \ probabilistic\n\ relations (CPTs) entered. If it had CPTs, it could be used \n\ for diagnosing car problems, among other things.\n\n\ This network was designed by Norsys Software Corp.\n\n\n\ TUTORIAL: Automatic Learning of Probabilities\n\ --------\n\n\ As mentioned above, this belief net does not have any CPTs\n\ (conditional probability tables). You can verify that by \ clicking\n\ on a node to select it, and then choosing \ Relation->View/Edit.\n\ The table will be empty. You can tell that ALL the tables \ are empty\n\ because if you select all the nodes and try to choose \ Report->Relation CPT\n\ you will see that the menu entry is dimmed.\n\n\ Choose File->Open As Text, and open \"Car Cases.cas\". The \ columns don't line\n\ up very well because of the tab stop settings, but you can \ see that it has\n\ a line near the top with headings for the columns, which are \ the node names.\n\ Each subsequent line stands for observations made during a \ diagnosis \n\ situation with a particular car. An asterisk indicates an \ observation that\n\ wasn't made.\n\n\ We can use this set of past observations to learn the \ probabilities for the\n\ car diagnosis belief net. Click in the belief net to make it \ active\n\ (but make sure no nodes are selected), and choose \ Relation->Incorp Case File. \n\ Select \"Car Cases.cas\" from the dialog box, and accept the \ default of 1 for \n\ the degree. The CPTs will be learned very quickly.\n\n\ Click on \"Spark Quality\" and then choose \ Relation->View/Edit to see one of\n\ the tables learned. Then using the popup menu in the upper \ left of that\n\ window, you can view the learned CPTs of other nodes.\n\n\ If you now have further data of more observations, it is easy \ to combine\n\ it with what has already been learned. Choose \ Relation->Incorp Case File, \n\ this time select \"More Car Cases.cas\" from the dialog box, \ and again accept \n\ the default of 1 for the degree. After the learning, it will \ be as if\n\ Netica learned from one large file of cases containing the \ cases from\n\ both files.\n\n\ At this point you may want to compile the network and try \ some inference\n\ to see if the results make sense. For example, try entering \ findings of\n\ bright, dim and off to Headlights (indicating how the \ headlights look when\n\ they are turned on). If the headlights are dim, then it is \ believed that\n\ Voltage at Plug will be weak, but if Battery Voltage is \ measured as strong,\n\ then the plug voltage changes to strong as well, overriding \ the headlight\n\ observation.\n\n\ If you want to remove the effects of learning from \"Car \ Cases.cas\", so that\n\ the network will be as if it had only learned from \"More Car \ Cases.cas\", \n\ then choose Relation->Incorp Case File, select \"Car \ Cases.cas\" \n\ from the dialog box, and this time change the degree to -1 \ (to unlearn). \n\ After the unlearning, it will be as if the network had only \ learned from\n\ \"More Car Cases.cas\".\n\n\ Now we can test the performance of this network using the \ case file\n\ \"Car Cases.cas\". In general, you can use a file of cases \ that were used\n\ during the learning to also test the performance, but that \ can produce\n\ misleading results, and it is better to use a set of test \ cases that were\n\ not used during the learning, as we will do now.\n\n\ Suppose we want all the nodes except Headlights, Battery Age, \ Car Cranks,\n\ and Car Starts to be unobserved. That is fairly difficult \ diagnosis,\n\ since so few things are being observed. Select those nodes, \ and then hold\n\ down the shift key while choosing Edit->Select All, to \ reverse the selection\n\ (since we want the unobserved nodes to be selected). Then \ choose \n\ Network->Test Using Cases, and select \"Car Cases.cas\".\n\n\ A report will be generated for each node being diagnosed \ (i.e. unobserved).\n\ For other networks, depending on what the nodes represent, \ these could be \n\ diagnosis, predictions, classifications, or a combination.\n\n\ Look at the report for Voltage At Plug. The confusion matrix \ shows that\n\ most of the diagnosis were correct (9.78% in error). Each \ number in the\n\ matrix corresponds to how many of the test cases fell into \ that category.\n\ See the Netica onscreen help for further information.\n\n\n\n\ \n\n\n\ "; author = "BoerlageB"; whenchanged = 904528896; visual V1 { defdispform = BELIEFBARS; nodelabeling = TITLE; nodefont = font {shape= "Arial"; size= 10;}; linkfont = font {shape= "Arial"; size= 9;}; windowposn = (88, 8, 762, 627); CommentShowing = TRUE; CommentWindowPosn = (88, 626, 762, 873); resolution = 72; drawingbounds = (800, 720); showpagebreaks = FALSE; usegrid = TRUE; gridspace = (6, 6); PrinterSetting A { margins = (1270, 1270, 1270, 1270); landscape = FALSE; magnify = 1; }; }; node Alter { kind = NATURE; discrete = TRUE; chance = CHANCE; states = (Okay, Faulty); parents = (); title = "Alternator"; whenchanged = 904528887; visual V1 { center = (474, 78); height = 6; }; }; node Charging { kind = NATURE; discrete = TRUE; states = (Okay, Faulty); parents = (Alter); title = "Charging system"; whenchanged = 904528887; visual V1 { center = (474, 138); height = 4; }; }; node BatAge { kind = NATURE; discrete = FALSE; states = (new, old, very_old); levels = (0, 2, 5, INFINITY); parents = (); title = "Battery age"; comment = "New 0-2 yrs, Old 3-5 yrs, Very-old >5 yrs"; whenchanged = 904528887; visual V1 { center = (312, 84); height = 2; }; }; node BatVolt { kind = NATURE; discrete = TRUE; states = (strong, weak, dead); parents = (Charging, BatAge); title = "Battery voltage"; whenchanged = 904528887; visual V1 { center = (474, 204); height = 5; link 2 { path = ((312, 119), (312, 138), (403, 176)); }; }; }; node MFuse { kind = NATURE; discrete = TRUE; states = (okay, blown); parents = (); title = "Main fuse"; whenchanged = 904528887; visual V1 { center = (156, 78); height = 1; }; }; node Dist { kind = NATURE; discrete = TRUE; states = (Okay, Faulty); parents = (); title = "Distributer"; whenchanged = 904528887; visual V1 { center = (102, 204); height = 11; }; }; node PlugVolt { kind = NATURE; discrete = TRUE; states = (strong, weak, none); parents = (MFuse, Dist, BatVolt); title = "Voltage at plug"; whenchanged = 904528887; visual V1 { center = (264, 204); height = 3; }; }; node StMotor { kind = NATURE; discrete = TRUE; states = (Okay, Faulty); parents = (); title = "Starter Motor"; whenchanged = 904528887; visual V1 { center = (138, 456); height = 15; }; }; node Starter { kind = NATURE; discrete = TRUE; states = (Okay, Faulty); parents = (MFuse, StMotor, BatVolt); title = "Starter system"; whenchanged = 904528887; visual V1 { center = (324, 456); height = 7; link 1 { path = ((109, 106), (18, 156), (18, 414), (180, 414), (253, 436)); }; link 3 { path = ((474, 239), (474, 336), (357, 429)); }; }; }; node Lights { kind = NATURE; discrete = TRUE; states = (bright, dim, off); parents = (BatVolt); title = "Headlights"; whenchanged = 904528887; visual V1 { center = (570, 288); height = 14; }; }; node Plugs { kind = NATURE; discrete = TRUE; states = (okay, too_wide, fouled); parents = (); title = "Spark plugs"; whenchanged = 904528887; visual V1 { center = (366, 282); height = 9; }; }; node SpkQual { kind = NATURE; discrete = TRUE; states = (good, bad, very_bad); parents = (Plugs, PlugVolt); title = "Spark quality"; whenchanged = 904528887; visual V1 { center = (294, 360); height = 10; link 2 { path = ((264, 239), (264, 288), (280, 325)); }; }; }; node Cranks { kind = NATURE; discrete = TRUE; states = (True, False); parents = (Starter); title = "Car cranks"; whenchanged = 904528887; visual V1 { center = (414, 528); height = 8; link 1 { path = ((357, 484), (380, 501)); }; }; }; node Timing { kind = NATURE; discrete = TRUE; states = (good, bad, very_bad); parents = (Dist); title = "Spark timing"; whenchanged = 904528887; visual V1 { center = (102, 372); height = 12; }; }; node Starts { kind = NATURE; discrete = TRUE; states = (True, False); parents = (Cranks, Timing, SpkQual); title = "Car starts"; whenchanged = 904528887; visual V1 { center = (576, 528); height = 13; link 2 { path = ((180, 390), (252, 408), (462, 408), (551, 501)); }; link 3 { path = ((372, 368), (522, 384), (566, 501)); }; }; }; node TITLE1 { kind = ASSUME; discrete = FALSE; chance = DETERMIN; parents = (); title = "Car Diagnosis 0"; whenchanged = 904506242; visual V1 { center = (300, 24); font = font {shape= "Times New Roman"; size= 18;}; height = 16; }; }; ElimOrder = (Alter, Lights, Charging, BatAge, StMotor, Starter, Plugs, Starts, Timing, SpkQual, BatVolt, MFuse, Dist, PlugVolt, Cranks); };