WelcometoNetica'sHelpSystemThissystemisdesignedtoofferthemostup-to-datedocumentationon=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_Application.htm');returnfalse;">NeticaApplication,theworld'smostwidelyused=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesiannetworkdevelopmentsoftware,fromNorsysSoftwareCorp.
Herearesometipsforeffectivelyfindingtheinformationyouneed:
NavigationButtons:UsethesmallwhitepreviousandnextarrowsinthesidepaneltosequentiallypagethroughtheHelpsystem.UsetheBackbuttoninyourwebbrowsertoreturntothelastpageyouwerevisitingifalinktakesyououtofsequence.
Styles:Werecommendbecomingfamiliarwiththesehyper-linkstyles,astheyareusedthroughoutthedocumentation:
=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_popup.htm');returnfalse;">popuplink=openspopuptextonyourscreen
Encyclopedialink=takesyoutoanEncyclopediapage
generallink=takesyoutoanotherpagewithinthehelpsystem
weblink=opensawebbrowserpageorenablese-mail
Glossarylink=takesyoutotheindicatedGlossaryentry
Set-up:First,opentheTableofContents(withthe"Show"orthe"Contents"button).Thenwerecommendre-sizingthewindowtoyourviewingpreference.
SequentialReading:Thishelpsystemislaidoutinlogicalchapters,
ascendingsomewhatbylevelofexpertise.Youcanreadthroughtheentiresystembyusingthesmallwhitepreviousandnextarrowsinthesidepanel(thechapterstypicallybuilduponeachother).Alternatively,youcanopentheTableofContentsandgostraighttoyourdesiredtopic.
TheIndex:WheneveryouhaveaproblemwithNetica,orneedsomeinformationonhowitisworking,yourfirststepshouldbetochecktheIndex(clicktheIndextabinthesidepanel).Wehavetakengreatcaretocreateaverycomprehensiveandusefulindex.Ifthereareentriesthatyoufeelshouldbeadded,please=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">informus.
OtherResources:ExplorehowotherpeopleareusingNeticabyvisitingouronlinelibrary.Youcandownloadnetsandmightgetsomeideasforhowbesttostructureyourcurrentnet.Wealsoencourageyoutoexploreouronlinetutorialforcomprehensiveinformationatthebeginner,intermediateandadvancedlevels.
ContactUs:Ifthereisanythingyoucan'tfigureoutbyusingthisHelpsystem,feelfreetocontactusviaemailorothermeansofcompanycommunications.
Now,itistimetoGetStarted!
GettingStartedWelcometoNeticaApplicationfrom=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsys.Neticaisaversatile,fast,user-friendlyprogramthatyoucanusetofindpatternsindata,creatediagramsencodingknowledgeorrepresentingdecisionproblems,usethesetoanswerqueriesandfindoptimaldecisions,andcreateprobabilisticexpertsystems.Itissuitableforapplicationsintheareasofdiagnosis,prediction,decisionanalysis,probabilisticmodeling,riskmanagement,expertsystembuilding,sensorfusion,reliabilityanalysis,andcertainkindsofstatisticalanalysisanddatamining.
NeticaAPI:ThisguideisforNeticaApplication;itisnotfortheNeticaProgrammer’sLibrary,alsoknownas"NeticaAPI"(ApplicationProgramInterface).TheAPIisamodulewithmuchofthesamefunctionalityasNeticaApplication,butdesignedforprogrammerstoembedintheirprograms.ForhelpwiththeAPI,usetheCAPIWebdocsorotheronlineAPImanuals.
WebSite:YoucanvisittheNorsyswebsiteforthelatestversionofNetica,versionsofNeticaforotherplatforms,NeticaAPI,examplenets,tutorialsandmoreinformation.
Version:YoucandeterminetheversionofthisguidebyclickingontheNeticaiconintheupperrighthandofthescreen.Ideally,itshouldatleastapproximatelymatchtheversionofNetica,whichyoucanfindbychoosingHelp→AboutNeticafromwithinNetica.(featuresofnewversion)
Prerequisites:ThisguideassumesthatyouarefamiliarwithusingtheMicrosoftWindowsoperatingsystem.ItalsoassumesfamiliaritywithBayesianbeliefnetworks(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnets)orinfluencediagrams,althoughitisverysuitableforsomeonewhoisintheprocessoflearningaboutthem.TolearnmoreabouttheconceptsandapplicationsofBBNs,exploreourintroductoryreferences,thetutorialnetsinourBayesnetlibrary,andthetutorialexamplesthatcamewithyour
Neticadownload.
NextSteps:Firstyoumaywanttoreadthelegalities,andadescriptionofNeticaApplicationandNeticaAPI.TheninstallNeticaandtaketheQuickTourforanintroduction.Forbackgroundreading,youmaywanttoseeintroductoryreferences.Thenyouarereadyforthein-depthtopicsofNetica.
Feedback:Please=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">emailNorsyswithyourquestionsandcommentsaboutNeticaorthisonscreenhelpdocument.Tolearnmoreaboutourdesignphilosophy,clickhere.
NeticaApplicationNeticaApplicationisacomprehensivetoolforworkingwithBayesian=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">beliefnetsand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets(influencediagrams).Itcanbuild,learn,modify,transformandstorenets,aswellasanswerqueriesorfindoptimalsolutionsusingitspowerfulinferenceengine.Thisversionhasmanynewfeaturesandmanymorearecurrentlyunderdevelopment.
NeticacanalsoworkonaMac.MoreInfo
Clickherefornewfeatures.
Features:•CompilesBayesnetsintojunctiontreesofcliquesforfastprobabilisticreasoning.
•Canlearnprobabilisticrelationsfromdata(includingEMandgradientdescentlearning).
•Generatespresentationqualitygraphicswhichcanbetransferredtootherdocuments,includingSVGgraphics.
•Allowstheentryofprobabilisticrelationsbyequation,withanextensivebuilt-inlibraryofprobabilisticfunctionsandothermathematicalfunctions.Theequationscanbedeterministicorprobabilistic,andfordiscreteorcontinuousvariables.
•ProvideseasygraphicaleditingofBayesnetsandinfluencediagrams,including:•Cuttingandpastingofnodesandnetswithoutlosingtheirprobabilisticrelations.
•Manywaysofdisplayingnodes(bargraphs,meters,etc.)•Linkswithbendstokeepcomplexdiagramsorderly.•Allowsenteringcommentstodocumenteachnode,keepstrackofauthor,
whenchanged,etc.•Unlimitedlevelsofundo/redo.•Cancreateandworkwithsetsofnodesincludingcolor-codingnodes.•Commentwindowsfornodes,linksandstates.•Dynamicscrollingandmousewheelsupportedeverywhere.
•Canfindoptimaldecisionsforsequentialdecisionproblems(i.e.laterdecisionsaredependentontheresultsofearlierones).
•CantesttheperformanceofaBayesnetusingafileofcases.Neticawillprintoutaconfusionmatrix,errorrate,logarithmicandquadratic(Brier)scoringruleresults,calibrationtableandsurpriseindexesforeachnodedesired.
•Candoutility-freesensitivityanalysis.•Canreverseindividuallinksand“sumout”nodesofinfluencediagramsorbeliefnets,formodelexplorationandrefinement.
•Supportsdisconnectedlinks,whichmakespossiblelibrariesofprobabilisticrelationships.
•Hasfacilitiestoenterandupdateindividualcases,storethemintheirownfiles,andapplythemtootherBayesnets.
•Hasfacilitiesfortheeasydiscretizationofcontinuousvariables.•Hasnobuilt-inlimitsonthesizeorcomplexityofnets,sotheyarelimitedonlybyavailablememory.
•Canworkhand-in-handwiththe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPIProgrammer’sLibrary.
•CandirectlyconnectwithadatabaseorExcelspreadsheetforlearning,readingcases,testinganet,etc.
•Hasbinary.netaformatforfasterandsmallerfiles(text-based.dnefilesstillhavecompletesupport).
•Canobfuscatenets,andcanworkwithencryptedBayesnets,toprotectyourintellectualproperty.
•Canautomaticallyreadinacase,compiletheBayesnetwhenitisreadfromdisk,andhasauto-discretization,basedoncasefiles.
FAQs-RunningNeticaonaMacTogetNeticatoworkonyourMac,you’llneedtofirstinstallacompatibilitylayerforrunningWindowsprograms,andthenyoucaninstallNeticaintheusualway.Thereareseveralpossibilitiesforcompatibilitylayers(seebelow),butwehavefoundthatCrossOverisoneoftheleastexpensiveandeasiest-to-useoptions.ItallowsNeticatorunwithfullspeedandcapability.Neticahasbeencreatedtorunwellundereventhemostbasicofconditions,sotherearenoseriousissuesusingNeticaunderCrossover(checkouttheirreviewofNetica’scompatibility).Seethebottomofthisscreenfortheknownissuesandsimplework-aroundsforrunningNeticaonyourMac.WhyamIdownloadingatrialversionofCrossOver?Codeweaversoffersa30dayfullfeaturedversionofCrossOver,soyoucantryitoutforfreeandgetsupportalongtheway.Onceyou’resatisfiedwithitsperformanceonyourMac,youcanpurchaseitfor$39.95(whichgoestosupporttheopen-sourcedevelopment).AretherealternativeoptionstousingCrossOver?ThereareotheroptionsforrunningWindows-basedprogramsonyourMac,suchasParallels,VMwareFusion,andAppleBootcamp.Eachsolutionhasitsadvantagesanddisadvantages.Neticaworkswellonallofthem.TheseothersolutionswillenableyoutorunawidervarietyofWindowsprogramsbutaremoreexpensiveandlarger.Thisdifferentiationchartmaybehelpfulinmakingyourdecisionandtherearemanyotherreviewsonline.IsthereawaytogetWINEonmymachineforfree?IfyouarecomfortablewithamoretechnicalapproachtogettingWINEonyourmachine,youcantryoutthefreeWineBinaryDownloads,aswellastheRecommendedPackagesforbuildingWineon32bit.WillthisdownloadpollutemyMac?
No!CrossOverisjustacompatibilitylayer(inotherwords,youarenotactuallyinstallingWindowsonyourMac),anditwon’taffectanythingelseonyourMac.CanIeasilygetridofCrossOverifIdecideIdon’twantitonmymachine?Yes!ToerasealltracesofCrossOver,followthesesteps.I’mhavingtroubleinstallingCrossOver,help!GothroughthestepsoftheofficialInstallationGuide.Ifyou’restillhavingtrouble,checkouttheirFAQpage.OnceIgetNeticarunningonmymachine,arethereanyknownproblemswiththesoftware?Thereareafewminorissues,allwithquickwork-arounds:1.Right-clicking:Control-click,asyou'reprobablyusedtowithMacprograms,doesn’tworkthatwayunderWINE(sofar).
Workaround:Enablesecondaryclick.Todothis,gotoSystemPreferences>Keyboard&Mouse>Trackpadandenable‘Taptrackpadusingtwofingersforsecondaryclick’.Youcanthenright-clickbytappingthetrackpadwithtwofingers.Update:IfyouarerunningacurrentversionofXquartz,youcangointotheX11.apppreferenceswhenit’srunningandselectwhatyouwanttobemodifierkeysforrightandmiddleclicks.
2.Messageswindow:WhenNeticafirstopens,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowappearsinwordformatintheupperleftofthescreeninsteadofbottomleft.
Solution:Double-clickthewordtoopenthewindow.Movingforward,theMessageswindowmayappearasablankwhitesquareinthebottom
leftoftheNeticascreen.Again,youcandouble-clickthewhitesquaretobringuptheMessageswindow.
3.OnscreenHelp:thehelpsystembuiltintoNeticadoesnotlaunchwhenclicked.
Solution:UsethisonlineHelpsystemforassistanceandfordocumentationonallthelatestfeatures.
4.LearningfromExcelfiles:YouwillgeterrormessagesifattemptingtolearnfromanExcelfile.
Solution:YoumustconvertyourExcelcasefileintoatextfileandthenyoucanproceedwiththestepslistedinLearningFromaCaseFile.
HelpusimproveNetica'sfunctionalityonMacbysendingusyourquestionsorfeedback!
NewFeaturesTocheckyourversionofNetica,openNeticaandchooseHelp→AboutNetica.Dependingonyourversion,youmaywanttocheckforrecentpre-releaseversions,availablefromourftpsite.
YoucantryanyversionofNeticain'limitedmode'(withoutapassword).Or,youcanupgradeyourcurrentNeticalicense.
Inadditiontoitsstandardfeatures,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_Application.htm');returnfalse;">Neticahasthefollowingnewfeatures.
Version4(-)andversion5(•)newfeatures:
•GeneratewebsitesfromBayesnets:AftercreatinganyBayesnet,youcanselectthetargetnodes,pushabuttonandyourbrowserwillspringuprunningyourBayesnetasaquestion/answersystemorasadashboardwithsliders.Bestofall,yourwebsiteisalreadydeployedtotheworldhostedonoursystem(oryoucanhostit,ormakeadesktop-onlyversion).SeeExamplesite.
Fullusageofthissystemissoldasaseparateproduct,andcompletedocumentationforthisfeatureisinaseparatemanual.ContactNorsysfordetails.
•StructureLearning-NeticacannowdoTANlearningoflinkstructurefromdata.Overtheseriesofversion5releases,wewillbefurtheraddingtoNetica'slearning-from-datacapability(structure,parameter,testing).
-CustomReports-CangeneratehighlycustomizablereportsonmanyaspectsoftheBayesnet,nodes,states,CPTs,cases,findings,beliefs,sensitivityresults,otherinferenceresults,etc.Thereportscanrangefrombasictextoutputtonicelyformattedtables.TheycanbeintheformofHTML,XML,text,richtext,etc,basedontemplatefilesthatyoumakeorchoosefromourlibraryoftemplates.
•Actions-Canenteractionsorinterventions(i.e.,Pearl'sdo-calculus)tonaturenodesinsteadofjustfindings.Alsohandlescalibrationactions(aka
randomizedactionsorpopulationinterventions).•Candirectlymovebeliefbarswiththemousetoentercalibrationfindingsandcalibrationactions
•MajorimprovementstodynamicBayesnet(DBN)capabilityfortimeseries.Nowdoesa"burn-in"togenerateinitial-statenodes.
•EMlearningnowhandlesmultipleCPTtablesconstrainedtobethesame(indicatedbytheuserfield"CPT_ID"havingthesamevalue).
-BuildtablefromothernetisaveryversatilefeaturethatamongotherthingscanfilltheCPTtablesofnodesinonenetbasedonanothernetwithadifferentstructure.
-Optionforinferencebysamplingwhennecessary(usingrejectionmethod).•CannowdoallBayesnetoperations(suchasinference)whentherearesomedisconnectedlinks.
-Capability"SplitNode"convertsamulti-statenodeintoasetofBooleannodes,onenodeforeachstateoftheoriginalnode.
-Cansortthestatesofanode(ornodes)byname,belief,othernode,standardorder,reverseorder.Standardorderisuser-definable.Othernodeisveryinteresting;itusesBayesianinferencetomaketheordercompatiblewiththeorderingofstatesofanothernode(theselectednode).
-AddedNoisyOrMultiDistfunction,availablefromequations,togeneralizethenoisy-ortomultiplestates,inawayusuallymorefittingthannoisy-maxdoes.
-Adding/Deleting/Renamingstatesbyright-clickingcannowdomanystatesatatime(eventomultiplenodes),andcanaddstatenames,numbersandtitles.
•InNode-setdialog,shift-clickingtheSetColorbuttonwillauto-colorallnode-setsfromthefirstonetotheselectedone,inclusive.
•EMlearningnowleavesfindingsinnetwhileoperating(andhandlesthemproperly;theycanoverridethecasefile).
•Cannowhavepasswordsthatworkforallusersonamachineoracrossanetwork.
•Fixed:PasswordswouldnotstayregisteredonsomeAsianMSWindowsmachines.
•GreatlyimprovedtheCombineNetsfeature.•AddedtotheModify→OrderStatesoptions.•Onscreenhelpnowalsohasanonlineinternethelpsystem,anditisavailablefromNetica'smenu.
Othersmallerimprovements
Fromversion3.16toversion3.25:
•Youcanchangetheorderofparentswhileeditinganode'sCPTtable(andtherebythestructureofthetable)justbydraggingitscolumns.
•Thereisnowagreatnewwaytonavigatelargenetdiagrams,calledGlobalZoom.Alsonewis"pushscrolling",donebyholdingtheALTkeydownanddraggingonthebackground.
•Providestheabilitytodothesameoperationtomanynodesatonce,suchas:adding,removing,renamingorreorderingstates,changingdiscretizationthresholds,enteringfindings,enteringuser-definedfields,etc.
•Whenyouchangethenameofnode,itautomaticallyadjuststhatnode'sequationandtheequationsofitschildnodes.Alsoworksfornamechangesduetoduplicatingnodesandtimeexpansions.
•Addedmuchwidersupportforright-clickingonnodes,net,link,etc.•Canviewandedittablesofanode's'experience'andfrequencycountswhenlearningfromdataorconnectedtoadatabase.
•Improvedauto-discretizingalgorithm.•Added“CombineNets”feature(inpreliminarystage).Othersmallerimprovements
Fromversion2.17toversion3.16:
•Cancreateandworkwithsetsofnodes.•Cancolor-codenodes.•CandirectlyconnectwithadatabaseorExcelspreadsheetforlearning,readingcases,testinganet,etc.•CangenerateSVGgraphicsofBayesnets,forqualityweborprintpublishing.
•Hasanewbinary.netaformatforfasterandsmallerBayesnetfiles(text-based.dnefileswillalwayscontinuetohavecompletesupport).•Canobfuscatenets,andcanworkwithencryptedBayesnets,toprotectyourintellectualproperty.•Hasauto-discretization,basedoncasefiles.•Whenhovercursorovernodes,statesorlinksNeticacandisplayacommentofyourchoiceinafloatingwindow.•Casefilescannowhaveuncertainfindingsusingaverysimplebutpowerfulfileformat(UVF),andthoseuncertainfindingswillbeproperlyhandledbyNetica'sbeliefupdating,EMlearning,processcases,etc.•AutomaticallycompilestheBayesnetwhenitisreadfromdisk,whenappropriate.•TheMeterdisplayfordiscretizednodes,orthosewithstatevaluesdefined,nowhasaneedlewhichshowsexpectedvalue,andabandarounditwhichdisplaysstandarddeviation.•Keepstrackofwhentablesmayneedtobere-builtfromtheirequations.•ManyimprovementstotheCPTtableeditor,includingbetterpasting,betterscrolling,applyinganoperationtomultiplecells,probabilitiesorpercentages,experience,etc.•Dynamicscrollingandmousewheelsupportedeverywhere.•NowhasaCalibrationchoiceonenter-findingsmenu,toenterthelikelihoodfindingthatwillresultinacertainbeliefstate.•Fixedbugs,including:•Whencopy/pastingnetgraphics,onsomesystems,thelowerrightoftheimagewascutoff.•Inthenodepropertiesdialog,repeatederrormessagessometimesmadeitdifficulttoexit.•BelieflinkingtomodernversionsofExceldidn'tupdatelinks.•Printingdidn'tworktosomenetworkprintersorthosewithlongnames.•NowalsoreadsHugin6.*.netfiles(aswellas4.*and5.*).•AddedTable→EnterExperiencecommandtoenterexperiencetablesforallselectednodesatonce.•Thereisnowa"-case"commandlineparametertoautomaticallyread-ina
case.•Theexpectedvalueofanodeisdisplayedevenifoneoftheintervalsextendstoinfinity.
Fromversion1.12toversion2.17:
•HasEMlearningandgradientdescentlearningofCPTtablestobetterdealwith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdata.•HasaProcessCasesfeature,toreadcasesfromafile,processthemwiththeBayesnetone-by-one,thenoutputtheresultstoanewfile.•NowhasaRecentFileslistonthemenu.•Added“GoBack”keycommandtoscrolltothelastplacebeingeditedonanet.•CannowcompileandupdatenetswhoseCPTsorutilitytablesareabsentorincomplete(takesmissingentriesasuniformprobabilitiesorzeroutilities).•Thereisanodepalettewindowtokeepcommonlyusednodes.•Generatingatablefromanequationcanusetheintegraloftheequation,insteadofsampling,formanycommondistributions.•Auto-updatingnowworkswheneveritcan(e.g.,afterchangingaCPT).•Cansimultaneouslyaddlinkstomanynodes,orfrommanynodes,iftheyareselectedwhenaddingalink.•Improvedtimeexpansion,cannoweditdelaysinnodedialog,andthereisaModify→DelayLinksmenucommand.•CannowreadDXpressfilesandBNIF(.dsc)files.•AddedNoisy-MaxandNoisy-Sumcapabilities(Noisy-OrandNoisy-Andalreadyexist).•Cannowobserveandsetnodeuserfieldsusingthenodepropertiesbox.•Windowtitlehasindicator(*)toshowwhenithasunsavedchanges•Displays*deterministic*naturenodesinLabelBoxstyleusingathickborder.•CommandlinecanacceptaNeticapassword(-passwordxxx),whichisused
forthatsession,butnotenteredintotheregistry.•Inferencealgorithmtakesbetteradvantageoffindingsenteredtospeedinference.•Equation-to-tableexpandstheintervalautomaticallyifvaluesareout-of-bounds.•Addedlogmessagescommand.•CansetthedisplayofnodestatestoonlytheNmostprobable,orderedbymostprobablefirst,whichchangesasbeliefschange.•Whenenterfindings,andbeliefupdatingnotyetdone,onlythosenodesaffectedwillhavetheirbeliefsindicatedinvalid.•Whenpastenodesintoanetworkitexpandsthedrawingsizeifnecessary(insteadofcrunchingthemup).•AddedaSelectNodesmenuwhichcanselectnodeswithequations,findings,dependenton,parents,ancestors,childrenanddescendentsofselectednodes.•AddedaSelectLinksmenuwhichcanselectlinks:all,disconnected,ineffectual(zerostrength),formingcycle,orentering,exitingorinterconnectingselectednodes.•=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_updating.htm');returnfalse;">Deterministicupdatingprecedesbeliefupdating,foraccuracyandspeed.•Canreadorcreatecasefileswithcomma,spaceortabdelimiters,andwith?,*,spaceornothingas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdatachars.•Casefilesdon'tnormallyhaveaheaderwith//~->[CASE-1]->~andatime/authorstampanymore(althoughstillacceptsthat).•AddedLayout→SpreadOut/Compactcapability.
InstallationLegal:BeforeinstallingorusingNetica,besurethatyouaccepttheLicenseAgreementwhichisalsoprovidedwiththesoftwareinaseparatedocument.
Requirements:NeticaApplicationrequiresaPCrunninganyversionofMicrosoftWindowsfrom2000toWindows7(includingXPandVista).IfyouneedaversionofNeticaforanearlierversionofWindows(suchasWindows95),then=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">contactNorsys.Installationrequireslessthan10MBofharddiskspace.(ReasonforNetica’ssmallsize)
NeticawillrunwellevenonaveryslowPC(0.4GHz),usingverylittleRAM(about30MB),butworkingwithcomplexBayesnetsmayrequiremuchmorespeedandlargeamountsofRAM.
Install:1.FirstobtaintheNeticapackagefile.YoumayobtainitbydownloadingfromtheNorsyswebsite,orotherwisefromNorsys.ThenameofthefilewillbeNetica_Win.exe.2.Choose“Run”fromthedownloaddialogbox,orsavethefiletodiskandthendouble-clickitsicon.3.Whenadialogboxappears,enterwhereonyourharddiskyouwanttheNeticafolderplaced.Youcanputitanywhereyouwish;popularchoicesareC:\NeticaorC:\ProgramFiles\Netica.Makesurethereisadriveletter(e.g.“C:\”)atthefrontofthelocation.Youdon’thavetoincludeversioninformationinthename,becauseafoldercalledNetica###willbecreatedwithinit,where###istheversionnumber.4.ClicktheUnZipbuttonandthenclosethedialogbox.
MacInstallation:ToinstallNeticaonaMac,followthesesteps.Onceyou'vecompletedinstallation,you'llwanttobecomefamiliarwiththeFAQforrunningNeticaonyourMac.
Running:Then,opentheNetica###folderfromwhereyouhaditplaced.Thisfolderisknownasthe=4&&typeof(BSPSPopupOnMouseOver)==
'function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_Glossary_FM.htm#homedirectory');returnfalse;">homefolder.WithinitwillbeallthefilesrequiredforNetica,includingtheexecutablefilecalledNetica(orNetica.exe),withthis icon.Thefirsttimeyourunityoushouldright-clickonit,andchoose"Runasadministrator"(ifyouwantyoucanrunitbyjustdouble-clickingit,butthenitmightnotbefullyregisteredwiththesystem).Onsomesystemsitmaytakealongtimetostartthefirsttime;pleasebepatientandknowthatnexttimeitwillstartlightening-fast.
Password:Theenter-passworddialogboxwillappear,soifyouobtainedalicensepasswordfromNorsysbye-mailoronyourinvoice,youmaytypeitin,orbetteryetcopyandpasteitin.Ifyoulaterwishtoremoveorchangethepassword,chooseFile→NeticaPasswordfromNetica’smenu.
LimitedMode:YoucanuseNeticawithoutapassword(i.e.'LimitedMode'),anditwilloperateinafullfeaturedandusefulmanner,butwillnotbeabletodolargerprojects(i.e.can’tsavenetswithmorethan15nodes,learnfrommorethan1000casesatatime,etc.)
Next:NowthatNeticaisinstalledandrunning,youcangetanintroductiontohowitworksbydoingtheoperationsdescribedintheQuickTour,orcheckouttheNewFeatures.
IfyouwishNeticatobeonyourStartmenu,youcanusethenormalWindowsmethodofdraggingtheNetica.exeicon fromtheNetica###folder(asmentionedabove)anddroppingitontheStartbutton.Ordragittothedesktopifyouwanttomakeashortcutthere.
YoucanmovetheNeticafoldertowhereveryouwantonyourharddriveatanytime.Aftermovingit,youwillagainneedtorunNeticaasAdministratoronce(asdescribedabove)toregisterthenewlocation.
MultipleVersions:IfyouhaveseveraldifferentversionsofNeticaonyourharddiskatthesametime,oneofthemwillbethe"default"(e.g.itwillbetheonethatwillrunwhenyoudouble-clickaNeticadocument).Tochangethedefault,simplymanuallyrunoncetheversionofNeticaasAdministrator(asdescribedabove).ThereisneveranyneedtouninstallanyNeticaversionbeforeinstallinganynewone.
Uninstall:TouninstallNetica,justdeletethe“Netica”folder.Neticadoesnot
addanyotherfilesanywhereinyoursystem(exceptofcourse.neta,.dneor.casdocumentsthatyoucreategetplacedwhereyousavethem),andNeticaaddsverylittletotheWindowsRegistry.IfyouhaveseveralversionsofNetica,youcanuninstalloneversionbysimplydeletingitsfolder;thatwon’tdeleteanyfilesneededbyanyotherversion.
MenuItemsandtheToolbarInthisguide,Netica'smenuitemsareindicatedinbold,witharrowsindicatingchoicesorsubmenus,soFile→Openmeanschoose“Open”fromthe“File”menuofthemainmenubar.Mostmenuitemshaveacorrespondingtoolbarbutton,andfromwithinNeticayoucandiscoverwhatthebuttonsdobyrestingthecursoronthembriefly.Forexample,itwillsay“OpenFile”,whenyourestitonthe toolbarbutton.
SomeofthetoolbarbuttonsdiscussedinthisguidemaynotappearonthetoolbarwhenyoufirststartNetica,soyoumaywanttocustomizethetoolbar.
Insteadofusingthemenuoratoolbarbutton,youcanoftenuseakeyboardshortcutoraright-clickmenu,whichhaveafewadditionalfeaturesnotavailablefromtheoverheadmenu.
QuickTourThisquicktourwillguideyouthroughsomeofthemajorfeaturesofNetica.AllyouneedtoknowtocompletethistourishowtouseMicrosoftWindows.Youdonotneedknowledgeof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnets,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetsor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica.htm');returnfalse;">Netica,althoughyoumaynotfullyunderstandwhatishappeninguntilyouhavethatknowledge.
First,makesureyouhavecompletedtheinstallation.Youshouldduplicatethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolderincaseyouaccidentallychangesomeofthesuppliedfiles.Next,runNeticabydouble-clickingonitsicon .ThefirsttimeyourunNeticaitwillaskyouforapassword.Enterthelicensepasswordsuppliedtoyouby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsys,orclickonthe“LimitedMode”buttonifyoudon’thaveone.
TheworkspacewindowwillopenandinitslowerleftcornertherewillbeaniconforaminimizedwindowcalledNeticaMessages.Clickonthe buttontoopenitup,orchooseWindow→Messages.Inthiswindow,Neticawilloftenputusefulmessageswhileitisoperatingandsometimesitwillbeeptoalertyoutoanewmessage.
Tip:Itisagoodideatoleavethe=4&&
typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">MessageswindowopenwhileyouarelearningNetica.Youcancopyandpasteinformationbetweenthiswindowandanytextfile,whichmaybeusefulforfuturereference.Itmayalsohelpbyexplainingwhysomeunexpectedoutcomehasoccurred.
GettingHelp:IfyouhavequestionsatanytimewhileusingNeticayoucangethelpbychoosingHelp→ContextHelporpressingF1.Dependingonwhatyouareworkingon,NeticawillbringupaHelppageofcommonsubjectsorwilltakeyoudirectlytoarelevantscreenwithinthehelpsystem.Ifyouwantmoreinformationonacertaintermyoucanaccessthecomprehensiveindexdirectly,bychoosingHelp→Help.Ifyouareconnectedtotheinternet,youcanfindotherkindsofhelpfromtheHelpmenu,suchas:NorsysWebsite,OnlineNeticaWebHelp(thewebversionofonscreenhelp),NetLibraryWebsite(ourlargecollectionofexamplesnets),orEmailNorsys(tosendanemailtooursupportteam).
WhenyouarefinishedwithyourNeticasession,youcanenditbychoosingFile→Exitfromthemenu.Ifyouhavecreatedorchangedsomeworkwithoutsavingit,Neticawillaskifyouwanttosaveitbeforeterminating.
Toproceedthroughthestepsofthetour,usethenavigationarrowsabove.
Activities–PARTOFQUICKTOUR
Onceyouclickonanactivitybelow,proceedthroughitspageswiththenavigationarrowabove.Eachoftheactivitiesofthequicktourmayrequireknowledgeofapreviousactivity.
1ProbabilisticInference2NetConstruction3NetTransformation4LearningfromData5Decision-MakingNets6EquationsandTimeExpansions
ProbabilisticInference–PARTOFQUICKTOUR
Tutorial:Tobegin,wewillreada=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetstoredondisk.ChooseFile→Openfromthemenu,andwhenthestandardfile-openingdialogboxappears,useittoopenthefilecalled“ChestClinic”inthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder.AwindowwillappearcontainingaBayesnetconsistingofseveralconnected=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodes.ThisverysimplenetfordiagnosingpatientsarrivingataclinicisaclassicexampleoftenusedtointroduceBayesnets.
Youcanpreparethenetfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">inferencebychoosingNetwork→Compilefromthemenu,orbyclickingthe toolbarbutton(iftheyaregray,thenethasalreadybeencompiled).Whenthecompilationiscomplete,thedefaultdisplaystylechangessothatnodesaredisplayedwithbargraphsshowingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsforeachoftheirstates.Youcanentera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">finding(alsoknownasan“observation”,or“evidence”)foranodebyclickingonthenameofthefindingtotheleftofthebargraph.Youcanalsoenterafindingby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthenodeandchoosingEnterFinding.
Whenthefindingisentered,thedisplaysofallthenodeswillbeadjustedtoaccountforit.Forinstance,puttingan‘abnormal’findingforthe‘XRayResult’nodeincreasesthebeliefthatthepatienthaslungcancerfrom5.5%to48.9%,butthenindicatingthatthepatienthasmadeavisittoAsiadecreasesthatbeliefto37.1%,becausetheabnormalXRayispartially=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_explaining_away.htm');returnfalse;">explainedawaybyagreaterchanceofTuberculosis(whichthepatientcouldcatchinAsia).
Ifyouchoose“Unknown”fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_findings_menu.htm');returnfalse;">findingsmenu,thenanyfindingforthatnodewillberetracted,andifyouchoose“Likelihood”youwillbequeriedfortheprobabilitiesofan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">uncertainfinding(“virtualevidence”)forthenode.Youcanalsoclickdirectlyonthenameofthefindingasecondtimetoretractthefinding.
Eachtimeyou=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteror=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">retractafinding,thebeliefsofallthenodeswillimmediatelybe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">updatedtoaccountforthenewinformation.IfyouwishupdatingtoonlyoccurwhenyoudoaNetwork→Updatecommand,youcanturnofftheauto-updatefeatureby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggling
Network→AutomaticUpdating.
Ifyouwanttoobserveorchangethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobabilitiesofanode(whichexpressits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationwithits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentnodes),=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodebyclickingonceonit,andthenchooseTable→View/Edit,orclickonthetoolbarbuttonwiththe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_relation_symbol.htm');returnfalse;">relationsymbol: .Aspecialwindowcalledthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogboxwillopenwhichdisplaystheprobabilitiesinatable.Theleft-handsideofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_contingency_table.htm');returnfalse;">tablecontainsaverticallistofparentconfigurations,andforeachconfigurationtheright-handsidehasafewprobabilities,expressedaspercentages.
Eachcolumnoftheright-handsidecorrespondstoadifferent=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">stateofthenode.Soeachnumberrepresentstheconditionalprobabilitythatthenodetakesonthestateindicatedbythecolumnthenumberisin,giventhattheparentshavetheconfigurationindicatedbytherowthenumberisin.Ifthenodeis=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministic(e.g.the“TbOrCa”node),thenthetabledialogboxwilldisplaya=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontable.Thisisthesameastheconditionalprobabilitytable,exceptthattheright-handsidesimplyhasthestateofthenodewhichisthefunctionvalueforthatparentconfiguration.
ToworkwithexamplesofmorecomplexBayesnets,openthefilecalled“Alarm”(alsointhemedicaldomain),orthefilecalled“HailFinder”(weatherprediction).YoucancompilethemanddoinferenceinthesamewayasyoudidwithChestClinic.Withthisexample,youcanclickdirectlyonthenameofthefindingasecondtimetoretractthefindingorholddowntheSHIFTkeywhileclickingonthenameofthefindingtoentera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativefinding.
Ifyouhaveenteredanumberoffindingsforaparticular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">caseandwishtosavethemintheirownfile,chooseCases→SaveCaseAsandenterthefilenameinthedialogboxwhichappears.IfyouwanttoworkonanewcasechooseCases→RemoveFindings,andthenenterthenewfindings.Torecovertheoriginalcase,chooseCases→GetCaseandpickitsnamefromthedialogboxwhichappears.
Whenyouaredonewithanetwindow,youcangetridofitbyclickingthebuttoninitstitlebar,orbymakingitthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activewindowandthenchoosingFile→Close.
NetConstruction–PARTOFQUICKTOUR
AddingNodes:ChooseFile→New→Networkfromthemenutocreateanew=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">beliefor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetwindow.Toadda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenode(i.e.a“chancenode”or“deterministicnode”),movethecursortothetoolbarandclickthe toolbutton.Whenyoureturnthecursortothenewwindow,itwillchangetoanellipse,andwhenyouclickinthewindow,anodewillbeaddedatthecursor.Thenodewillbeselectedwhenfirstadded(i.e.displayedwithnegativecolors),soifyoujustpresstheENTERkey,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogboxwillappearwhichallowsyoutoenterthename,states,etc.ofthenode.
=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">Utilitynodes(alsoknownas“valuenodes”)or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodesmaybeaddedinthesamewayasnaturenodes,byusingthe ortoolbuttonsrespectively.MoreInfo
AddingLinks:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">Linksmaybeaddedbyclickingthe toolbutton,thenclickingonthenodeyouwantthelinktocomefrom(i.e.the“=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parent”node),andfinallyclickingonthenodeyouwantittogoto(i.e.the“=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">child”node).Alternately,youcanclickdownintheparentnode,andwhileholdingthemousebuttondown,dragthecursortothechildnode,andthenreleaseit.Ifyoudouble-clickonatoolbarbuttonthenitwillcreateacursorthatyoucanusetoaddseveralnodesorlinks(withoutitswitchingbacktothepointereachtime).
Anotherwaytoaddnodesorlinksisto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchooseModify→NewNodeorright-clickonanodeandchooseLinks.MoreInfo
SelectingNodes&Links:To=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectanodeorlink,clickonceonitwiththeregularpointercursor,anditwillbecomehilited.Agroupofnodesmaybeselectedbyclickingdownonthebackgroundwithinthewindow,andthenmovingthemousewiththebuttondepressed(i.e.“dragging”),sothattheselectionrectangleisoverthem.YoucanaddtoorremovefromagroupofselectednodesbyholdingdowntheCTRLkeywhileyouselectthenewnodes.Todeletenodesorlinks,selectthemandthenpresstheDELETEkey.MoreInfo
UndoingOperations:Afterdoinganyoperation,youcanundoitwithEdit→Undo(orpressingCTRL+Z).Byrepeatingthisyoucanundooperationsprevioustothatone(atleast4operations,andsometimesmoreiftheydon'ttakemuchmemory).Afterundoingoneormoreoperationsyoucanredothemone-by-onewithEdit→Redo(orpressingCTRL+SHIFT+Z).WhenexploringwithNetica,itisveryusefultobeabletotryafewoperations,andtheneasily
undothem.MoreInfo
MovingNodes:Anodecanbemovedbyclickingdownonit,draggingittoitsnewposition,andthenreleasingthemousebutton.Tomoveagroupofnodes,firstselectthem,andthenclickdownononeoftheselectednodesanddragittoitsnewposition.Tochangetheshapeofalink,firstselectitbyclickingonit,thenclickdownonitagainanddragthecursortothepointwhereyouwantthelinkbendtobe.MoreInfo
Disconnecting&ReconnectingLinks:Alinkcanbedisconnectedbyclickingonittoselectit,thenclickingdownonthehilitedsquarethatformsatitsnon-arrowend,anddraggingitawayfromtheparentnode(orbyselectingthelinkandchoosingModify→DisconnectLinks).Toreconnectthelinktoanewnode,dragthenon-arrowendoverthenewparentandreleasethemousebutton,orchooseModify→ReconnectLinks.Disconnection/reconnectionisusefultochangethelinksofanetwithoutlosingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">conditionalprobabilitytablesofthenodes.RememberthattojustdeletealinkyousimplyselectitandthenpresstheDELETEkey.NOTE:Ifyoudeletealinkandthenre-addit,youwillhavelosttheinformationinthepreviousCPT;thusifyouwanttoretaintheCPTs,usethedisconnectioncommand.MoreInfo
Cutting&PastingNodes:Youcancutandpastenodesandsubnetswithinawindow,orbetweenwindows.TryopeninganetsuchasCar_Diagnosis_0,selectpartofit,pressCTRL+C(tocopyittothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboard),CTRL+N(tocreateanewnet),clickinthemiddleofthenewwindow(toindicatewheretoputit),andthenCTRL+V(topasteitintothenewnet).Youcancutandpasteotherpartsofthenet(orothernets),addnodes,etc.andthenconnectupthedisconnectedlinksasdescribedinthepreviousparagraph.Inthiswayyoucantakeknowledgefrompreviousapplications,perhapssaveitinanetfragmentlibrary,andre-useittoconstructanewnetforanewapplication.MoreInfo
SavingNets:AtanypointyoucanchooseFile→Savefromthemenutosavethecurrentversionofthenettofile,overwritingthepreviousone,orFile
→SaveAstosaveittoanewfile.
NodeProperties:Youcanchangethepropertiesofanodebyusinganodedialogbox,whichisobtainedbydouble-clickingonthenode,(orbyright-clickingandchoosingProperties).Whenyoumakechangesinthedialogbox,theywon’tactuallybeappliedtothenodeuntilyouclickthe“Apply”or“Okay”buttons.Youcanchangeanode’snameortitleintheobviouswaybytypingintheappropriatetextfieldofthedialogbox.Tochangethenameofoneofthenode’sstates,choosethestateusingthedown-arrowbesidethe“State:”label,andthentypeintheneighboringtextfield.Youcanaddordeletestateswiththe“New”and“Delete”buttons.Mostpeoplefinditmoreconvenienttoenterorchangestatenamesusingthetextentryareaatthebottomofthedialogbox.NOTE:Ifyouaddordeleteastatefromthenodedialogbox,youwilllosetheinformationinstatecommentsandintheCPT.Instead,addordeleteastateusingtheright-clickmenu.MoreInfo
Thetextentryareaatthebottomofthedialogboxcanbeusedtoenterorchangeseveraldifferentthings;youchoosethethingtoworkonwiththeselectordirectlyaboveit.Forinstance,toentersometextdocumentingthenode,youchoose“Description”withtheselector,andthentypeinthetextentrybox.Somechoices(suchas“WhenChanged”)can’tbemodified;theyareforviewingonly.MoreInfo
NodeCPTs:Inordertochangetheprobabilitiesofanodeconditionedonthevaluesofitsparents(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTs),firstopenthenode’stabledialogboxby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingit,andthenchoosingTable→View/Edit.Youcanclickonanumber(orstatenameifit’sadeterministicnode)tochangeit.Ifnoprobabilitieshaveyetbeenenteredforthisnode,youcanclickonanemptycelltoenteranumber.Thenumbersmustbeenteredaspercentages.Youcanselectsomecellsbyclickingdowninacellthatisnotcurrentlybeingedited,anddraggingtoenclosethecellsbeforereleasingthemousebutton.Youcanselectwholerowsatatimebyclickinganddraggingslightlytotherightofthedoubleverticalline(thisishowyoumustselectdeterministiccells,sinceclickingdirectlyonthembringsupthestatemenu).Thereareseveralitemsinthe
Tablemenuthatyoucanusetosetthevaluesofselectedcells(suchasUniformProbabilities,FillMissing,NormalizeandRandomize).AnychangesyoumakeinthedialogboxwillnotactuallybetransferredtothenodeuntilyoupresstheApplyorOkaybutton.Thesetwobuttonsdothesamething,buttheOkaybuttonalsoremovesthedialogbox.MoreInfo
NodeStyles:Tochangethedisplaystyleofsomenodes,firstselectthemandthenmakeachoicefromtheStylemenu.FortheChestClinicnetthemostusefuldisplaysareBelief-barorMeter,althoughifyouwerecreatinganetforanend-useryoumaywanttogiveanodelikeTbOrCaastyleofHidden.Ifyouwanttohideallthelinks,youcanuseStyle→Links→HideLinks.TheStyle→Fontchoicemaybeusedtochangethefontandsizeofthenodes.MoreInfo
NetTransformation–PARTOFQUICKTOUR
Nodeabsorptionremovesanodewithoutaffectingtheoverallglobalrelationshipoftherestofthenodes(i.e.thejointprobabilitydistribution).
Thissmalldemonstrationofnodeabsorptionwillshowhowitdoesn’teffectthebeliefsoftherestofthenet.Open"Car_Diagnosis_2"fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder.CompileitwithNetwork→Compile,andnoticethatthebeliefis25.4%that“SparkQuality”is“good”.Ifyouenterafindingof“dim”fornode“Headlights”,thebeliefchangesto1.47%.Nowselectnodes“MainFuse”,“BatteryAge”,“VoltageatPlug”and“SparkPlugs”,andthenclickthetoolbarbuttonorchooseModify→AbsorbNodes.Theselectednodes
willbeabsorbed,linkswillbeaddedandremoved,andprobabilitytablesadjustedtomaintaintheglobalrelationship.NowdoNetwork→Compile,andobservethebeliefis1.47%that“SparkQuality”is“good”asitwasbeforetheabsorption.IfyouthendoNetwork→RemoveFindings,thebeliefchangesto25.4%,whichiswhatitwasintheoldnetbeforeanyfindingswereentered.
Linkreversalchangesthedirectionofalinkwithoutaffectingtheoverallglobalrelationshipoftherestofthenodes(i.e.thejointprobabilitydistribution).Selectalinkandthenclickthe toolbarbuttonorchooseModify→ReverseLinks.Neticamayhavetoaddextralinksinordertomaintainthejointprobabilitydistribution(oritmaybeabletoremovesomelinks).
SeealsoDisconnectingandReconnectingLinks
LearningfromData–PARTOFQUICKTOUR
Tutorial:OpentheBayesnetcalled"Car_Diagnosis_0"fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder(note:donotuse"Car_Diagnosis_2").Itisasimplified=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">examplenetcontainingnodesforafewvariablesofinterestwhendiagnosingacarthatisnotrunning.Thenodesarelinkedupinacausalmanner,butthenetdoesnotcontainanyinformationotherthanthenodenames,theirstates,andhowtheyarelinked.Ifyou=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickoneofthenodes,andthenchooseTable,youwillseeinthetabledialogboxwhichappears,thatthenodehasno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsdefined(theemptyboxesintheright-handpanel).Noneofthenodeshaveanyprobabilitiesdefined,sothenetisnotyetreadyfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">inferencebutinthisstepwewilllearntheprobabilitiesfromdata.
Tolearnaprobabilistictableforeachofthenodeswewilluseafileof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">casesofcarspreviouslyarrivingatagarage,called“CarCases”,inthe“Examples”folder.Youmaywanttoexaminethisfilewitha=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditor.Therowofheadingsacrossthetoparethenamesofthenodesinthenet,andeach
possiblevaluetheycantakearethestatenamesofthosenodes.“BatAge”isacontinuousnode,soitsvaluesarerealnumbers.Theasterisks(*)indicatedatavalueswhicharenotknown(i.e.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdata).
Withthenetwindow=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">active,andnonodes=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected(otherwisethelearningwillonlyapplytotheselectednodes),chooseCases→Learn→IncorpCaseFile.Whenyouarequeriedforafile,chooseCarCases,andenter1forthedegree.Neticawillusethecasestolearnprobabilistictablesforeachnodeofthenet,withthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowdisplayingthefractioncompleted.
Whenitisfinished,ifyouexamineafewnodeswiththetabledialogbox,youwillseethelearnedprobabilitydistributions.Youcanclickontheselectorthatsays"%Probability",andchoose"Counts"fromthemenutoseethenumberofoccurrencesofeachpossibilityinthedatafile.FromtheCountstable,Neticageneratesthe"Unnormalized"tablebyaddingasmallconstant(usually1)toeachcell.SummingeachrowoftheUnnormalizedtableresultsinthe"Experience"table,whichisusedtonormalizetheunnormalizedtable,andproducethe"Probabilities"table.Thus,Neticacanlearnthelocalprobabilitytablesinaverysimpleandeffectiveway.Ifyouhave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_latent_node.htm');returnfalse;">latentvariables,orlotsof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdata,thenNeticamustuseconsiderablymorecomplexalgorithms,suchasEMorgradientdescenttolearnthetables.
NowthatthelocalCPTtableshavebeenlearned,youcancompilethenetanddoinference,pastepartsofitintoadecisionnet,absorbnodes,etc.
Ifyouwanttolearnthelinkstructureofyournetbasedonacasefile,usethestructurelearningfeature.
NeticacanalsobeusedtogeneratefilesofcaseswhichfollowtheprobabilitydistributionofaBayesnet(i.e.“sample”fromtheBayesnet).Thesecasescanbeusedasrealisticexamplesofpossiblescenarios,orassyntheticdataforlearningexperiments.Simplyselectthosenodesofthenetforwhichyouwantcolumnsinthecasefile,andthendoCases→SimulateCases.Youwillbequeriedforthenumberofcasestogenerate,thenameofthefiletocreate,andhowmuchmissingdatayouwant(enter0fornone,1forallmissing).
MoreinfoonNetica'sLearning
SeealsoLearningfromanExcelFile
SeealsoTestNetwithCases
Decision-MakingNets–PARTOFQUICKTOUR
WithNetica,decisionnetsarethesameasregular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnets,exceptthattwoadditionaltypesofnodesarepresent,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodesandutilitynodes.InaregularBayesnet,allthenodesarecalled=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenodesbecausetheyhaveonlytodowithmodelingthenatureorrealityoftheworld,thelikelihoodofitsbeinginanyofitspossiblestates.Theconceptofutilityandtheconceptofdecisionareseenasoutsideofmerelydepictingreality,beingmoreintherealmofgoals,desires,andagendas.NeticacompilesbothaBayesnetandadecisionnetintoajunctiontreeforefficiency.
Tutorial:UseFile→Opentoreadthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnet(alsoknownasaninfluencediagram)"Umbrella"fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder.Byopeninga=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogboxforeach=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenode(beigeoval)youcanobserveits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">conditionalprobability
table,andbyopeningoneforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynode(greenhexagon),youcanseeitsutilityfunction.Ifyoulookatthetabledialogboxforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnode(bluerectangle),youwillseethatthenodedoesnotyethaveanyfunctionalrelation,whichindicatesthatthereisnodecisionfunctionassociatedwiththenode.Ourgoalistofinda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_rule.htm');returnfalse;">decisionfunctionwhichwillmaximizethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueoftheutilitynode.
ThisisaccomplishedbychoosingNetwork→Compile.Ifyouthenlookatthetabledialogboxforthedecisionnode,itwilldisplaythediscovereddecisionfunction(youwillhavetoclickthe“Reset”buttonifyoudidn’tfreshlyopenthedialogbox).Thenumbersinthe“Decide_Umbrella”givetheexpectedutilityofeachchoice.Youcan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enterfindingsforForecasttoseehowtheychange.
Ifyouwanttotryanotherdecisionnet,open“Car_Buyer_Neapolitan”,whichisdescribedinNeapolitan90,andisbasedontheclassic“CarBuyer”influencediagram.Itinvolvestwosequentialdecisionsaboutwhethertodosometestsandthenwhethertobuyacertainusedcar.Theoptimaldecisionsturnouttobenottodoanytests(D=none),buttobuythecar(B=BuywhenD=none).
Hereisamoredetailedversionofthisexercise.
EquationsandTimeExpansions–PARTOFQUICKTOUR
Tutorial:OpentheDynamicBayesNetcalled"Bouncing"fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder.Itisdesignedtomodelaballwhichbouncesbackandforthinastraightlinebetweentwoparallelbarrierswithoutlosinganyenergyateachbounce.Initiallywehavenoknowledgeofthepositionorvelocityoftheball.
ThePositionandVelocitynodesstandforthepositionandvelocityateachinstantoftime,andareconnectedtogetherwithbrown=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_time_delay_link.htm');returnfalse;">timedelaylinks(andcouldalsohaveregularblacklinksaswellifdesired).Youcanthinkofatimedelaylinkasdeliveringtothearrowofthelinkthevaluethatthetailhadsomeperiodoftimeago,withthatperiodoftimebeingthelink'sdelay.
Equations:Ifyoudouble-clickonthePositionnodeyoucanseethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equationwhichdefinesthenewpositionintermsoftheoldposition,andthevelocity.Itinvolvestheconstant"dt",whosevaluemaybechanged(byright-clickingonthedtnodeandchoosingEnterNumericFinding)toprovideadifferentamountoftimebetweentimeslices.
Byclickingdownontheselectorthatoriginallysays“Equation”,youcanchoose“Discretization”toseehowthenodehasbeen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretized.Later,youcaneditthislisttochangethediscretization.
Thisnethasalreadyhadit'sprobabilitytables(CPTs)builtfromtheequationateachnode.Ifitdidn'thave,thefirststepwouldbetogenerateprobabilitytablesforthecurrentdiscretizationbymakingsurenonodesareselectedand
choosingTable→EquationtoTablefromthemainmenu.Enter1000whenpromptedforthenumberofsamplespercellandpress‘No’whenaskedaboutincludingsamplinguncertainty.
TimeExpansion:NextyougenerateatimeexpandedversionofthenetbydoingNetwork→ExpandTime.Enter2inthedialogboxfortheexpansiontimeand1fortheburn-intime.Thiswillmakeanewwindowwithanewnetinit.Youwillprobablywanttoresizethiswindowtomakeitwider.YoucanuseLayout→DrawingSizeandmaketheentryblank.ThenewnetisaregularBayesnetwitheachPositionandVelocitynoderepresentingthepositionandvelocityatanewpointintime,withnodestotherightcorrespondingtolatertimes.
FinallywecancompiletheBayesnetforprobabilisticinferencewithNetwork→Compile.Experimentwithsettingthepositionorvelocity(byclickingonthedesiredrange)toindicateobservationsatcertaintimes,andseehowthebeliefsforpositionandvelocityatallothertimeschange.
Aninterestingsituationiswhentheballisneartheboundary,butyoudon’tknowwhichwayitisgoing,sinceafteralittlewhileitwillsurelybemovingawayfromtheboundary(perhapsduetoabounce).Orifthepositionsat2timesareknown,canitinferthevelocity?Orifjustthevelocitiesattwoadjacenttimesareknown,andoneisthenegativeoftheother,canitinfertheposition(becauseitmusthavebounced).Youcanalsotry=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteringsomenegativefindings(thattheballisn’tatsomeparticularpositionorvelocity)byholdingdowntheSHIFTkeywhenyouclickontheinterval.
Rememberthatthenumericalresultswillnotbeexact,duetothediscretizationandsamplingerrorinconvertingtheequationstoprobabilitytables.YoumayalsowanttotryafinerdiscretizationbychangingtheRangesoftheoriginalunexpandednet.
Whenyoubuildyourowntimedelaynets,tomakesomelinksrepresentatimedelay,selectthelinks,thenchooseModify→DelayLinks.Oryoucanusethenodedialogbox,choosing"Delay"fromthemulti-purposeselectoratthebottom.
Seealso:dynamicBayesnets,andtheEquationschapter.
IntroductoryReferencesforBayesNetsandDecisionNetsOverview:ForanoverviewofBayesnetsanddecisionnets,therearetwospecialjournalissuesthataresuitable.Thefirstisthewinter1991editionofAIMagazine,whichcontainsboth“BayesianNetworksWithoutTears”(Charniak91)and“DecisionAnalysisandExpertSystems”(Henrion&BH91).Theotherisvolume38oftheCommunicationsoftheACM,whichisdevotedtoBayesnetsanddecisionnets(Heckerman&MW95),andhasintroductorymaterialanddescriptionsofrealapplications.
Fundamentals:In1988JudeaPearlwroteProbabilisticReasoninginIntelligentSystems(Pearl88),whichwasthemostinfluentialandwidelycitedbookintheformativedevelopmentofBayesnets.Itisanexcellentfoundationalbook,butitdoesn’tcontainthelatestdevelopments,andhasaverymathematicalandtheoreticalorientation.BayesianNetworksandDecisionGraphs(Jensen01)hassomewhatmorerecentresults,althoughtheearlierJensen96maybeevenmoreusefultoabeginnerwhoisjustinterestedinunderstandingandapplyingBayesnetsinabasicway,ifitcanbeobtained.
The"bible"onBayesnetsrightnowisProbabilisticGraphicalModels(Koller&F09).Itisverycomprehensiveandwrittenatahighacademiclevelbytwooftheworld'sleadingresearchersonBayesnets.Inthesamevein,butnotascomprehensive(althoughcoveringsometopics,suchasinference,withgreaterdepth)isModelingandReasoningwithBayesianNetworks(Darwiche09).
Applied:ThebestbookonthetheoryofhowtoapplyBayesnetstotherealworldisBayesianNetworksandInfluenceDiagrams(Kjaerulff&Madsen08).BayesianArtificialIntelligence(Korb&Nicholson04)alsocontainsusefulmaterialtoconstructmodels.Asamplingofreal-worldapplicationscanbefoundinBayesianNetworks:APracticalGuidetoApplications(Pourret&Naim&Marcot08).
FortheusageofBayesnetsinparticularfields,see:
-ProbabilisticMethodsforBioinformatics(Neapolitan09)
-ProbabilisticMethodsforFinancialandMarketingInformatics
(Neapolitan07)
-Ecology:SpecialIssueofCanadianJournalofForestResearch(NRC06)
-PlanningImprovementsinNaturalResourceManagement(Cain01)
-OperationalRisk:MeasurementandModelling(King01)
Russell&N09isanexcellentintroductorytextbookforartificialintelligencethatdoesagoodjobofdescribingBayesnets,decisionnets,dynamicdecisionnets,policyiteration,etc.withintheoverallcontextofintelligentagentsandAIsoftware.
Causality:Averyaccessibleandeasy(butworthwhile)readoncausalmodelsisCausalModels:HowPeopleThinkAbouttheWorldandItsAlternatives(Sloman05).IfyouarebuildingcausalBayesnets,andhaven'thadalotofexperiencewithcausalmodeling,youshoulddefinitelyreadthatbook.Foramoreacademicandadvancedstudyoncausality,readCausality:Models,Reasoning,andInference(Pearl09).Itisbytheworld'sleadingresearcheroncausality,andalthoughitisataveryadvancedlevelforthesubject,youcanselectivelyreadittogetthemostimportantideaswithoutmuchdifficulty.Theexcellentepiloguecanbereadwithnobackgroundknowledgerequired;readitfirst.Forcausalityasappliedtopsychology,seeTheMind'sArrows:BayesNetsandGraphicalCausalModelsinPsychology(Glymour01).
Research:AlthoughmuchoftheliteratureonBayesnetsispublishedwithintheartificialintelligence(AI)community,itisreallythecombinedworkofthestatistics/probability,decisionanalysis,operationsresearch,andAIcommunities(andincreasinglyothercommunitiesthatareapplyingBayesnets,suchasresourcemanagement,ecology,finance,medicine,etc.).ManyoftheresearcherswhodevelopedthetheoryofBayesnetsanddecisionnetsattendedtheannual“UncertaintyinArtificialIntelligence”conferencefrom1985topresent,andsoadvancedmaterialcanbefoundintheconferenceproceedings(availablefromthe"ConferenceProceedings"sectionoftheAUAIsite).
DesignPhilosophyNeticawasdevelopedusingauniquesoftwaredevelopmentprocess.ManyofourclientsaresurprisedatthesmallsizeofNetica,consideringitsadvancedcapabilities,easeofuse,andreliabilitycomparedtootherBayesnetsoftware.Internally,ithasverylittleredundancy(mostmodernWindowsprogramshavealargepercentageofredundantorunusedcode),andanelegantinternalarchitecturedesignedtogivemaximumpowerandusabilityinthesimplestmanner.
Ourdevelopmentprocessemphasizesconstantiterativeimprovement.Everytimeaclientreportsabugorasksaquestion,wehaveaprocessinplacetofixthatbug,ormakesurethequestionisansweredbytheonscreenhelp.Wheneveraclientexpressesfrustrationorgivesusawish-listitem,wemakeaplanonhowtoaddresstheissue,andeithermakeanimmediatechange,oraddittoourshort-rangeorlong-rangedevelopmentschedule.IfyoueverhaveanyproblemwithNetica,frustrationwithhowitworks,ordesireforanewfeature,please=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">letusknow;yourinputwillbeusedtomakeNeticaabetterproduct.
Wehavezero-toleranceforbugsin=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPI.Itgetsthoroughlytestedwithourextensivein-housetestingandbyourlargeclientbaseovermanyyears,andithasnoknownbugs.Thefactthat=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_Application.htm');returnfalse;">NeticaApplicationsharesmuchofitscodewithNeticaAPImeansthatNeticaApplicationhasaverysolid,robustcore.
WekeepabreastofthelatestdevelopmentsinBayesnettheoryandtechnology,andareconstantlyaddingfeaturesbasedonnewresearchresultsfromourresearchandthatpublishedinthegeneralliterature.YouwillfindinNeticamanyexcitingnewfeaturesnotavailableinanyotherBayesnetsoftware.
OneofourdesigngoalsistomakeNeticaveryversatile;itisatoolthatintherighthandscanbeusedformanydifferenttasks.Clientsoftenshowusimaginativesolutionsthey'vecreatedbycombiningvariousNeticafeatures,andmanyhavetoldusthatitwas"fun"touseNeticabecauseofthepoweritgavethem.
BayesNetsandProbabilisticInferenceABayesnet(alsoknownasabeliefnetworkorprobabilisticcausalnetwork)capturesbelievedrelations(whichmaybeuncertain,stochastic,orimprecise)betweenasetofvariables,whicharerelevanttosomeproblem.Theymightberelevantbecausetheywillbeobservable,becausetheirvalueisneededtotakesomeactionorreportsomeresult,orbecausetheyareintermediateorinternalvariablesthathelpexpresstherelationshipsbetweentherestofthevariables.
Example:AclassicexampleoftheuseofBayesnetsisinthemedicaldomain.Hereeachnewpatienttypicallycorrespondstoanew=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">case,andtheproblemistodiagnosethepatient(i.e.findbeliefsfortheunmeasurablediseasevariables),predictwhatisgoingtohappentothepatient,orfindanoptimalprescription,giventhevaluesofobservablevariables(symptoms).Adoctormaybetheexpertusedtodefinethestructureofthenet,andprovidetheinitialrelationsbetweenvariables(oftenintheformof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">conditionalprobabilities),basedonhismedicaltrainingandexperiencewithpreviouscases.Thenthenetprobabilitiesmaybefine-tunedbyusingstatisticsfrompreviouscases,andfromnewcasesastheyarrive.
BayesNetConstruction:WhentheBayesnetisconstructed,one=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodeisusedforeachscalarvariable,whichmaybediscrete,continuous,orpropositional(true/false).Becauseofthis,thewords“node”and“variable”areusedinterchangeablythroughoutthisdocument,but“variable”usuallyreferstotherealworldortheoriginalproblem,while“node”usuallyreferstoitsrepresentationwithintheBayesnet.
Thenodesarethenconnectedupwithdirected=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">links.IfthereisalinkfromnodeAtonodeB,thennodeAissometimescalledthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parent,andnodeBthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">child(ofcourse,Bcouldbetheparentofanothernode).UsuallyalinkfromnodeAtonodeBindicatesthatAcausesB,thatApartiallycausesorpredisposesB,thatBisanimperfectobservationofA,thatAandBarefunctionallyrelated,orthatAandBarestatisticallycorrelated.Theprecisedefinitionofalinkisbasedonconditionalindependence,andisexplainedindetailinareferencelikeNeapolitan90orPearl88.However,mostpeopleseemtointuitivelygraspthenotionoflinks,andusethemeffectivelywithoutconcentratingontheprecisedefinition.
Finally,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">probabilistictablesareprovidedforeachnode,whichexpresstheprobabilitiesofthatnodetakingoneachofitsvalues,conditionedonthevaluesofitsparentnodes.Somenodesmayhaveadeterministicrelation,whichmeansthatthevalueofthenodeisgivenasadirectfunctionoftheparentnodevalues.
ProbabilisticInference:AftertheBayesnetisconstructed,itmaybeappliedtoaparticularcase.Foreachvariableyouknowthevalueof,youenterthatvalueintoitsnodeasa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">finding(alsoknownas“evidence”).ThenNeticadoesprobabilisticinferencetofind=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsforalltheothervariables.Supposeoneofthenodescorrespondstothevariable“Temperature”,anditcantakeonthevaluescold,mediumandhot.Thenan
examplebelieffortemperaturecouldbe:[cold-0.1,medium-0.6,hot-0.3],indicatingthesubjectiveprobabilitiesthatthetemperatureiscold,mediumorhot.
Dependingonthestructureofthenet,andwhichnodesreceivefindingsordisplaybeliefs,Neticamaydodiagnosis,prediction,classification,logic,arithmeticcalculation,oranycombinationofthese,tocompletetheprobabilisticinference.Thefinalbeliefsaresometimescalledposteriorprobabilities(withpriorprobabilitiesbeingtheprobabilitiesbeforeanyfindingswereentered).ProbabilisticinferencedoneusingaBayesnetiscalled=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating.
Ifyouwanttoapplythenettoadifferentcase,thenallthefindingscanbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">retracted,newfindings=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">entered,andbeliefupdatingrepeatedtofindnewbeliefsforallthenodes.
Probabilisticinferenceonlyresultsinasetofbeliefsateachnode;itdoesnotchangethenet(knowledgebase)atall.Ifthefindingsthathavebeenenteredareatrueexamplethatmightgivesomeindicationofcasesthatwillbeseeninthefuture,youmaythinkthattheyshouldchangetheknowledgebasealittlebitaswell,sothatnexttimeitisused,itsconditionalprobabilitiesmoreaccuratelyreflecttherealworld.Toachievethisyouwouldalsodo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probability_revision.htm');returnfalse;">probabilityrevision.
SeealsoLearningfromCases
Netica’sProbabilisticInferenceNeticausesthefastestknownalgorithmforexactgeneralprobabilisticinferenceinacompiledBayesnet,whichismessagepassinginajunctiontree(or“jointree”)ofcliques.ThealgorithmsusedaredescribedinSpiegelhalter&DLC93,Jensen96andNeapolitan90.
Inthisprocess,Neticafirst=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compilestheBayesnetintoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontree.ThejunctiontreeisimplementedasacomplexsetofdatastructuresconnectedupwiththeoriginalBayesnet,butinvisibletoyouasauserofNetica.Youenter=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsforoneormorenodesoftheoriginalBayesnet,andthenwhenyouwanttoknowtheresultantbeliefsforsomeoftheothernodes,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_updating.htm');returnfalse;">deterministicupdatingandthenbeliefupdatingisdonebyamessage-passingalgorithmoperatingontheunderlyingjunctiontree.
ItdeterminestheresultantbeliefsforeachofthenodesoftheoriginalBayesnet,whichitdisplaysasabargraph,oraneedlemeter,ateachnode.Youmaythenentersomemorefindings(tobeaddedtothefirst),orremovesomefindings,andwhenyourequesttheresultantbeliefs,beliefupdatingwillbeperformedagaintotakethenewfindingsintoaccount.
Neticacanalsodoprobabilisticinferencebylinkreversalsandnodeabsorption,butthosearemainlymeantfortransforminganetanddoingmodelexploration,andareusuallynotasfastorasconvenientforgeneralprobabilisticinferenceasthecompiledjunctiontreesdescribedabove.
ExampleBayesNetLet’slookatanexampleofusingNeticatodoprobabilisticinference.Inthisexamplewewillreadinasimplenetfromafile,compileitintoaformsuitableforfastinference,entersomefindings,andseehowthebeliefsofvariousnodeschangewitheachfinding.
Thenetwewilluseisshownbelow.ItisatoymedicaldiagnosisexamplefromLauritzen&S88thathashistoricallybeenusedfordemonstrationpurposes.Toacertaindegree,thelinksofthenetcorrespondtocausation.Thetwotopnodesare“predispositions”whichinfluencethelikelihoodofthediseasesintherowbelowthem.Atthebottomaresymptomsforthediseases.
YoucanreaditintoNeticabychoosingFile→Openfromthemenu(menuselectionsareindicatedinbold,witharrowsindicatingchoicesorsubmenus,sothepreviousmeanschoose“Open...”fromthe“File”menu).Whenthestandardfileopeningdialogboxappears,useittoopenthefilecalled“ChestClinic”.ThisfileisincludedwiththeNeticadistributioninthe“Examples”folder.
Ifyoucompile“ChestClinic”bychoosingNetwork→Compile,youwillseesomethinglikethefollowing:
Thedefaultnodestylehaschangedtobelief-bar,sothedisplaylooksdifferent.Also,theappropriatedatastructuresforfastinferencehavebeenbuiltinternally.Ifyouenterafindingof‘abnormal’fornode“X-RayResult”,byclickingontheword‘abnormal’,thebeliefswillbeautomaticallyupdated,sothatthebeliefthatthepatienthaslungcancergoesfrom5.5%to48.9%.ThenindicatingthatthepatienthasmadeavisittoAsiadecreasesthatbeliefto37.1%,becausetheabnormalXRayispartially=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_explaining_away.htm');returnfalse;">explainedawaybyagreaterchanceofTuberculosis(whichthepatientcouldcatchinAsia).
CompilingaBayesNetTocompilethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activeBayesnet,chooseNetwork→Compile,orclickthe toolbarbutton.Iftheyaredimmedthencompilinghasalreadybeendone.A“=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontree”forfastinferencewillbebuiltinternally.Thedefaultdisplaystyleforthenodeswillbechangedtobelief-bar,soifthenodeshaven’thadtheirdisplaystylesset,thentheywillbedisplayedinbelief-barstyle.
Forsmallnets,theCompilecommandwillseemtoperforminstantly.Forlargenetsitmaytakeafewseconds,inwhichcasetheprogresswillbedisplayedinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindow.
Auto-Compile:Ifyousaveacompiled=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_auto_update.htm');returnfalse;">auto-updatingnettofile,thenthenexttimeyouopenit,Neticawillautomaticallycompileitandperformupdating.Ifthenetisnotcompiledwhenyousaveit,thenyoumustcompileitasdescribedabovewhenyounextopenit.Ifyouwishtoreadinanauto-compilingnetwithoutperforminganycompiling,holddowntheSHIFTkeywhenyouopenit.
MissingTables:ItispossibletocompileandupdatenetswhoseCPTsorutilitytablesareabsentorincomplete.Neticatakesmissingentriesasuniformprobabilitiesorzeroutilities.Iftherearemissingentriesortables,thenwhilecompilingNeticawillbeepandputamessage(#2760)intheMessageswindow.
Optimized:NeticaalsohasaNetwork→CompileOptimizecommand,whichspendsalongtimeworkingoutaveryefficientstructurefortheinternal
junctiontree.Asitisworking,itdisplaysintheMessageswindowthememoryrequirementsandprojectedinferencetimetodoabeliefupdatingwiththebeststructureithasdevelopedsofar.PresstheCTRLkeyandholddowntheleftmousebuttonatthesametimewhenyouwantNeticatostopandusethatstructure.
Thememoryrequirementsitdisplaysareveryaccurate,butwhenconsideringtheinferencetimekeepinmindthatitisbasedondoingtheinferenceusingthesamecomputerastheonedoingthecompiling,itassumesthecomputerhasenoughRAMmemoryinstalledthatitdoesn'tneedtousevirtualmemory,andthatithasalargeshareoftheprocessortimeundermultitasking.Italsodoesn'tincludethescreenredrawtime,whichdependsonhowlargetheBayesnetwindowis,andonthedisplaystyleofthenodes.
IfyousaveaBayesnetafteranoptimizedcompile,thenthenexttimeyouopenitthequickcompilecommandwillgiveittheoptimizedstructurequickly(aslongasyoudon’tchangethenetnodesorlinksinbetween).
Technical:Forthoseinterestedinatechnicalexplanation,thequickcompiledoesaminimum-weightsearchforagoodeliminationorder,andtheoptimizedcompilesearchesforthebesteliminationorderusingaspecializedalgorithmwhichisacombinationofminimum-weightsearchandstochasticsearch(withsomefacetsofmulti-startmethods,simulatedannealingandgeneticalgorithms).
EnteringandRetractingFindingsPurpose:Usuallyyouenterfindings(sometimescalled“evidence”)totemporarilyapplya=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnettoaparticular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">casefor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">probabilisticinference.
Entering/Right-click:Toenterafindingforanode,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonitandchooseEnterFinding.Eachpossiblestateofthenodewillbelistedinalphabeticalorder;choosethefindingfromit.Menuitemsappearasstatetitle(orbystatenameifnotitlesexist).
Afterthefindinghasbeenenteredthenodewillbedarkened(oritscolorotherwisechangedasdefinedbynode-sets).Itdoesnotmatterinwhatorderyouenterasetoffindings.
Entering/Left-click:Whenthenetis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compiledandthenodeisdisplayedinbelief-barormeterstyle,left-clickdirectlyonthenameofthefindingyouwishtoenter.Ifthenodeisdisplayedinbelief-barstylethenasolidoutlinedbarisdrawnforthestatematchingthefinding.
Whenyouenternewfindings,andbeliefupdatingisnotyetdone,onlythosenodeseffectedwillhavetheirbeliefsindicatedinvalid.
Retracting:Ifyouwishtoretract(i.e.remove)afindingthatyouhaveenteredforsomenode,chooseUnknownfromitsfindingsmenu,orclick
againdirectlyonthenameofthefindingofabelief-barnode.Enteringafindingandretractingitisequivalenttoneverhavingenteredit,eveniftherewereotherfindingsenteredinbetween.
Anotherwayofretractingthefindingsforsomenodesisto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthemandthenchooseCases→RemoveFindings,orclickthetoolbarbuttonwitharedcrossoverthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case_symbol.htm');returnfalse;">casesymbol:
Ifyouwishtoretractallthefindingsenteredforallthenodesinthenet,makesureallornoneofthemare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,andthenchooseCases→RemoveFindings.Thisisusefulifyouarefinishedwithonecaseandwishtomoveontoanother.
MultipleNodes:Youcanenterthesamefindingforawholesetofnodesatonce.Firstselectthem,thenright-clickononeoftheselectednodes,andproceedasabove.MoreInfo
Uncertain:Ifyouwanttoenterafindingthatanodeisnotinaparticularstate,oryouwanttoenteranuncertainfinding,youwouldenteritasanegativeorlikelihoodfinding.
Consistency:Neticacanchecktheconsistencyofthefindingsyouenter.
SetsofFindings:IfyouhavemultiplefindingstorepeatedlyenterintoaBayesnet,youcanputtheminacasefile.
DecisionNodes:Enteringafindingintoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodedoesnotreallycorrespondtodiscoveringinformationormakinganobservation,butrathertocommittingtoadecisionchoice.Nevertheless,itisstilloftenlooselyreferredtoas"enteringafinding".
BeliefUpdatingandAutoUpdatingWhenprobabilisticinferenceisdoneusingaBayesnet,itiscalledbeliefupdating.New=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefs(posteriorprobabilities)arefoundforeachofthenodestoreflectthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingscurrentlyenteredinthenet.
Auto-Updating:NormallyNeticadoesbeliefupdatingquicklyandautomaticallyaftercompiling,andeverytimeafindingis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">entered.However,itcanbeslowonlargenets,soyoumaywanttoenterseveralfindingsatoncebeforeupdating(youalsomaywanttousetheoptimizingcompiler).Inthatcase,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggleoffNetwork→AutomaticUpdating,enterthefindings,andeachtimeyouwanttoupdatethebeliefschooseNetwork→Update,orclickthe toolbarbutton(theywillbedimmedifbeliefupdatingisnotcurrentlyrequired,orifthenetisnotcompiled).
NothingHappens:Ifyouenterfindingsintoanet,andnobeliefupdatingoccurs,perhapsitisbecause=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_auto_update.htm');returnfalse;">auto-updatingisoff(thestateofauto-updatingissavedwitheachnetfile)orthenetisnotcompiled.
DimmedBeliefDisplay:Ifauto-updatingisturnedoff,andyouenteranewfinding,orifnofindingsareenteredbutbeliefupdatingwasneverdone,thenthebelief-barsormeterswillnotdisplayvalidresults,andsotheyaredrawndimmedoringrayratherthaninsolidblack.Thereasontheyarenotremoved
completelyisthatyoumaywanttoseewhatthebeliefswereatthepointofthelastbeliefupdating.
NegativeandLikelihoodFindingsNegativeandlikelihoodfindingsare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingswithsomeuncertaintyattached.
Negative:Apositivefindingisknowledgethatsomevariabledefinitelyhasaparticularvalue.However,youmayknowthatthevalueofanodeisnotsome=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">statewithoutknowingwhatitsvalueis.
Thisiscalledanegativefinding.Forexample,saythenode“Temperature”cantakeonthevaluescold,medium,andhot.Youmayobtaininformationthatthetemperatureisnothot,althoughitdoesn’tdistinguishbetweenmediumandcoldatall.Thatisasinglenegativefinding.
Ifyoureceiveanothernegativefindingthatthetemperatureisnotmedium,thenyoucanconcludethatitiscold.Soseveralnegativefindingscanbeequivalenttoonepositivefinding.
Likelihood:Athirdtypeoffindingisalikelihoodfinding(alsoknownas“virtualevidence”).Inthiscaseyoureceiveuncertaininformationaboutthevalueofsome=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenode.Itcouldbefromanimperfectsensor,orfromafriendwhoisnotalwaysright.
Sayyouhaveathermosensortomeasure“Temperature”,whichisdesignedsothatwhenthetemperatureishotitissupposedtoturnon.Inactualpracticeyoufindthatwhenthetemperatureiscoldthesensornevergoeson,whenthetemperatureismediumitgoeson10%oftime,andwhenitishotitalwaysgoeson.Ifatacertaintimeyouobservethesensoron,andwantto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enterthisfindingintotheTemperaturenode,thenyoudosoasalikelihoodfinding.
Alikelihoodfindingconsistsofoneprobabilityforeachstateofthenode,whichistheprobabilitythattheactualobservationwouldbemadeifthenodewereinthatstate.Forourtemperatureexample,thelikelihoodfindingwouldbe(0,0.1,1).Acommonmistakeistothinkthatthelikelihoodistheprobabilityofthestategiventheobservationmade(inwhichcasethenumberswouldhavetoaddtoone),butitistheotherwayaround.
Entering:Youcanenteranegativefindingforabelief-barnodeofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compilednet,byholdingdowntheSHIFTkeywhileyouclickonthenameofthefindingyouknowitsnot.Youcanenteralikelihoodfindingforanodebychoosing“Likelihood”fromits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_findings_menu.htm');returnfalse;">findingsmenu.Youwillthenbequeriedforthelikelihoodnumbers.
Youcanenteranegativefindingbyenteringalikelihoodfindingconsistingofall1s,exceptasingle0forthestatethatyouknowit’snot.Byhavingmorethanasingle0youcanenterseveralnegativefindingsatthesametime.
Accumulating:Wheneveryouenterapositivefindingforanode,alltheoldfindingsforthatnodeareautomatically=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">retractedfirst.However,ifyouentermorethanonelikelihoodfindingforanode,youwillbequeriedifyoufirstwantthepreviousfinding(s)toberemoved,orifyouwantthemtoaccumulate.Bylettingthemaccumulateyoucanenterseveralindependentpiecesofevidence(e.g.imperfectobservations)forthesamenode.Iftheyarenot=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditionally_independent.htm');returnfalse;">conditionallyindependentgiventheobservednode,anditistooinaccuratetoapproximatethemasindependent,thentheyshouldbeenteredby
adding=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">childnodestotheobservednode(oneforeachobservation),connectingthemtogethertoshowthedependency,andthenenteringpositivefindingsforthechildnodes.
Locating:Tofindallthenodeswithnegativeorlikelihoodfindings,useEdit→SelectNodes→LikelihoodFindings.
ConsistencyofFindingsTherearethreewaysthat=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingscanbeinconsistent:
1.Severalfindingsfordifferentnodescanbeinconsistentwitheachother.Thisisthemostcommonformofinconsistency.WhenNeticaalertsyouthatfindingsareinconsistent,thenitmeansthataccordingtothisBayesnet,itisimpossibletoobservethesetoffindingsyouhaveentered.Ifyouknowthatthosefindingsarepossible,thenthefaultliesinthenet’s=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">conditionalprobabilities(seebelow).
2.Severalfindingsforthesamenodecanbeinconsistentwitheachother.Thisonlyappliestofindingsenteredinaccumulationmode,becauseotherwiseeachnewfindingwillretractthepreviousoneforthatnode.Usuallyonly=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativeor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">likelihoodfindingsareenteredinaccumulationmode,andtheonlywaytheycanbeinconsistentistohaveatleastonenegativefinding(orzerolikelihood)foreverystateofthenode.
3.Asinglefindingcanbeinconsistentwiththenetitself.Thisisrare.Basicallythenethasazeropriorprobabilityforthatfinding,whichmeansitisafindingwhichshouldneveroccur.Usuallythisindicatesthenetwasnotdesignedtohandlecasesofthistype.
WhenDetected:Neticawillalwaysdetectaninconsistencyoftype2,andusuallyoftype3,assoonasyoutrytoenterit.During=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingallinconsistencieswillbedetected,andNeticawillreportthem(eithertothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindoworwithadialogbox).Soifthebeliefsarekeptcurrentbybeliefupdatingaftereachfindingisentered(whichisonereasontouse=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_auto_update.htm');returnfalse;">auto-updating),thenyouwillbealertedassoonasyoutrytoenteraninconsistentfinding,otherwiseyouwon’tbealerteduntilthenextbeliefupdatingisinprogress.
Recovery:IfNeticareportsaninconsistentfinding,simply=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">removeitandcontinue.NothingwithinNeticawillbeleftinaproblematicstate.
BeforeEntering:Youcanalwaystellifafindingwillbeinconsistentbeforeyouenteritbylookingatthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefforthatstate(dobeliefupdatingfirstifnecessary).Ifthebeliefiszero,thefindingwillbeinconsistent,otherwiseitwillbeconsistent.
IncorrectNet:Ifyouhaveproblemswithconsistency,re-examinewhether=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">conditionalprobabilitiesyouhaveenteredas0%shouldreallyindicateabsolutelyimpossible.Ifthereissomeverysmallprobabilitythattheyaren'timpossible,thenenterthatverysmallprobabilityinstead.Equivalently,perhapssomenodesthatare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicshouldreallybeprobabilistic.Alsoconsiderthepossibilitythatthenetiscorrect,butthatthefindingsshouldbehigh=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">likelihoodfindings,ratherthan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefindings.
InconsistentNet:Anetcanneverbeinconsistentwithitself.Nomatterwhatitsstructure,orits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">conditionalprobabilitytables,italwaysrepresentssomejointprobabilitydistribution.Onlyfindingscanbeinconsistent.However,anetmaybeincorrectlydesigned,asdescribedabove.
MostProbableExplanationGivenfindingsforsomenodes,youmaywanttofindthemostprobableconfigurationofvaluesfortherestofthenodes.Thiscanbethoughtofasprovidingaplausibleexplanationfortheobservedfindings,andiscalledthemostprobableexplanationorMPE(itisaspecialcaseofthemaximuma-posterioriprobability,orMAP).
YoucannotdeterminetheMPEsimplybytakingforeachnodethestatewithhighestbeliefafterregularbeliefupdating(whichfindsthemarginalposteriorprobabilityforeachnode).Forexample,inalotteryforwhichweknowthereisonewinner,itmightbemostprobableforeachindividualpersontolose,butthentheoverallconfigurationwouldhaveeverybodylosing,whichcontradictstheonewinnerevidence.FindingtheMPEwouldselectonerepresentativepersontowin(perhapswhoboughtthemosttickets),andtherestwouldbelosers.
NeticacanbeusedtofindtheMPE.ToindicatethatyouwishtodoMPEupdatingforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenet,insteadofregularbeliefupdating,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggleNetwork→MostProbableExpl.YouwillhavetorecompileafterturningMPEonoroff,asisindicatedbyallthebelief-barsturninggray.Youthen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enterfindingsintheusualwayanditdoesMPEupdatingimmediatelyafterwardsifNetwork→AutomaticUpdatingison,orotherwisejustafteraNetwork→Updatecommand.
Afterupdating,eachnodewillhaveabelief-baratthe100%level,andusuallysomebarsatlowerlevels.Youcanreadoffthemostprobableconfigurationbytakingforeachnodethestatewiththebaratthe100%level.Theshorterbarsindicatetherelativeprobabilitiesoftheotherstatesgiventhattheothernodesareinthemostprobableconfiguration(scaledbythesamefactorusedto
bringthelongestbarto100%).
Ofcoursethebarsdon’taddto100%,soifyouareeverusingNeticaandareconfusedthateverynodehasa100%barandtherearealsosomeothernonzerobars,itisbecauseMPEupdatingison.ToavoidthepossibilityofaccidentallydoingMPEupdatingwhenregularupdatingisexpected,allnetsstartwiththeMPEfeatureturnedoff,evenifMPEwasonwhenthenetwaslastsaved.
Multiple100%Bars:Sometimestwoormorestatesofthesamenodehavebarsthatareatthe100%level.Thisindicatesthatthereismorethanoneconfigurationwiththehighestprobability(i.e.,theconfigurationshaveequalprobability).Ifmorethanonenodehasthis,thenyoushouldchooseoneofthestatesandenterartificialevidencethatthenodeisinthatstate,toseehowitchangesthemultiple100%barsofothernodes.Bytryingeachofthepossibilitiesyoucanmapoutalltheconfigurationsthatareatthehighestprobabilitylevel.
Problems:YoumustbecarefulusingtheMPE.Generally,itisnotasgoodasposteriorprobability(i.e.regularupdating)fordecisionproblems,orprovidingpredictionordiagnosisprobabilities.Itsresultscanchangewiththeintroductionofirrelevantvariables.And,itcanbedeceptiveinsituationswhereeventhemostprobableexplanationisextremelyunlikely.
WhentoUse:TheMPEisusefulforexplainingandaidingunderstanding.Ifanagentfindstheresultsofregularbeliefupdatingquestionable,andasksyoutoprovideascenarioforwhichthebeliefsareupheld,youcanusetheMPEtofindthatscenario.Peoplesometimesfindacompletelyspecifiedscenarioeasiertounderstand.AndsometimesyoucangaininsightsbyputtingtheBayesnetinMPEmode,enteringtheevidence,observingthemostprobableconfiguration,andthenexperimentingwithaddingextra“evidence”toexploreasetofprobableconfigurationsclosetothemostprobableone,whileseeinghowchangingonenodeeffectstheothers.
CreatingBayesNetsandDecisionNetsThefollowingareactionsyoucantaketocreateanewBayesnetordecisionnet,ortomodifyanexistingone:
•OpeningaWindow•AddingNodes•AddingLinks•UndoingandRedoing•SelectingNodesandLinks•MovingNodesandAutoGrid•ReshapingaLink•SavingaNettoFile•DeletingNodesandLinks•Cut,Copy,PasteandDuplicateNodes•Right-Clicking•ChangingNodeProperties•PlacingTextonNetDiagrams•DocumentationWindow•DrawingSizeandScrolling•ZoomingInandOut•Search/Find•RelatedNodesandLinks•OneOperation,MultipleNodes•EnteringNodeProbabilityTables
OpeningaWindowThefirststepincreatinganewnetistobringupawindowforit.UseFile→New→Networkorclickthe toolbarbutton.Awindowwillappearinwhichyoucanbuildthenet.Thetitleofthewindowwillbesetwhenyousaveittofile.
ExistingNets:Youwilloftenfinditeasiertobuildanetbymodifyinganexistingone.Todoso,readintheexistingonewithFile→Open(orclickthe toolbarbutton),saveitunderthenameofthenewnetwithFile→SaveAs,andthenmakethedesiredmodifications,occasionallysavingitwithFile→Save,orbypressing .Alternatively,youcanreadinarecentlyusednetbychoosingFile→RecentFiles.
Multiple:Youcanopenasmanynetandtextwindowsasyouwish.AswithanyMicrosoftWindowsapplication,thecurrentoperationalwaysappliestotheactivewindow,whichistheoneinfrontwiththenon-dimtitlebar.Youcanmakeawindowactivebyclickingonanexposedpartofit,orbychoosingitstitlefromtheWindowmenu.
Toobtainmultipleversionsofthesamenet,right-clickonthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchooseDuplicateinNewWindow,orchooseWindow→DuplicateNet.
Arranging:FromtheWindowmenuyoucanalsochooseTileorCascade,whichwillarrangeallthewindowsaccordingly.Ifthesearefunctionsyouusefrequently,youcancustomizethetoolbarbyaddingtheirbuttons: ,and ,orsimplyusetheirshortcutkeys.
Closing:Whenyouaredonewithawindow,youcancloseitinoneofthreeways:1.byclickingthe buttoninitstitlebar,2.ifyouhavemadeunsavedchangestoanywindow,Neticawillaskifyouwanttosavethemfirst.MakeittheactivewindowandthenchooseFile→CloseAll,or
3.bypressingCTRL+F4,CTRL+QorCTRL+W.
Ifyoufindtherearetoomanywindowsopenatonce,youcanchooseWindow→CloseAllandbeginanew.
AddingNodesThetoolbarbuttons , and areusedforadding=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenodes(i.e.“chance”or“deterministic”nodes),=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodes,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynodes(alsoknownas“value”nodes)respectively.Whenyouclicktheappropriatebutton,andthenmovethecursoroverthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenetwindow,itwillchangetotheshapeofthenodetobeadded.Nextclickontheplaceinthewindowwhereyouwantthenodetoappear,anditwillbeaddedthere,withthecursorreturningtonormal.
AlternateAddingOptions:Besidesthetoolbar,youcanaddnewnodestoyournetinthefollowingways:1.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">Right-clickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchooseModify→NewNodeandchoosethedesirednodetypefromthelist.Formoreinfo,seebelow.
2.UsingtheOverheadmenu,chooseModify→AddtoaddaNature,Decision,Utility,orconstantnode,ortoaddanewlink.3.Useashortcutequivalent.
Multiple:Toaddaseriesofnodes,double-clickonthetoolbarbuttonforthe
typeofnodesyouwishtoadd,ordouble-pressF9(i.e.pressittwiceinquicksuccession).Thecursorwillchangetotheshapeofthenodeasbefore,butnowitwillbedarkenedindicatingthatanumberofnodesmaybeaddedinaseries.
Toexitthisnode-addingmode,clickthenode-addingbuttonagain,orpressthenode-addingFXkeyagain,orclickthe button,orpressthePause/Breakbutton(orclickonadifferentnode-addingbuttonorpressadifferentnode-addingkey).
NodeTypes:Oftenthemostusefulwaytoaddnodesisby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clicking,becausethenyoucanchoosewhattypeofnodetoadd,insteadofsettingitlater(throughthedialogbox).
Nature-DiscreteDEFINITIONNature-BooleanDEFINITIONNature-NumericContinuousCONTINUOUSVS.DISCRETENature-NumericDiscreteDecisionDEFINITIONDecision-BooleanUtilityDEFINITIONConstantDEFINITION
Properties:Whenanodeisfirstaddeditwillbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selected.WheneveranodeisselectedyoucanpresstheENTERkeytobringupadialogboxforsettingnodeproperties,andwhenthedialogboxfirstcomesup,itsfieldforsettingthenode’snameisselectedforchanging.Thismakesitpossibletoquicklyaddanodewithacertainname.Justclicktheappropriatelyshapedcursorwhereyouwantthenodetobe,presstheENTERkey,typethename,andthenpresstheENTERkeyagain.Thereisnoneedtothinkaboutthedialogboxorwaitforittobefullydrawn.
NodePalette:YoucanusetheNodePalettetostorenodesthatyouuse
frequently.Tostoreanode,copyitandchooseWindow→NodePalette,whichwillbringupawindowtopastethenode.WheneveryouuseNetica,youcanopenthenodepalettetoretrieveyourstorednodes.
NodeGroups:Tohelpwithvisualorganization,youcangroupnodestogether,toformnode-sets.
DeletingNodes:Ifyouwanttodeleteanodefromyournet,youcansimplyhighlightitandpresstheDELETEortheBACKSPACEbuttons.However,ifthenodewaslinkedtoothernodes,therearesomethingstoconsiderbeforedeletingitentirely,asitsdeletioncouldaffectyourCPTs.MoreInfo
AddingLinksToaddalinkfromonenodetoanother,firstclickthe toolbarbutton,chooseModify→Add→Link,orpresstheF10key.Whenyounextmovethecursortothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenetwindow,itwillchangetoalinkshapeindicatingthatitisreadytoaddalink.Clickonthenodethatyouwishtobethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parent,andthenclickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">childnode.Alternately,youcanclickdownontheparent,andwhileholdingthemousebuttondown,movetothechildandthenreleaseit.Thelinkwillappear.Ifyouwant,youcanthenchangetheshapeofthelink.
Adding-Mode:Toaddaseriesoflinks,double-clickthe button,ordouble-presstheF10button(i.e.pressittwiceinquicksuccession).Thecursorwillchangetoalinkshapeasbefore,butnowitwillstaythatwayasyouaddmultiplelinks.Toexitthislink-addingmode,clickthe buttonagain,orpresstheF10keyagain,orclickthe button(orclickonanode-addingtoolbuttonorpressanode-addingkey).
SeveralatOnce:Toaddlinksfromonenodetomany,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_link.htm');returnfalse;">selectallthenodesyouwantthelinkstogoto,thendrawalinkfromthedesiredparenttooneofthem,andallthelinkswillbecreated.
Toaddlinksfrommanynodestoone,selectallthenodesyouwantthelinkstocomefrom,thendrawalinkfromoneofthemtothedesiredchild,andallthelinkswillbecreated.
Deleting:Todeletelinks,simplyselectallthelinksyouwishtodelete,andthenpresstheDELETEkeyorchooseEdit→Delete.Alternately,youcan=4
&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonalinkandchooseDelete.
OverlappingandCycles:Itispossibletoaddmorethanonelinkbetweenthesametwonodes,ortocreate=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_cycle.htm');returnfalse;">directedcycles.FormostBayesnetwork,youdon'twanttodoeitherofthese,andsoNeticawillbeepandputawarninginthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindow(itdoesn'tstopyou,sincethesemaybevalidoperationswhencreatingaDBNornetfragment,butifyoutryto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compilethenetitwillgiveyouanerrormessage).Toremoveanoverlappinglink,justclickonitandpresstheDELETEkey;youmightnotnoticeitdisappearing,sinceafteritisgone,youwillstillseethelinkunderit.
Right-clickingOptions:Foranunselectednode,youcanright-clickonitandchoosetoAddLinkToorFromanyoftheothernodesinthenet.
Onceyouselectanodeorgroupofnodes,right-clickingwillallowyoutoaddlinksToorFromanyothernodeinthenet.Ifagroupofnodesisselected,youcanalsoright-clickonanunselectednodeandchoosetoLinks→AddLinkToorFromSelectedNodes.MoreInfo
UndoingandRedoingWhilebuildingorchangingthenet,youcanundothelastoperationbychoosingEdit→Undo,orpressingCTRL+Z,orclicking ,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchoosingModify→Undo.
Multiple:Toundooperationsprevioustothatone,repeatedlyinvokeEdit→Undo(orCTRL+Z,or ).
Redo:Afteraseriesofundos,youcan“redo”oneormoreofthembyrepeatedlychoosingEdit→Redo,orpressingCTRL+SHIFT+Z,orclicking ,orright-clickingthenetbackgroundandchoosingModify→Redo.
HowMany:Neticawillsaveagreatmanyofthepreviousstepsforundoing,butthiswillbereducediftheyarestepswhichtakelargeamountsofmemory.
Dimmed:IfyouareundoingoperationsandtheEdit→Undomenuitemortoolbarbuttonturnsdim,itmeansyouhaveundonealltheoperationsthatNeticahasremembered.Ifyouareredoingoperations,andtheEdit→Redomenuitemortoolbarbuttonturnsdim,itmeansthatyouhaverestoredalltheoperationsthatwerepreviouslyundone.
PastFileSave:Youmayevenundooperationsthatweredoneprevioustothelasttimethenetwassavedtofile.Asyouareundoingoperations,atthepointthatthenetmatcheswhatwaslastsavedtofile,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_changed_indicator.htm');returnfalse;">changed-indicator*willdisappear,andafterundoingfurtheroperations,itwillreappear.Then,ifyoustartredoingoperations,onceagainitwilldisappearwhenthenetmatchesthefile,andthenreappear.
OtherWindow:Theoperationsdoneineachwindowareremembered
separately,soifyoureturntowindowAafterworkinginanotherwindowforawhile,youcanstillundooperationspreviouslydoneinwindowA.
SelectingNodesandLinksManyoperationsonnodesaredonebyfirstselectingoneormorenodes,andthenchoosingtheoperationtodo.Neticaindicatesaselectednodebydrawingitwithnegativecolors.
SelectingSingleNodes:Selectanodebyclickingonceonit.Youmayhavetoclickonthenode'stitleifclickingonotherpartsofitcausesomeactiontooccur.Otherwise,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickoveranodeandchooseSelect.
SelectingMultipleNodes:Clickdownonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandthendragtheselectionrectangletoincludeatleastapartofeachnode.ChoosingEdit→SelectNodes→All(orpressingCTRL+A)willselectallthenodesinthenet.Tounselectallthenodescurrentlyselected,justclickonceonthenetbackground.
Modifying:Whenyouselectnewnodes,anynodesthatwerepreviouslyselectedwillbecomeunselected,unlessyouholddowntheCTRLkeywhileclickingordragging.Inthatcasetheselectedstatusofthenewnode(s)willbereversed,allowingyoutoaddto,orremovefrom,thecollectionofselectednodes.Anotherwayistoright-clickonanodewhoseselectionstatusyouwishtochange,andchooseSelectorDeselect.
Repeating:Ifyouoftenneedtoselectthesamesetofnodes,youcansetthemasanode-set,andthenselectthembychoosingEdit→SelectNodes→InNodeSet.
Reversing:Toreversetheselectionsothatitconsistsofonlythenodescurrentlynotselected,pressCTRL+SHIFT+AorchooseEdit→SelectNodes→InvertSelection.
ByProperties:Alternatively,youcanselectnodesandlinksaccordingtotheirpropertiesorrelationships.Forexample,youcanselectnodeswithequations,findings,dependenton,parents,ancestors,childrenanddescendents
ofselectednodesbychoosingEdit→SelectNodes…
FromText:Edit→SelectNodes→ListedinClipboardwillselectallthenodeswhosename(nottitle)appearsinthetextcurrentlycopiedtothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboard.Forexample,ifyourwordprocessingprogramhasadocumentthatmentionsseveralnodesbyname,youcouldselectthattext,copyit,andthendoSelectNodes→ListedinClipboardinNeticatoselectthem.
Save/Restore:YoucansavethecurrentselectionastextwithReport→ListofSelected(moreinfo),andthenrestoreitusingEdit→SelectNodes→ListedinClipboard.
Doesn’tWork:Ifyouareselectingbelief-barormeterstylenodes,thenyoushouldclickonthetitle(orname)ofthenode,sinceclickingelsewheremaybeinterpretedas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteringafinding(inwhichcasethenodewillbedarkenedinsteadofdrawnwithnegativecolors).
Links:Toselectalink,clickdirectlyonit.Itwillbecomedrawninhilitedoutlineform.Aswithnodes,iftheCTRLkeyishelddownwhileclicking,itwillreversetheselectionstatusofonlythelinksbeingclickedon,whichcanbeusedtoaddorremovefromyourcollectionofselectedlinks.Youcanalsoright-clickdirectlyonalinkandchooseSelectorDeselect.
Note:Linkscannotbeselectedbydraggingtheselectionrectangleoverthem.Nodesandlinkscannotbothbeselectedatthesametime,sowheneveryouselectlinks,anynodesthatareselectedwillbecomeunselected,andvice-versa.
MovingNodesandAutoGridTomoveanode,clickdownonit,dragittoitsnewposition,andthenreleasethemousebutton.Ifyouwishtomoveasetofnodesandthelinksbetweenthem,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodesyouwishtomove,thenclickdownononeofthemanddragthesettothenewdesiredlocation.
Thereisanunderlying“grid”ofpositions,andwhenyouaddormoveanode,thenodewillbeshiftedslightlysothatitscenterisdirectlyoveroneofthesegridpositions,providingtheAutoGridisturnedon.Thisallowsyoutoquicklydrawanetwhosenodesareperfectlyaligned,andwithlinksrunningperfectlyhorizontalorperfectlyvertical.ToturnAutoGridofforon,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggleLayout→AutoGrid.Ifyouwanttochangethespacingofthegrid,tomakeitfinerorcoarser,chooseLayout→GridSpacing,andadialogboxwillappearallowingyoutomakethesetting.
ToreturntotheoriginalspacingwhenanetisdevelopedwithAutoGridturnedoff,orifchangesaremadetogridspacing,chooseLayout→SnapToGrid.
Nudging:Sometimesitisusefultobeabletomoveanode,orsetofnodes,asmallpredictableamount.Youcanusethearrowkeystodothisnudging.Simplyselectthenodesyouwishtomove,andthenpressthekeywiththearrowinthedirectionyouwantthemtomove.Thedistancetheywillbemovedwitheachpressofthekeyisthegridspacing(providingtheAutoGridisturnedon),soyoucanadjustthisamountusingtheLayout→GridSpacingmenuentry.IftheAutoGridisturnedoffthentheywillbemovedthesmallestperceptibleamountwitheachpressofthekey.
Itisalsopossibletomoveorreshapealinkbyasmallpredictableamount(MoreInfo).
Alignment&Spacing:Toaidwithvisualcomprehensionofyournet,orwheneditinganet,usetheSpaceEvenlyandAlignfeaturesintheLayout
menu.Ifyouareworkingwithalargenet,orareinmultiple-addingmode,youcanquicklyandevenlyspaceoutaroworcolumnofnodes.First,decidewhetheryou’dlikethenodestobespacedByGaps,ByCenters,ByLeft/TopEdges,orbyUsingtheGridandselectthatoptionbychoosingLayout→SpaceEvenly.Next,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthedesirednodesandagainchooseLayout→SpaceEvenly,thistimechoosingspacingofeitherVerticallyorHorizontally.
Similarly,youcanquicklylineuprowsandcolumnsofnodes.YoucanalignnodesByCenters,ByLeft/TopEdges,orByRight/BottomEdgeswhenyouchooseLayout→Align.Then=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodestobealigned,chooseLayout→AlignagainandclickonRoworColumn.
Formoreinfoonimprovinganet’svisualappearance,seedisplaystyle.
ResizingtheNet:IfyouwouldliketochangethespacingoftheentirenetyoucanchooseLayout→SpreadOut/Compact.Enteringanynumbergreaterthan100,inthedialogboxthatcomesup,willspreadouttheentirenet,whilenumberslessthan100willcompactit.Thisoperationonlychangesthespacingbetweenthings,withoutalteringtheirsize.Byselectingsomenodespriortotheoperation,onlythosenodeswillbemoved.
ReshapingaLinkWhenanetdiagrambecomeslargeitcanbeverydifficulttoviewifallthelinksbetweenthenodesarestraightlines.Evensmalldiagramscansometimesbemademorelegiblebychoosingsuitablepathsforthelinks.
AddingBends:Toshapealink,firstclickonceonthelinktoselectit.Thelinkwillbedrawnwiththehilitecolorsurroundingit.Thenclickdownagainontheselectedlink,anddragthecursor.Abendwillbeplacedinthelinkanddraggedbythecursor.Youcanrepeatthistoaddasmanybendsasyouwish.
MovingBends:Tomovethepositionofabend,firstselectthelinkasbefore.Thelinkwillbecomehilitedandtherewillbeasquareboxateachofitsbends,andatitstwoendpoints.Tomoveabendoranendpoint,clickdowninitshilitedbox,dragittoitsnewposition,andthenreleasethemousebutton.
RemovingBends:Movingonebendintoanother,orintoanendpoint,willcombinethem,whichcanbeusedtoremovebends.Ifyouwishtoimmediatelyremoveallthebendsinsomelinks,selectthemandchooseLayout→StraightenLinks.Ifnolinksareselectedwhenyouperformthisoperation,allthelinksinthenetwillbestraightened.Anothermethodistoright-clickdirectlyonalinkandchooseStraighten.
MovingEnds:Therearesomespecialconsiderationswhenmovingtheendpointsofalink.Thearrowendofalinkcannotbedraggedveryfarfromthenodeitpointsto(ifyoutryto,thearrowwilljustbumpagainstaninvisiblebarrier).Thispreventsthecreationofmisleadinglookingdiagrams(sincethelinkisstillconsideredtobeconnectedtothenode).Ifyoudragthenon-arrowendofalinktoofarfromitsparentnode,thenthelinkwillbecome“disconnected”fromthatnode.Youcantellthishashappenedbecausethenameofthelinkwillsuddenlyappearattheendpointyouhavemoved(MoreInfo).
AutoGrid:IftheAutoGridison(thereisacheck-markinfrontoftheLayout→AutoGridmenuentry)thentheendpointsandbendsofalinkwillalwaysbeplacedongridpositionsafteramove.Thismakesiteasytoquicklydrawnetdiagramswithalignedlinksegments,andtomakesomesegmentsperfectlyhorizontalorperfectlyvertical.YoucanturntheAutoGridonoroffby=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">togglingLayout→AutoGrid,andsetthespacingofthegridwithLayout→GridSpacing.
NudgingBendsandEnds:Ifyouhavejustbeenmovingalinkbendorendpoint,andthelinkisstillselected,youcannudgethatbendorendpointalittletogetitexactlywhereyouwantbypressingtheappropriatearrowkey.Witheverypressofthekey,itwillmoveadistanceofthegridspacing,iftheAutoGridison,ortheminimumperceptibledistanceiftheAutoGridisoff.
SavingaNettoFileTosavethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenettoafile,chooseFile→SaveAsorclickthe toolbarbutton.Youwillbepromptedforthefilenameandwhatdirectorytoplaceitin.Afteryouhavesavedanet,itswindowtitlewillnolongerbe“Untitled-x”,butinsteaditwillbebasedonthenameofthefile.ThenyoucansaveitsubsequenttimesbychoosingFile→SaveorpressingCTRL+Swithoutbeingpromptedforthename.
Changed-Indicator:Ifthereisa*or+afterthetitleofthenetinitswindowtitlebar,thenitmeansthatthenethasbeenchangedsinceitwaslastreadorsaved,sothatthescreenversionisdifferentfromthefileversion.IfyouexitNeticaorclosethewindow,youwillbeaskedifyouwanttosavethechangesfirst.Whenyousavethenet,thechanged-indicatorwilldisappear.A*indicatormeanssubstantialchangeshavebeenmade,a+meansonlycosmeticchangeswere.(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_changed_indicator.htm');returnfalse;">MoreInfo)
FileFormat:ThenetnormallygetssavedasanefficientbinaryfileintheNETAformat(optionallyencrypted),withfileextension.neta.Thisfileismachineandplatformindependent,soNeticaApplicationandNeticaAPIonWindows,Linux,MacOS,Solaris,etc.usingIntel,AMD,PowerPC,ARM,etc.processorscanworkwithit.AllfutureversionsofNeticawillbeabletoopenit,andmostpastversionscanaswell(butofcoursebyignoringthenewNeticafeaturesthattheylack).
Fromthedialogboxforsavingthefile,youcanchooseanalternativeformatknownastheDNETformat(fileextension.dneor.dnet),fromthe"Saveastype:"choiceatthebottom.Itcontainsonly=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_ASCII.htm');returnfalse;">ASCIItext,soitisusefulifyouwanttoexamineoreditthefilewitha=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditor,orifitwillbereadbyotherprogramsthatunderstandDNET.AllfutureversionsofNeticawillbeabletoreadandwriteDNETfiles,andDNETfileshavethesameinteroperabilitydescribedaboveforNETAfiles.AdocumentpreciselydescribingtheDNET-1fileformatisavailablefromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsyswebsite(called“DNET_File_Format.txt”).
Cases:Tolearnaboutsavingandreadingcases,clickhere.
DeletingNodesandLinksNodes:Todeleteanodeornodes,firstselectthem,andthenpresstheDELETEkey,clickthe toolbarbutton,orchooseEdit→Delete.Alternately,youcanjust=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickanodeandchooseDelete.Thiswillremovethenodes,andalllinksfromothernodesgoingtothem.Linksgoingfromthemtotheirchildnodeswillbedisconnectedjustbeforethedeletion.Thesedisconnectedlinkswillbeselectedafterthenodesareremoved,soyoucaneasilydeletethemaswellbyjustpressingtheDELETEkeyasecondtime.
Ifyouwishtoremovethenodes,butmaintaintheglobalrelationshipoftheremainingnodes(i.e.thefull=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_joint_distribution.htm');returnfalse;">jointprobabilitydistribution),youshould=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_absorb_node.htm');returnfalse;">absorbthenodes.
Links:Todeletea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">link,clickonittoselectit,andthenpresstheDELETEkeyorchooseEdit→Delete.Todeleteaseriesoflinks,selectthemallandthenpresstheDELETEkey.Whenalinkisdeleted,theconditionalprobabilitiesofthechildnodearecollapsedtoeliminatetheirdependenceonthatparent,asiftheparenttookonitsfirststate.Whenalinkisdeletedtheparentnodeisnotaffectedinanyway.
Cut,Copy,PasteandDuplicateNodesCuttingNodes:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">Selectednodescanberemovedfromthenetandtransferredtothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboardbychoosingEdit→Cut(orpressingCTRL+X,clicking ,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingandchoosingDelete).
Alternately,theycanbeenteredintotheclipboardwithoutremovingthemfromthenetwithEdit→Copy(orpressingCTRL+C,orclicking ).
Ifnonodesareselectedwhenthecopycommandisdone,thewholenetwillbecopiedtotheclipboard.
PastingNodes:Oncethenodesareintheclipboard,youcanduplicatethemintoanynetbyopeningthewindowforthatnet,optionallyclickinginitwhereyouwantthemtobeplaced,andthenchoosingEdit→Paste(orpressingCTRL+V,orclicking ).Whencopyingfromonenetwindowtoanother,thetwowindowsmustbothbewithinthesamerunninginstanceofNetica;iftherearetwoseparateinstancesofNeticarunning,youcan'tcopyandpastebetweenthem.
Alllinksbetweenthetransferrednodes,alltheirproperties,andalltheir=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTswillbemaintainedduringthetransfers.Linksthatentercutorcopiednodesfromanodenotbeingcutorcopiedwillappearasdisconnectedlinksintheduplicate.Linksthatgofromacutorcopiednodetoanodenotbeingcutorcopied,willnotbecopied.
Netsmaybecopiedandpastedintootherprograms,suchasMicrosoftWord.
MoreInfo
Duplicate:Ifyouwanttoduplicatealargeportionofthenodes,chooseWindow→DuplicateNet(orright-clickthenetbackgroundandchooseDuplicateinNewWindow).Intheresultantnet,deleteanyofthenodesyoudon'twant.
NodeNames:Sinceeverynodenameinanetmustbeunique,anode’snamemustbechangedwhenduplicatingitintoanetalreadyhavingthatname.Neticadoesthisifnecessary,byaddinganumbertotheendoftheoldname,orincrementingthenumberiftherealreadyisone.Ofcoursenodetitlesdon’thavetobeunique,soafterduplicatingorpastingyoumayhaveseveralnodeswiththesametitle,whichyoucanchangemanually.
Right-ClickingYoucan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonnodes,linksandthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">background.Right-clickingonthebackgroundisforoperationsthatapplytothenetingeneral.Inallcases,amenuwillappearfromwhichyoucanchooseanoperation.IfyouareusingaMac,readthisFAQpagetofindaright-clickingalternative.
MenuContents:Thecontentsofthemenuswhichappearmayvaryfromtime-to-timedependingonthestatusoftheobjectbeingclickedon,andwhatotherobjectsareselected.Forinstance,theAlignitemappearsonlyifatleast2nodesareselected,andSpaceEvenlyonlyif3ormorenodesareselected.Thechoicesforaddinglinksdependonwhetherornotanynodesareselected,andwhetherornotyouclickonaselectednode(youshouldtrythethreepossibilitiestoseethedifferentwaysyoucanaddlinks).Ifyoudon'tseesomethingthatisusuallythere,trytheoverheadmenu.
Selection:Ifyouwantanoperationtoapplytoseveralnodesorlinksatonce,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthem,andthenright-clickononeoftheselectedones.Evenifsomeareselected,ifyouright-clickononethatisn'tselected,theoperationwillapplytothatoneonly.However,thereareafewmenuentriesthatalwaysapplyonlytotheelementbeingclickedon,evenifitispartofaselectedset.Theyare:Properties,SelectandDeselect(whichallowyoutoeasilyaddorremoveelementsfromtheselectedset).Moreinfoondoingoperationsonmultiplenodesatonce.
User-DefinedFields:Right-clickingprovidesagreatwaytoexamineorsettheuser-definedfieldsofanodeoranet,insteadofusingthenodepropertiesdialogbox.Right-clickonthenodeornetbackground,chooseModify→UserDefined,andamenuwillappearlistingallthefieldsforthatnodeand
theirvaluesin"field=value"form.Bychoosingoneoftheitems,youcanchangeit.Youcanevensetthefieldsforseveralnodesatonce.
Network:Ingeneral,theright-clickingmenushavethesamefunctionsastheoverheadones,buttherearesomedifferences,describedinthesectionsonaddingnodes,addingtitles/text,duplicatingthenetandselectingnodes/links.Youcanalsouseright-clickingtochangetheinternalnameofyournetbyright-clickingonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchoosingModify→Rename.Youwillberequestedtoenteran=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDnamethatwillbestoredwiththenetandusedtoidentifyitby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPI(thisisdifferentfromthenameinthetitlebar,whichisbasedonthefilenamethenetissavedto,althoughiftheinternalnameisnotset,itwillalsobebasedonthefilename).ThechoicesinthemenuModify→DefaultNodeStylesetthedefaultnodestylesforthenet(thesameastheoverheadStylemenuwhennonodesareselected).
PlacingTextonNetDiagramsYoucanputtextdirectlyonthenetdiagram,whichissuitablefortitles,comments,notes,copyrightandotherlegalnotices,small=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofnodes,warnings,directionsforusage,etc.
HowTo:Toaddatitleortexttoyournet,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchooseModify→NewTitleorNewNote.Aconstantnodewillbecreated.
Don'tUse:Ifyouhavealargeblockoftexttodocumentanet,itisbettertoplaceitinthedocumentationwindow,andifyouwanttoprovideadescriptionforanode,butnothaveitvisibleonthenetdiagram,usethenode’sdescriptionfield,orputitinastatecomment.
Color:Bydefault,textelementshavealight-bluebackground.Youcanmodifythisforthewholenetbyright-clickingonthenetbackgroundandchoosingModify→NodeSetProperties.Inthepropertiesdialogbox,clickon‘Documentation’andthenSetColor.Textelementscanbeaddedtonode-sets,soifyouwishtolinkthecoloringofatextelementtothatofsomenodes,addittothesamenode-settheyarein.Tomaketextelementsofvaryingcolor,createnewnode-setshavingthedesiredcolors.
FontandSize:Youcanalso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectsometextelements,andchangetheirfontorsizebyright-clickingonone,andchoosingStyle→Font.Itisnotpossibletohavemorethanonecoloringorfontwithinasingletextelement.
Youcanselect,search,copyandpaste,duplicate,edit,moveanddeletetextelementsinthenaturalway.Forexample,toduplicateanelement,youholddownCTRLkeyanddragit.Tochangethetextinit,youdouble-clickit.
Tips:
•Ifyouhavesometextelementsthatyouuserepeatedly,suchasacopyrightnotice,youcancopyandpastethemtotheNodePalette,foundontheWindowsmenu,sothattheywillbeavailableanytimeyouuseNetica.
•Thereareanumberofstyleoptionsavailableforimprovingtheoveralllookofyournet,whichisusefulforprintingandpresentationpurposes.
DocumentationWindowWhenyoucreateaBayesnetordecisionnet,itisusuallyagoodideatowriteashortdescriptionofit,orprovideotherwrittendocumentation,whichstaysinthesamefileasthenetitself.
Withthenetwindow=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">active,chooseWindow→DescriptionofNet,andawindowwillappearinwhichyoucanplace=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">plaintext.
Thisiscalledthenet’sdocumentationwindow,anditwillautomaticallybeclosedwhenthenetwindowisclosed.Ifthedocumentationwindowwasopenwhenthenetwaslastsaved,thenwhenthenetisnextopened,itwillautomaticallybeopenedaswell,andinthesameplaceaswhenthenetwassaved.
Tips:
•Ifyouaredistributingthenettootherpeople,makesurethedocumentationwindowisopenwhenyoulastsavethenet,sothattheyseeitrightawaywhentheyopenyournet.
•Informativetextcanalsobeplaceddirectlyonthenetdiagram,orwithinanode’sdescriptionbox.
NavigationandResizingUsingthescrollbarsyoucanmovearoundtovieworworkonvariousareasofthenet.TheHOME,END,PAGEUPandPAGEDOWNkeysandarrowkeysmaybeusedaswell.Whileyouaremovinganodeoralinkbend,youcanmakethewindowscrollbyattemptingtodragthemoutsidethewindowinthedirectionyouwishtoscroll.Thefurtheryougooutside,thefasteritscrolls.
ThefastestandmostpopularwaytonavigatetoanewspotistouseGlobalZoom.
SometimestheeasiestwaytoscrolltoanodethatyouknowthenameofistouseFind.Andyoucanjumptotheendofalinkby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingitandchoosingFindParentorFindChild.
YoucanalsoscrollbyholdingtheALTkeydownandclickingonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">background.Thecursorturnsintoahand,indicatingthatholdingthemousebuttondownanddraggingthemousewill"push"thenetdiagraminthatdirection.
GoBack:TohaveNeticaautomaticallyscrolltotheplacewhereyouwerepreviouslyediting(orclickedthemousebutton),chooseEdit→GoBack,orpressCTRL+SHIFT+G.Pressingitagainwilltakeyoutotheplacebeforethat,andsoon.Eventuallyyouwillreturntothestartingposition,soyoucanquicklycyclethroughthelast6placesvisitedbyrapidlypressingthekey.
DrawingSize:Theareawithinwhichyoucancreateanetdiagramisarectangleofcertainsize.Onceyouscrolltotheendofityoucannotscrollanyfurther.Thisareaisincreasedautomaticallywhenneeded,suchaswhendraggingorpastingnodespastitsboundary,orenlargingthewindow(includingmaximizingorzooming)biggerthanitssize.
YoucanalsomanuallychangethesizeofthisareabychoosingLayout→DrawingSize.Enteringblanksinthedialogboxthatcomesupwillmakethesizeassmallaspossibletocontaineverything.Thedrawingsizeisenteredas
thenumberofpageswidebythenumberofpagestall.Thesizeofapageisbasedonhowmuchyourprinterputsononeprintedpage,soitisinfluencedbyFile→PrinterSetup(seePrinting).
ZoomingInandOutWhenanetdiagrambecomeslarge,itishandytobeableto“zoomout”toseemoreofitinthewindowatonce.PressCTRL+>orchooseWindow→Zoom→Out.Eachtimeyoudothis,themagnificationofthedrawingwillbedecreased,soyouwillbeabletoseemoreofit.Toincreasethemagnification,pressCTRL+<orchooseWindow→Zoom→In.YoucanalsoaccesstheZoommenubyright-clickingonthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">background.
Whateverthezoommagnification,youcaneditorusethenetinthenormalway.
GlobalZoom:Neticaprovidesaveryfastandconvenientwayofobtaininganoverviewofadiagram,andquicklynavigatingtoanewpointonit,calledGlobalZoom.Whenalargenetdiagramisthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activewindow,youcanpresstheSPACEBARandholditdown.Whileitisdepressed,Neticawillzoomout,sothatthewholenetfitsinthewindow.Movethecursortothepointonthenetyouwishtoworkonnext,andthenreleasethespacebar.Neticawillzoombacktonormal,withthespotofinterestinthecenterofthescreen.
IfyouwishtouseGlobalZoomjusttogetanoverviewofthenet,butyoudon’twanttonavigatetoanewspot,thendon'tmovethemousecursoratall,orelsemoveitclearoutofthewindow,beforereleasingtheSPACEBAR.
ParticularMagnifications:YoucanzoomoutjustenoughthatthewholenetwillbedisplayedinthewindowbychoosingWindow→Zoom→ToFit.Afteranysequenceofzoomoperationsyoucanreturnto100%magnificationwithWindow→Zoom→ToNormal.
Window→Zoom→To...allowsyoutochooseanexactmagnificationamount,andWindow→Zoom→Backreturnsthemagnificationtowhatitwasbeforethelastzoomoperation.
Printing:Thezoommagnificationdoesnoteffectoutputsenttoaprinter;tochangethatmagnification,chooseFile→PrinterSetupandputblankentriesforthenumberofhorizontalandverticalpagesinthedialogboxesthatcomeupafterwards.Youwillthenbequeriedforaprintermagnification.
Tip:Oftennetsarebuiltusingalargerfont,thenasthenetsgetbigger,developersjustzoomoutabitandcontinuebuilding.Insteadbuildthenetusingaslightlysmallerfontsize,andworkatNormal(100%)zoommagnification,sinceNeticaisoptimizedforthat.
Search/FindTofindtheoccurrenceofsometextinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenet,chooseEdit→Findandenterthesearchtext.Neticawillsearchnodenames,titles,statenamesandcommentsforthetext.
WhenNeticafindsanodecontainingthesearchtextitwillscrollthewindowtothatnodeandselectthenode.Tofindthenextnodecontainingthetext,useEdit→FindNext(orpresstheF3key).Edit→FindAllwillselectallthenodescontainingthetext.
Youmayonlybeinterestedintheoccurrenceofthesearchtextinonetypeoffield;sayyouarelookingforthenodewithacertainname.AsNeticafindseachoccurrenceofthesearchtext,itprintsinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowwhereitfoundthetext.Forexample,itmightprint:"heavypressure"foundincommentofnodeDepth.SoyoucanjustwatchtheMessageswindowuntilyouseethatNeticafoundthetextinanodename.
Tips:
•Ifyouwanttoeasilyselectacertainsubsetofnodes,youcangivethemakeyword,say"$Unfinished",byputtingthatkeywordinthedescriptionofeachofthem.WheneveryouwanttoselectthemjustdoanEdit→Findon"$Unfinished",andthendoEdit→FindAll.Itisgoodtoprecedekeywordswithsomespecialsymbol,like‘$’,sothesearchcan’tbeconfusedbynodetitles,statenames,etc.,andyouwillrememberitisbeingusedasakeyword.However,usuallyabettermethodtoworkwithsetsofnodesistonode-setsandselectthembasedontheirnode-setnames.
•Youcanmakeaprintedlistofallthenodescontainingcertaintext,byfirstdoingaFindAllsearchonthattext,thenwiththenodesstillselected,
chooseReport→ListofSelected.MoreInfo
SelectingNodes/LinksbyPropertiesInadditiontothewaysformanuallyselectingnodesorlinks,youcanmakeselectionsbasedonthepropertiesorrelationshipsofnodesorlinks.
BychoosingEdit→SelectNodesfromtheoverheadmenu,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchoosingSelectNodes,youwillbepresentedwithalistofthefollowingoptions:
SelectNodes→All-Allthenodesincludingconstantnodes,andalsotitlesandnotes.
InvertSelection-Nodesthatarecurrentlyunselected(andde-selectsthosethatareselected).
InNodeSet-Thenodesthataremembersofthechosennode-set.
ListedinClipboard-Thosenodeswhosename(nottitle)appearspreciselyinthetextyouhavejustcopiedtothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboard(multiplenodesshouldbeseparatedbycommasor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_whitespace.htm');returnfalse;">whitespaces).
MatchSearchString-Allnodeswhosename,titleorstatenameortitle,ornodedescriptioncontainsthesearchtext(whichyouwillbeaskedfor).
WithTables-Anynodeswhose=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTtableor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontableiscompletelyfilledin.
IncompleteTables-AnynodeswhoseCPTtableorfunctiontableisnotcompletelyfilledin(i.e.,containssomeblankentries).
WithEquations-Nodesthathavean=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equationdefined.
WithFindings-Nodeswithanytypeoffinding("evidence"),includingpositive,negativeorlikelihood("virtual")findings.
LikelihoodFindings-Nodeswithonlya=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">likelihoodfinding("virtualevidence"),ormultiplelikelihoodfindingsthataren'tequivalenttoasingle=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefinding.
Parents-Allnodesthathavealinkpointingtosomecurrentlyselectednode.
Ancestors-Allnodesthathaveapathofforward-pointinglinkstosomecurrentlyselectednode.
Children-Allnodesthathavealinkcomingfromsomecurrentlyselectednode.
Descendents-Allnodesthathaveapathofforward-pointinglinksfromsomecurrentlyselectednode.
Connected-Nodesthathaveapathoflinks(ignoringdirections)tosomecurrentlyselectednode.
Info(D-)Connected-Thenodeswhosebeliefscouldchangeifafindingwereobtainedforacurrentlyselectednode,basedonthegraphconnectivity(orvice-versa).Thesearethenodesthatarenot=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_d_separation.htm');returnfalse;">d-separatedwiththecurrentselection.YoucoulduseInvertSelectionafterthisoperationtofindthenodesthatared-separated.
MarkovBoundary-Nodesinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Markov_boundary.htm');returnfalse;">Markovboundaryofcurrentlyselectednodes.If=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefindingsareobtainedfortheMarkovboundarynodes,thenthevaluesofthecurrentlyselectednodeswillnotprovideanyadditionalinformationaboutanyothernodeinthenet.
SelectLinks→All-Allthelinksinthenet.
Disconnected-Allthelinksinthenetwhichhavebeen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_disconnected_link.htm');returnfalse;">disconnectedfromtheirparents.
Ineffectual-Allthelinksinthenetwhichhavenoinfluenceonanyinferenceresults,becausetheyare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_ineffectual_link.htm');returnfalse;">ineffectual.
Entering-Alllinksdirectlyenteringanodewhichiscurrentlyselected(i.e.hasaselectednodeasachild).
Exiting-Alllinksdirectlyexitinganodewhichiscurrentlyselected(i.e.hasaselectednodeasaparent).
Interconnecting-Thelinkswhichdirectlyinter-connectthecurrentlyselectednodes(i.e.havebothachildandaparentwhichisselected).
Cyclecontaining-Ifthereisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_cycle.htm');returnfalse;">directedcycleinthenet,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingwillbedisallowed,andthishelpstofindit.Selectalinkinthecycle(perhapsasreportedbyanerrormessage),andusethisoperationtoselecttherestofthecycle.
OneOperation,MultipleNodesNormallyyoumodifyanodeusingthenodepropertiesdialogbox,whichallowsyoutochangeanyofthepropertiesofasinglenode.However,sometimesyouwanttomakethesamechangetoseveralnodesatonce.WithNetica,youcanadd,remove,renameorreorderstates,changediscretizationthresholds,enterfindings,enteruser-definedfields,changenode-sets,etc.toasmanynodesaswish,withoneoperation.
HowTo:Selectthedesirednodes,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickononeofthem,andmakeachoicefromthemenu.Anychoiceyoumakewillapplytoallthenodes,exceptforthechoices:Select,DeselectandProperties.
EnteringFindings:Whenseveralnodesareselectedandyouright-clickononeandchooseEnterFindings,youwillbepresentedwithamenuthatlistsallthestatesofallthenodesselected,withanyfindingsalreadyenteredhavingcheck-marks.Ifyouchooseastatefromthelist,theneverynodehavingthatstatewillgetitenteredasafinding,whiletheotherselectednodeswillnothavetheirfindingchanged.Ifyouwanttheotherfindingsremoved,thenyoushouldfirstchooseEnterFinding→Unknown(Retract),andthenthedesiredfinding.Iftheselectednodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousnodes,thenyoucanenteranumericfindingforthemallsimultaneouslyusingEnterFinding→NumericValue.
SettingStates:Thereare4choicesforchangingthestatesofanodeavailablefromtheModifymenu:AddState,DeleteState,RenameStateandSetStates.Thefirst3arefairlystraightforward;theyadjustalleffected=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTstoproducetheleastdisturbancepossible.InthecaseofAddStateandRenamestate=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">inferenceresultswillnotbeeffectedatall.SetStateshasthemorecomplexbehaviour:
•Ifthenewstateshaveexactlythesamenamesastheoldones,andthereisthesamenumberofthem,butjustinadifferentorder,itre-ordersthestatesandallrelatedstructures(suchas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">staterealvaluesandCPTs),sothatallinferenceresultswillbeunaffected.•Otherwise,iftherearethesamenumberofstates,itjustrenamesthestates(soinferenceresultswillbeunaffected).Warning:Ifthereareadifferentnumberofstates,allrelatedstructures(suchas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">staterealvalues,statetitlesandCPTs)areremoved,whichofcoursewilleffectinferenceresults.Ifyouwanttokeepthetables,thenyouneedtouseModify→AddStateorModify→DeleteStateinstead.
User-DefinedFields:Asdescribedontheright-clickingpage,youcansetuserfieldsofanodebyright-clickingandchoosingModify→UserDefined.Ifyouclickononeofseveralselectednodes,thenamenuwillappearlistingallthefieldsalreadydefinedforatleastoneoftheselectednodes.Bychoosingafield,youcansetitsvalue.Ifthefieldwasoriginallydefinedforonlysomeofthenodes,Neticawillaskyouifyouwanttochangethevalueofonlythosenodes,orwhetheryouwanttoaddthefieldtoallthenodes.Ifyoumakeafieldempty,Neticawillaskyouwhetheryouwantittorepresentanemptyfield,orifyouwantthefieldremoved,whichyoucanusetoremovefieldsfromalargesetofnodesatonce.Likewise,youcanaddafieldtoalargenumberofnodesbychoosingModify→UserDefined→Enter,andthenenteringthenameofthenewfield.
NodePropertiesThischapterexplainshowtousethenodedialogboxtovieworchangethepropertiesofanode.Youcanpagethroughtheentirechapterusingthe>>buttonabove,seeawrittendescriptionofwhereinformationis,orjumpdirectlytooneofthefollowingtopics:
•NodeDialogBox•ButtonsintheNodeDialogBox•NodeName•NodeTitle•NodeisDiscreteorContinuous•NodeKind•NodeStates•NodeStateInterval•NodeStateValue•User-DefinedFields
NodeDialogBoxPurpose:Youusethenodedialogboxtochangethepropertiesofanode(e.g.itsname,orhowmany=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">statesithas).Tochangethewayanodeisrelatedtoitsparents(e.g.,itsconditionalprobabilities),usethetabledialogboxinstead,andtochangethecolorofanode,seeNodeColoring.
Obtaining:Double-clickanodetoobtainitsnodedialogbox,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonitandchooseProperties,orselectitandpresstheENTERkey.Thelattermethodisveryusefulwhenaddingnewnodestoanet,sincewhenanodehasjustbeenaddeditisalreadyselected,andyoujustneedtopressENTER.
Thenodedialogboxcanbeusedtosetanode's:•Name •Statenumbers
•Title •Stateintervals(discretization)
•States •User-definedfields
OtherFields:Atthebottomofthenodedialogboxisatexteditingbox,calledthemultipurposebox,withinwhichyoucanvieworchangesomeothernodeproperties,aschosenbythe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_multipurpose_selector.htm');return
false;">multipurposeselector.
Buttons:Bypressingthe selector,youcanchoosethenodekindfromtheoptionslisted.Ifyouclickthe selector,youcanchangethenodefromdiscretetocontinuous.MakingachangewithinthedialogboxdoesnotaffectthenodeuntiltheApplyorOkaybuttonispressed(moreinfoontheright-handbuttons).
Multiple:Youmayhaveseveralnodedialogboxesonthescreenatthesametime,andyoumayalternatebetweenusingdifferentnodedialogboxesandworkingdirectlyinthenetwindow.Eachnodedialogboxpertainstoasingleparticularnode,butyoucanhavemorethanoneofthemforthesamenode.
ButtonsintheNodeDialogBoxApply&Okay:Whenyoumakechangesinthenodedialogbox,theydon’taffectthenodeuntilyouclicktheApplyorOkaybutton.Thenallthesettingsaretransferredtothenodeinthenet.TheApplyandtheOkaybuttonshavethesamefunction,excepttheOkaybuttonalsoremovesthedialogboxaftertransferringthesettings.
Reset:ClickingtheResetbuttonwillmakeallthesettingsinthedialogboxthesameasthenodeinthenet.Ifsomeexternaloperationchangesthenodeinthenet,thesettingsinthedialogboxaren'tchangedtoreflectthatuntiltheResetbuttonispressed.
Close:IfyouclicktheClosebuttonorthe buttoninthetitlebar,thenodedialogboxwillberemoved.Ifyoupreviouslymadesomechangesinit,andhaven’tpressedtheApplybutton,Neticawillaskifyouwanttoapplythosechangesfirst.
Table:ClickingtheTablebuttonwillbringupthetabledialogboxforthesamenode,tovieworedititstables(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPT,experience,etc.).
Help:WhenyouclicktheHelpbutton,itwillbringuptheNodeDialogpageofthisHelpsystem.
NodeNameYoucanchangethenameofanodeusingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_node_name.htm');returnfalse;">“Name”texteditboxofthenode’sdialogbox.Whenthedialogboxfirstappears,theexistingnameofthenodeisselected,soifyoujusttypeanewnameitwillreplacetheexistingname.
Whenyouenteranewnodename,Neticawillcheckthatitmeetstherestrictionsofan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname.Ifyouwanttocircumventtheserestrictions,youcanalsogivethenodeatitle.
Note:Whenanode’snameischanged,Neticawillautomaticallyadjusttheequationofthenodeandtheequationsofallit’schildrennodes.
NodeTitleThenodedialogboxhasatexteditboxlabeled=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_node_title.htm');returnfalse;">“Title”toprovideanunrestrictedalternativetothenode’sname(whichmustbean=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname).Youcanchoosewhetherthename,titleorbothareusedtolabelanodeonnetdiagrams.
Therearenorestrictionsonwhatyoumayputinatitle,andbyusingtheENTERkeyyoucanmakethetitlemorethanonelinelong.Keepinmindthatsomeunusualcharactersmaydisplaydifferentlywhenthefontischanged,orifthenetisdisplayedonanothertypeofcomputer.Nodetitlesmaycontaincharactersfromanylanguage.
Nodesarenotrequiredtohavetitles.Ifanodedoesnothaveatitle,thenanytimethatNeticawouldnormallyuseatitle,itwillusethenode’snameinstead.Thetitleisonlyusedtolabelthenode;anythingmoredetailedshouldgointhedescriptionofthenode.
Tips:
•Ifthetitleislongerortallerthanthetextentrybox,youcanscrollitusingthearrowkeys.•=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">Right-clickwhileeditingatitletoobtainapop-upmenuforcopying,pasting,etc.•Byputtingablanklineatthebeginningorendofthetitle,orputtingaspacecharacteratthebeginningorendofatitleline,youcaneffectivelyaddsomespacebetweentheoutsideborderofanodeandthewritingwithin.
NodeisDiscreteorContinuousThenodedialogboxhasaselector: withthevaluesContinuousandDiscrete,whichallowsyoutochoosewhetherthenoderepresentsa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariable.
Itiscommontohaveacontinuousvariablethatyouwanttobreakupintointervalssothatyoucantreatitasadiscretevariable,whichisknownasdiscretizingthevariable.Ifthevariableistrulycontinuous,itisusuallybesttomakeitacontinuousnode,andthendiscretizeitwithanintervallist,ratherthanjustmakingita=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenode.Thisprovidesbetterdocumentationofthenode,andmakesiteasierifatalatertimeyouwanttodiscretizeitanotherway(i.e.withadifferentnumberofstates,ordifferentcutoffpointsforthestateintervals).Also,thatwayitcanacceptcontinuousvalueswhenlearningfromcases,orgeneratethemwhensimulatingcases.
Alternately,adiscretenodemayhavenumericquantitiesattachedtoeachstate,sothateachstatecanrepresentanumber,butthevariableisincapableofrepresentingnumbersbetweenthoseofeachstate.MoreInfo.
Note:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">Utilitynodesmustbecontinuousand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodesmustbediscrete.
NodeKindDirectlybelowthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_node_name.htm');returnfalse;">nameentryareaofthenodedialogboxisaselector .Clickonittobringupthenodekindsmenu:
.
Youcanuseittoturnthenodeintoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_Glossary_NR.htm#nature');returnfalse;">naturenode,constantnode,decisionnode,orutilitynode(alsoknownasa“valuenode”).
Naturenodesarecalleddeterministicnodeswhentheirrelationshipwiththeirparentsisdeterministic,orchancenodeswhentherelationshipisprobabilistic.Neticawillautomaticallydetermineifanaturenodeisdeterministicandifso,willdrawathickborderwheninlabeled-boxstyle,andcoloritinthe"-Deterministic"node-setcolor(ifyouhaven'tmadeothernode-setshigherpriority).
WhenanetiscomposedentirelyofnaturenodesitiscalledaBayesnet(alsoknownasa“beliefnetwork”).Ifitalsohasdecisionandutilitynodes,itiscalledadecisionnet(alsoknownasan“influencediagram”).=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">Decisionnodesrepresentvariablesthatthedecisionmakercancontrol,and=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynodesrepresentvariablesthedecisionmakeristryingtooptimize.
AlternativeWays:Youcanalsochangenodekindsstraightfromthenet
windowwithoutusinganodedialogbox.Todothis,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectanodeorsetofnodesyouwishtochange,andwhileholdingdowntheCTRLkeyclickthetoolbarbuttonindicatingthekindofnodeyouwishthemtobecome: fornaturenodes, fordecisionnodes,or forutilitynodes.
Or,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickoverthenode(orselectednodes)andchooseModify→Kind.
NodeStatesInthenodedialogbox,nexttothelabel=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_states.htm');returnfalse;">“State”,isadown-arrowwhichyieldsapop-upmenuofthenode’s=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">states.Bychoosingastatefromthemenu,itbecomesthecurrentstateofthenodedialogbox.Itsnamewillappearinthetexteditboxtotherightofthepop-upmenu,allowingyoutomodifyit.
Thestatesofanodeconstitutethedomainofacategoricalvariable.Theyarenotrequiredtohavenames,butifonestateisnamedthentheyallmustbe.Itishighlyrecommendedthata=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenodebegivenstatenames,forclarityanddocumentationpurposes,althoughitisnotnecessaryfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizedcontinuousnodes.
StateName:Whenyouenteranewstatename,Neticawillcheckthatitmeetstherestrictionsofan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname.Also,itmustbedifferentfromthenamesofallotherstatesofthatnode,althoughitmaybethesameasastatenameforadifferentnodeinthenet.Ifyouneedunrestrictedlabels,usestatetitles.
Adding/Removing:Toaddanewstaterightafterthecurrentstate,clicktheNewbutton,andtodeletethecurrentstate,clicktheDeletebutton.Alldiscretenodesmusthaveatleastonestate,butthereisnoupperlimittohowmanytheycanhave.AddingorremovingseveralstatestoanodeatonceisusuallydonemoreconvenientlybyusingtheMulti-PurposeBox,andadding
orremovingastatefromseveralnodesatonceisbestdonebyright-clicking.
MultipleNodes:Changingthestatesofanode,ormanynodesatonce,canbedonequicklyandeasilyby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonanode,oragroupof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectednodes,andchoosingModifytodooneofthefollowingoperations:AddState,DeleteState,RenameState,andSetStates(moreinfo).
Ifyouareaddingastatetomultiplenodes,andsomeofthemalreadyhaveastateofthatname,theywillsimplybeskipped.Iftheexistingstateshave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">numericvaluesdefined,andyouenteranumber,thenyouwillbegiventheoptionofaddingstateswiththatnumericvalue,orstatestitledwiththenumber.
Seealso:OrderingStates
OrderingStatesRight-clickonanode(orifyouwanttodoseveral,selectthemandthenright-clickononeofthem),thenchoosefromthemenuModify→OrderStates→ByName,ifyouwanttheminalphabeticalorder.
Ifyouwanttheminsomeotherorder,chooseModify→OrderStates→StandardOrder.Todefinewhatstandardorderis,editthetextfile"StateOrder.txt".ItislocatedinthesamedirectoryasNetica.exe,whichcanbediscoveredbychoosingHelp→AboutNetica,andthenlookingintheMessageswindow.Youcanuseanytexteditor,suchasNotePad,oryoucanchoosefromtheNeticamenuFile→OpenAsText.
Inthefile,thestatenamesortitlesappearone-per-line,intheorderyouwouldlikethemtohaveinthenode.Viewingtheexistingfilewillmakeitclear.
Ifyouwanttohaveadifferent"StateOrder.txt"fileforsomeparticularsetofBayesnets,thenyoucanputoneinthesamefolderasthoseBayesnets,andNeticawilllookforittherefirst.
Whenre-orderingthestates,Neticawillfirsttrytomatchthestatetitleagainsttheentryinthe"StateOrder"file,andifnotfound,thenthestatename.Ifsomeentriesinthe"StateOrder"filedifferonlybyupper/lowercaseofsomecharacters,Neticawillproperlyconsiderthecasewhileordering(i.e.casesensitive).Howeverifthereisnoexactmatchbycase,butthefilecontainsanentrythatisalllowercase,thenNeticawilldoacase-insensitivematch.Forthatreasonentriesinthe"StateOrder"fileoftenallappearinalllowercase.
Ifyouchangethe"StateOrder"file,youneedtore-openanyBayesnetsforwhichyouwereorderingstatesforthenewfiletotakeeffect.
NodeStateIntervalIfanodedialogboxisfora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousnode,immediatelybelowthestatenameeditboxwillbeboxeslabeled“Interval”.Thesearetoprovide=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_threshold.htm');returnfalse;">thresholdvaluesfortheintervalsofeachstateinorderto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizethecontinuousvariable.Thismethodofenteringthethresholdsismainlyjustfortouch-upwork,ortocoordinatetherangeswithstatenames,sinceusuallythresholdsareenteredusingtheMulti-PurposeBox.
Theboxtotheleftisthelowerendoftheintervalforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_current_state_node_dialog.htm');returnfalse;">currentstate(inclusive),andtheboxtotherightistheupperendoftheinterval(exclusive).
Tosetorchangetheintervalofthecurrentstatesimplytypeanumberintheappropriatebox.Statesarearrangedinacontiguousand(increasingordecreasing)monotonicway,whichmeansthattheupperendofonestateintervalwillalwaysbethelowerendofintervaloftheneighboringstate.Asyoutypeoneofthesein,Neticawillfillintheotheraswell,sothatwhenyouchangethecurrentstateyouwillseethenumberyoujustenteredinoneoftheIntervalboxes.
Itisokayifthelowerandupperboundsofanintervalarethesamenumber,toindicateapoint.Thenumbersyouentermaybeintegers,decimalnumbers,scientificnotationnumbers,“infinity”,or“-infinity”.
NodeStateValueIfanodedialogboxisfora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenode,immediatelybelowthestatenameeditboxwillbeaboxlabeled“Value”.Thisistoassociateanintegerorarealnumbervaluewitheachstate.Thatnumbercanbeanythingyouchoose,andshouldnotbeconfusedwiththestateindex,whichisanintegerstartingat0forthefirststate,andincreasingbyoneforeachsubsequentstate.
Usuallyyouwillnotneedtoassignnumberstostates,butsometimesitisuseful.Forexample,thenumbersmayrepresenthowmanyheadswereobtainedin4cointosses.Asanotherexample,inabang-bangcontrolsystem,state0(“Off”)maymapto-0.2volts,andstate1(“On”)maymapto6.0volts.Ifthisnodeistheparentofanodewithan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equation,thentherealvalueswillbesuppliedtotheequation.
Tosetorchangetherealnumberassociatedwiththe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_current_state_node_dialog.htm');returnfalse;">currentstatesimplytypeanumberinthebox.YoumayfinditeasiertousetheMulti-PurposeBoxtoenterorchangetherealnumberassociatedwithastate.Youcanalsochangethisnumberbyright-clickingonanunselecteddiscretenode(oraselectionofnodes)andchoosingModify→NumericStateValues.moreinfo
Tips:
•Tocreateanewnodewithnodestatevaluesalreadyassigned,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandthenchooseModify→NewNode→Nature-NumericDiscrete.Inthedialogboxthatcomesupyoucanuseshorthandnotationlike[5,10]+1.
•Ifthe"numbers"youareassigningasnodestatevalueshavenorealnumericsignificance(e.g.theyarejustidentifyingnumbers),thenyoumaywanttomakethemnodestatetitlesinstead,sothatNeticadoesn'ttrytointerpretthemasnumbers.
•IfyouneedtoadjustNeticanodestobeabletoreadacasefileinwhichacategoricalvariableisindicatedwithintegers(forexample,daysoftheweekbeing1to7,orgenderbeing1or2),youcanassigntheappropriateintegertoeachstateofthenodeasthestatevalue.
User-DefinedFieldsSometimesitisusefultobeabletodefineyourownfieldsfornodesornets,withnamesthatyouchoose,andgivethemthekindofvaluesyouwant(integers,realnumbers,ortext).Thesehavesometimesbeencalledattribute-valuepairs,andaresavedintheBayesnetfilealongwiththerestoftheinformationaboutthenodesandnet.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPIcanalsoreadandsetuser-definedfields,sotheyareagreatwaytocommunicatewithyourownprogramthroughNeticaApplicationandthenNeticaAPI.
Therearetwowaystoworkwithuser-definedfields.ThefirstisdescribedinapageontheNodePropertiesDialog.Thesecondisdescribedbelow.
Setting:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">Right-clickonanodeandchooseUserDefined→Entertocreateanewuserfield,orUserDefined→fieldnametochangethevalueofanexistingone.Ifyoucreateanewuserfield,Neticawillverifythatitsnamemeetstherequirementsofan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname.Youcandothesamethingtoseveralnodesatonceby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingthembeforeright-clickingoneofthem,andyoucandoittothenetitselfbyright-clickingonthenet's=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchoosingModify→UserDefined→fieldname.
Observing:Toobservethevaluesassignedtouserfieldsofanodeornet,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickthenodeornetbackgroundandchooseUserDefined.Thevalueswillappearwithinthemenu.Iftheyaretoolargeforthemenu,orcontainspecialcharacters,youcanusetheNodePropertiesDialoginstead.
Removing:Toremoveafieldfromanode,right-clickthenodeandchooseUserDefined→fieldname.Whenthedialogboxaskingforthevaluecomesup,makeitemptyandpressOkay.ThenNeticawillaskyouifyoujustwantanemptyvalue,orifyouwanttoremovethefield.Youcandothesamethingtoseveralnodesatoncebyselectingthembeforeright-clickingoneofthem,andyoucandoittothenetitselfbyright-clickingonthenet'sbackgroundandchoosingModify→UserDefined→fieldname.
Tips:
•Ifyouwanttodefinethesameuser-fieldforseveralnodesatonce,butgivethemeachdifferentvalues:Selectthenodes,right-clickandchooseUserDefined→Enter,enterthenameyouwantforthefieldandpressOkay,thenleavethevalueboxemptyandpressOkay,No.Nowgotoeachnodeandright-click,thenchooseUserDefined→fieldname.Youwillbeabletokeeptrackofwhichonesyou'vealreadyentered,basedonwhichareempty.
•Forcategorizingnodes,ratherthanuser-definedfields,youmaywanttousenode-sets,sinceNeticahassomespecializedfeaturesforworkingwiththem,suchas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingallthenodesinsomenode-set,reportingallthenodesinanode-set,andchoosingdisplaycolorsbasedonnode-sets.
•Iftherearesomanyuserfieldsthatitisdifficultchoosingthenamefromamenu,insteadofchoosingUserDefined→fieldname,youcanchooseUserDefined→Enter,andthentypethenameoftheuserfieldyouwanttoviewormodify.
Multi PurposeBoxAtthebottomofthenodedialogboxisatexteditboxwithaselectoraboveit(calledthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_multipurpose_selector.htm');returnfalse;">multi-purposeselector).Thisboxisusedtovieworenterseveraldifferentpropertiesofthenode,andtheselectoristochoosewhichpropertytovieworenter.Thechoicesare:
•Description•Equation•Thresholds(fordiscretization)•StateNumbers•States•StateTitles•StateComments•Input(link)Name•Delay•Author•WhenChanged•UserDefined
Toscrollinthetexteditbox,clickdownwithintheboxandthendragthecursorinthedirectionyouwishtoscroll,orusethearrowkeystoattempttomovetheinsertionbarpastthebox’sboundary.
Ifyouhavealargeamountoftexttoedit,youmightfinditeasiertocreateitinaregular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditor,andthencutandpasteitintothemulti-purposebox.
NodeDescription–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoDescription,youcanenterorviewthedescriptionofthenode.Thedescriptionisanunrestrictedblockofplaintextwhichcanbeusedtostorewhateverinformationaboutthenodeyouwish,suchasitsmeaning,themeaningsofitsstates,howitistobemeasured,theoriginofitsprobabilities,copyrightinformation,etc.Thedescriptioniscurrentlylimitedtoabout30thousandcharacters.
Descriptiveinformationaboutanodecanalsoappeardirectlyonthenetdiagram.Whereasdescriptiveinformationrelativetotheentirenetshouldappearinthedocumentationwindow.
Inaddition,youcaninsertacommentthatwillcomeupdirectlyintheBayesnetwheneveryourestthecursoroveraspecificnode.Todothis,intheDescriptionfield,enclosethedesiredcaptionwithsquarebracketsandstars,forexample:
[*desiredcaptiontobedisplayed*]
NodeEquation–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoEquation,youcanvieworentertheprobabilisticordeterministicequationthatprovidestherelationbetweenthenodeanditsparents.
Formoreinformationonequations,see:UsingEquations,EquationSyntaxorBuilt-InFunctions
NodeDiscretization–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoDiscretization,youcanenterorviewthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizationthresholdsofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousvariable(ifthevariableis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretethenthemenuwon'thavea"Discretization"choice).YoucanalsodothisoperationusingtheIntervalsettingboxes,whichhavethesamecapabilitiesandeffect.However,usuallythebelowmethodismoreconvenient,especiallyifyouwanttoentermanyevenlyspacedvalues,orifyouwanttopasteinthethresholdsofallthestatesatonce,whichyouhavecopiedfromanothernodeorevenfromanotherprogram.
Yousimplyenteralltheintervalthresholdsintothebox,separatedbyspace(s),tabs,commasoronseparatelines.Thereshouldbeonemorenumberthanthedesirednumberofstates,sincethefirstandlastnumberspecifytheminimumandmaximumvaluesthevariablecantake(theycanbe"infinity"or"-infinity"ifdesired).Ifthenumberofstatesimpliedbythelistisdifferentfromthenode’scurrentnumberofstates,thenode’snumberofstateswillbechanged.
ShortcutNotation:Ifyouwanttocreatealistofevenlyspacedvaluesthereareafewshortcutmethodsyoucanuse.Eachofthefollowingspecialnotationswillexpandintoalistofnumbersasdescribed:
[b,e]/nwillformalistbeginningwithb,endingwithe,andhavingnintervals(son+1numbers).
[b,e]+dwillformalistbeginningwithb,endingwithe,andeachseparatedbyd(exceptthelastseparationmaybelessife–bisnotevenlydivisiblebyd).
[b,e]/Lnwillformalistbeginningwithb,endingwithe,anddividedlogarithmicallyintonintervals(son+1numbers).
[b,e]+%dwillformalistbeginningwithb,endingwithe,andeachbeingdpercentbiggerthantheprevious(exceptthelastmaybelessthand%bigger,iftheydon’tfitevenly).
Note:Ifeislessthanbthenadecreasinglistwillbeformed,butnanddshouldstillbeenteredaspositivenumbers.Theclosingbracketmaybereplacedwithaclosingparenthesisifdesired,toindicateexcludingtheendpointefromthelistformed.Morethanoneoftheabovenotationscanbecombinedtoformalongerlist.
Examples:Eachlinebelowisacompleteexampleentry:
-3.2011e4infinity
[0,10]/10
[0,10)+1,[10,20)+2,[20,30)+3,33,37
[1e6,1]/L6
[200,10]+%15
NodeStates–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoStates,youcanenterorviewhowmanystatesthenodehas,andwhattheirnamesare.YoucanalsodotheseoperationsusingtheStateNamesettingbox,whichhasthesamecapabilitiesandeffect.However,usuallyyouwillfindthismethodmoreconvenient,especiallyifyouwanttopasteinthenamesofallthestatesatonce,whichyouhavecopiedfromanothernodeorevenfromanotherprogram.
Yousimplyenterthenamesofallthestatesintothebox,separatedbyspace(s),tabs,commasoronseparatelines.Ifthenumberofstatesinthelistisdifferentfromthenode’scurrentnumberofstates,thenode’snumberofstateswillbechanged.
Anexampleentryis:lowmediumhigh
Thisoperationcanalsobeperformedbyusingtheright-clickmenu.YoucanRenameorDeleteStatesbyright-clickingonasingleorgroupofnodesandchoosingModify.Adialogboxwillcomeupaskingwhichstateyouwanttorenameordelete.MoreInfo
NodeStateNumbers–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoStateNumbers,youcanassignanumbertoeachstateofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariable,orviewthecurrentassignments(ifthevariableis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousthenthemenuwon'thavea"StateNumbers"choice).YoucanalsodothisoperationusingtheStateValuesettingbox,whichhasthesamecapabilitiesandeffect.However,themulti-purposeboxisusuallymoreconvenient,especiallyifyouwanttoentermanyevenlyspacedvalues,orifyouwanttopasteinthenumbersofallthestatesatonce,whichyouhavecopiedfromanothernodeorevenfromanotherprogram.(moreinfoonstatenumbers)
Yousimplyenterallthenumbersintothebox,separatedbyspace(s),tabs,commasoronseparatelines.Thereshouldbeonenumberforeachdesiredstate.Ifthenumberofstatesimpliedbythelistisdifferentfromthenode’scurrentnumberofstates,thenode’snumberofstateswillbechanged.
ShortcutNotation:Ifyouwanttoquicklycreatealistofevenlyspacedvalues,youcanusethesameshorthandnotationasusedfordiscretizinganode.
StateTitles–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoStateTitles,youcanenterorviewthetitleofeachnode.
Therearenorestrictionsonwhatyoumayputinatitle,andbyusingtheENTERkeyyoucanmakethetitlemorethanonelinelong.Keepinmindthatsomeunusualcharactersmaydisplaydifferentlywhenthefontischanged,orifthenetisdisplayedonanothertypeofcomputer.
Statesarenotrequiredtohavetitles.Ifastatedoesnothaveatitle,thenanytimethatNeticawouldnormallyuseatitle,itwillusethestate’snameinstead.Thetitleisonlyusedtolabelthestate;anythingmoredetailedshouldgointhestatecommentsofthenode.
StateComments–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoStateComment,youcanenterorviewcommentsspecifictoeachstateofthenode.Foreachstatelisted,youcanenterspecificcommentsaboutwhatthatstatemeans,orthepurposebehindhavingthestate.Therearenorestrictionsonwhatyoumayputinacomment.
Inaddition,youcaninsertacommentthatwillcomeupwithintheBayesnetwhenyourestthecursoroveraspecificstate.Todothis,inthestatecommentfield,enclosethedesiredcommentwithsquarebracketsandstars,forexample:
[*desiredcommenttobedisplayed*]
InputName–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoInputName,youcanvieworenteranameforeachofthelinksgoingtothenode.AssoonasyousettheselectortoInputName,anadditionalselectorwillappeartotherightofit.Eachchoiceofthenewselectorwillcorrespondtoalink,andwillbelabeledwiththecurrentlinknameifthelinkhasone(inparenthesis),and/orthenameoftheparentnodeitcomesfromifthelinkisnotdisconnected.
Makeachoicefromtheright-handselector,andthenentertheinput-nameintheboxbelow(itmustbealegal=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname).
Inputnamesareusedfornetlibrariesandequations.
Theinputnamewillappearonthenetdiagramwhenyouhoverthecursoroveritslink.
Note:YoucanalsosetInputNamesby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingalink(s)andchoosingInputName.
LinkDelay–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoLinkDelay,youcanvieworenteratime-delayforeachofthelinksgoingtothenode.AssoonasyousettheselectortoLinkDelay,anadditionalselectorwillappeartotherightofit.Eachchoiceofthenewselectorwillcorrespondtoalink,andwillbelabeledwiththelinknameifthereisone,and/orthenameoftheparentnodeitcomesfromifthelinkisnotdisconnected.
ThepurposeofaddingalinkdelayisforcreatingadynamicBayesnet.
Note:Youcanalsosetlinkdelaysby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickinga=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_link.htm');returnfalse;">selectionoflinksandchoosingDelay.
Author–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoAuthor,youcanenterorviewtheauthororsourceofinformationspecifictoanode.
ThisisausefulfunctionwhentherearemultiplepeopleinvolvedinbuildingtheBayesnet.
WhenChanged–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoWhenChanged,youcanviewthetimeanddatethenodewaslastchanged,basedontheclockinyourcomputer.Thisvalueissimilartotheonemaintainedbyyourcomputeroperatingsystemforwheneachfilewaslastchanged,butitcanbemoreusefulforBayesnetssinceitactuallyrecordsthetimeofchange,notjustthetimeoffilesaving,anditprovidesaseparatevalueforeachnode.Youcannotchangethisvalue;itisforobservationonly.Ifnovalueappears,itmeansthatthetimeofthelastchangewasnotsavedintheBayesnetfile,andthenodehasnotbeenchangedsincereadingfromfile.
UserDefined–Multi-PurposeBoxWhenthemulti-purposeselectorofanodedialogboxissettoUserDefined,youcanenterandviewuser-definedfieldsofthenode.
HowTo:Forthefirstfield,youwillneedtoclickNewField…twice.Adialogboxwillcomeupaskingyoutoenteranameforthenewfield(Neticawillverifyitmeetstherequirementsofan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname).
Onceanewfieldisdefined,enteritsvalueinthelargetextspace.Youcanenteranumberoranytext;ifthetextislong,youmightwanttopasteitin.ContinueenteringnewfieldsorclickOkaytoexitthenodedialogbox.
Removal:Ifyoumaketheentryempty,thenNeticawillaskyouwhetheryouwantittobeafieldsettoempty,orwhetheryouwantthefieldremoved.
BetterWay:Formanyoperationsonuser-definedfields,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickmenusofferamoreconvenientmethod.
NodeTablesThefollowingchapterdiscussesthetablesrepresentingtherelationshipbetweennodesandtheirparents,andhowtovieworchangethosetables.Youcanpagethroughtheentirechapterusingthebrowsebuttonabove,seeawrittendescriptionofwhereinformationis,orjumpdirectlytooneofthefollowingtopics:
•TableDialogBox•MeaningoftheTables•ChangingTableEntries•ButtonsintheTableDialogBox•NodeSelector•Deterministic/ChanceSelector•KindsofTables•ScrollingandNavigating•EmptyCells•CellsContainingX•Selecting,CopyingandPastingCells•TableMenuCommands•ChangingColumnOrder•MultipleDialogBoxesforOneNode
TableDialogBoxPurpose:YouusetheTableDialogBoxtoenter,changeorviewthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationshipofanodewithitsparents(i.e.its=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTs).Choosingwhichnodesaregoingtobethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsisnotdonewiththisdialogbox,butratherbyaddinglinks.Anodedoesnotspecifyarelationwithits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">childnodes,sincethoserelationsarespecifiedatthechildnodes.Ifyouwanttherelationtobespecifiedbyan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equation,orifyouwanttochangethepropertiesofanode(e.g.itsname,orwhatstatesithas),usethenodedialogboxinstead.
Obtaining:Obtainatabledialogboxforanodebyselectingit,andthenchoosingTable→View/Edit,clickingthetoolbuttonwiththe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_relation_symbol.htm');returnfalse;">relationsymbol: ,orby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthenodeandchoosingTable.
Table:Therelationshipisexpressedintheformofatable.Thefollowingdescribeswhatthetableentriesmean,howtochangethem,howtoselect,copyandpastethem,howtoscrollandresizethetable,andhowtoreorderitscolumns.
KindsofTables:Thetabledialogboxcanbeusedtovieworeditseveraldifferentkindsoftablesforthenode,whichyouchoosewiththetableselector.Thenode's=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontableorconditionalprobabilitytable(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPT)arethemostcommonlyused,butifyouhaveNeticalearningfromdataorconnectingtoadatabase,thenits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_experience.htm');returnfalse;">experiencetable,unnormalizedprobabilitytableandcountstablewillbeofinterest.
Controls:Makingachangewithinthedialogboxdoesnotaffectthenodeuntilthecorrectbuttonispressed.Thereareselectorstochoosethenodetoworkon,andtomakeitdeterministicorprobabilistic.Thereareseveralmenucommandsthatcanmodifythetable.
Multiple:Youmayhaveseveraltabledialogboxesonthescreenatthesametime,andyoumayalternatebetweenusingdifferenttabledialogboxes,differentnodedialogboxes,andworkingdirectlyinthenetwindow.Touseoneofthetabledialogboxesitmustbethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activewindow.Youmayevenhavemorethanonetabledialogboxforthesamenode.
MeaningoftheTablesForaBayesordecisionnettobefullyspecified,everynatureandutilitynodemusthaveafilled-intable.Eachtableexpressesthevalueofthenodeintermsofits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parents(orasaconstantifthenodehasnoparents).Ifthenodeis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicthenthetablewillbeafunctionwhichprovidesavalueforthechildforeachpossibleconfigurationofparentvalues.Ifthenodeisprobabilistic(i.e.a=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_chance_node.htm');returnfalse;">chancenode),thenthetablewillprovideaprobabilityforeachstateofthechild,foreachpossibleconfigurationofparentvalues.
Forexample,supposenodeA(whichcantakeonvaluesLow,MediumorHigh)andnodeB(whichcantakeonvaluesTrueorFalse)arethetwoparentsofnodeC(whichcantakeonvaluesSmall,MidsizeorLarge).ItisbesttothinkoftherelationbetweenthemasbeinglocatedatnodeC(thechild),anditstabledialogboxmightlooksomethinglikethis:
Ontheleft-handsideisaverticallistofalltheconfigurationsofparentvalues.Ontheright-handsideisonecolumnforeachstateofC.ThenumbersinthetableprovideconditionalprobabilitiesforthevaluesofC,giventhattheparentstakeontheconfigurationoftheirrow.Forexample,the10.000(percent)intheupperleftcornermeansthatP(C=Small|A=Low,B=True)=0.1.Thenumber3.2e-12atthebottomrightmeansP(C=Large|A=High,B=False)=3.2x10^-14.
Emptycellsindicateprobabilitiesthathavenotyetbeenspecified.Examplesarethetwoblankcellsonthethirdrow.
CellswithXindicateanimpossiblecondition.Forexamplethethreex’sonthefifthrowindicatethatthedesignerbelievesthattheconditionA=HighwhileB=Trueisimpossible.
ChangingTableEntriesPurpose:Youwilloftenbringupatabledialogboxjusttoviewtherelationitrepresents.Forexample,ifyouhavejustsolvedadecisionnet,youcanuseittoviewtheoptimaldecisionfunctionsthatNeticahasfound.However,itsmainpurposeistoenterorchangenoderelationswhenbuildingaBayesnetordecisionnet,ordoingwhat-ifanalysiswithanexistingnet.
Deterministic:Ifthedialogboxisforadeterministicrelation,thenyouchangeatableentry(alsoknownasacellofthetable)simplybyclickingdownontopofit,andthenmakingachoicefromthepop-upmenuwhichappears.
Probabilistic:Ifthedialogboxisforaprobabilisticrelation,thenyouchangeaprobabilitybyclickingonittoselectit,andthentypinginthenewnumber.Oryoucanclickonittoselectit,thenclickwithintheselectionwhereyouwanttochangeafewdigits.Youcanenterthenumbersasdecimalfractions(e.g.0.25)orpercentages(e.g.25)bychangingthetableselector.
Navigating:Whenacellisbeingedited,theinsertionpointwillbeflashingwherenewdigitswillenter.Youcanuse←or→keystomoveitaroundwithinthenumber,andifitgetstotheedgeofthenumber,itwilljumptothenextcellinthatdirection.Furtherpresseswilljumptosubsequentcellsinthatdirection.The↑and↓arrowkeyscanbeusedinthesamewaytojumptocellsaboveorbelowthecurrentlyselectedoreditedcell.PressingtheTABkeyjumpstothe“next”cell,whichisthecelltotherightofthecurrentone,unlessitisattheendoftheline,inwhichcaseitisthefirstcellonthenextline.Anotherwaytonavigate,usefulinlargetables,istopicktheparentvalue.
Multiple:ChooseTable→EnterExperiencetoenteruniformexperiencetablesforall=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectednodesatonce.
ButtonsintheTableDialogBoxApply&Okay:Whenyoumakechangesinthetabledialogbox,theydonotaffectthenodeuntilyouclicktheApplyorOkaybutton.Thenallthesettingsaretransferredtothenodeinthenet.TheApplyandtheOkaybuttonshavethesamefunction,excepttheOkaybuttonalsoremovesthedialogboxaftertransferringthesettings.
Reset:ClickingtheResetbuttonwilltransferthecurrentvaluesfromthenodeinthenettothedialogbox.Therearetwomainusesforthisbutton.Thefirstisifyoumakeamistakewhileyouarechangingthetable,andyouhaven’tyetclickedtheApplybutton,youcan“revert”totheoriginalnodebyclickingtheResetbutton(ifyouhavealreadyclickedtheApplybutton,youshouldmakethenetwindow=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">active,doanEdit→Undo,thengobacktothetabledialogboxandclickReset).ThesecondusefortheResetbuttonistoupdatethetabledialogboxaftersomethingelsehaschangedtherelationofthenode.
Forexample,youmightbesolvingadecisionnetrepeatedly,whilevaryingsomepartofit.Aftereachsolutionyouwanttoseehowtheoptimaldecisionfunctionhaschanged.Youwouldbringupthetabledialogboxforadecisionnode,leaveitup,andaftereachre-solutionofthenetyouwouldclicktheResetbuttontoobservethechangesinthetables.AnotherexampleisthatyouarehavingNeticalearnaBayesnetfromanumberofcasefiles,andyouwanttoobservehowtheconditionalprobabilitieschangeasthelearningprocesscontinues.
Changed*:Ifyoumakeanychangestothetable,buthavenotyetpressedeithertheApplyorOkaybutton,thena*willbedisplayedinthewindow'stitlebartoshowthatthetableiscurrentlydifferentfromthatofthenodeinthenet.Ifinsteadthenodeinthenetischangedbysomethingelse(suchaslearningfromdata,solvinganoptimization,anothertabledialogbox,etc.),thenanasteriskinparenthesisisplacedinthewindow'stitlebar:(*)
Close:IfyouclicktheClosebutton,orthe buttoninthetitlebar,orchooseFile→Closewhilethedialogis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">active,thenitwillberemoved.Ifyoupreviouslymadesomechangesinit,andhaven’tclickedtheApplybutton,Neticawillaskifyouwanttoapplythosechangesfirst.
NodeSelectorYoucanswitchwhichnodeatabledialogboxisfor,byusingitspop-upmenulabeled“Node”.Fromthismenuyoucanchooseanynodeinthenet,andwhenyoudo,thecontentsofthedialogboxwillbecompletelyre-adjustedforthenewnode.
Ifyouhavemadechangesinthedialogboxbeforeswitchingnodes,andhavenotyetpressedtheApplybutton,thenamessagewillbepresentedaskingifyouwanttoapplythechangesbeforeswitchingnodes.
Deterministic/ChanceSelectorThetabledialogboxhasaselectorthatallowsyoutomakeanaturenode=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_chance_node.htm');returnfalse;">probabilistic(i.e.achancenode).Ifyouusethisselectorbeforeyouhaveenteredanythingintothetable,itwilljustmodifythedialogboxtobesuitableforenteringdeterministicorprobabilisticinformation.Ifyouhavealreadyenteredarelation,thattablewillbeconverted.
Convertingadeterministictabletoaprobabilisticrepresentationissimple:eachrowoftheresultwillconsistofallzeroes,exceptasingle100%entryatthestatetheoriginaldeterministicfunctionmappedto.
Convertingaprobabilisticrelationshiptoadeterministiconegenerallylosessomeinformation.Foreachparentconfigurationthedeterministicvaluewillbethestatethatwasmostlikelyintheprobabilistictable(i.e.hadthehighest=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobability).
KindsofTablesThetableselector allowschoosingbetweenthedifferenttypesoftablesthatanodecanhave:afunctiontable,conditionalprobabilitytable(viewedwithdecimalorpercentagenumbers),experiencetable,unnormalizedprobabilitytableandacountstable.
Can'tSet:Theonlytypeoftablethatadeterministicnodecanhaveisafunctiontable,soifthedeterministicselectortotheleftofthetableselectorissetto"Deterministic",anychoiceofthetableselectorotherthan"Function"willjustresultinabeepandanexplanatorymessagegoingtothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindow.Iftheleftselectorissetto"Chance"instead,thenanychoicefromtherightselectorisokay,except"Function",whichisthentheonethatresultsinabeep.
FunctionTable:Thefunctiontableallowsonlyasingleoutputvalueforeachpossiblesetofparentvalues(i.e.amathematical"function").Ifthenodeisdiscrete,thenthereareafinitenumberofchoicesandNeticaletsyouenterthembyclickingonatablecellandthenchoosingfromapopupmenu.Ifthenodeiscontinuous,notdiscretized(suchasautilitynode),thenNeticaletsyouenterarealnumberineachcell.
ConditionalProbabilityTable(CPT):Thesearethemostcommontablestoworkwith,andaredescribedindetailontheotherpagesofthischapter.Theyprovideaprobabilityforeachstateofthenode,giventheconditionspecifiedbytherow(i.e.eachparentnodehavingsomevalue),sotheprobabilitiesofeachrowmustsumtoone.Youcanenterthemasdecimalfractionsorpercentages,dependingonwhetherthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_selector.htm');returnfalse;">tableselectorissettoProbabilityor%Probability.
ExperienceTable:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_experience.htm');returnfalse;">Experience
tablesprovideoneconfidencenumberforeachrowofthetable.Experiencenumbersmustnotbenegative,andanexperienceofzerocorrespondstoanimpossiblecondition(arowofXsintheCPT).Experiencenumbersmeanapproximatelytheequivalentnumberofmatchingcasesseen.Experiencenumbersaregeneratedasthenormalizationfactorsofthe"Unnormalizedtable",whichinturnistheCountstablewithaconstantbaseexperienceaddedtoeachcell(usually1).
CountsTable:Thesearetheactualcountsofmatchesduringthelearningprocess,sotheyaregenerallyintegers(e.g.therewere7instancesmatchingthistablecell).However,theywillhaveafractionalpartifthecasefilehada"NumCases"columncontainingfractions,alearningdegreeotherthan1wasused,thetablewashardenedorsoftened,amoreadvancedlearningalgorithmlikeEMorgradientdescentwasusedorafractionalstartingexperiencewasenteredbeforelearning.
ScrollingandNavigatingSinceanodemayhaveverymanyparentconfigurations,theyoftenwon’tallbevisibleinthetabledialogboxatonce.Youcanusethescrollbarstoviewwhateverpartofthelistyouarecurrentlyinterestedin.TheHOME,END,PAGEUPandPAGEDOWNkeysmaybeusedaswell.
Resizing:Youcanalsoresizethetabledialogboxtomakeitbiggerorsmallerbyclickingintheboxatthelowerrightcorner,oronthewindowedgeanddraggingtothenewsize.Whenyoufirstbringupthetabledialogbox,itisconstructedwithasizetomatchthetablesrequiredforthenodeitsfor.Ifyouchangewhichnodethedialogboxisfor,itissometimesconvenienttoresizethedialogboxaswell.
LargeTables:Tablesfornodeswithseveralparentsmayhaveagreatnumberofrows,makingitdifficulttoscrolltotherowyouwant.By=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonastate-namewithinarow,andchoosinganewstatenamefromthemenu,thetablewillautomaticallyscrollsothatanewrowreplacesthatsameposition.Thenewrowwillhaveallparentswiththesamestateastheoriginalrow,exceptthestatethatwaschanged.Bystartingwiththeleft-mostcolumnandsettingastateforeachcolumn,anysettingofparentvaluesmaybeobtained,scrollingtorevealthatrow.Youcanchangewhetheryouwantthetablebasedonstatenames,statetitles,ornumericlevelsbymakingachoiceabovethedividinglineofthemenuthatappearswhenyouright-click.
Remember,youcanalsochangetheorderofcolumnsifyouwantto.
EmptyCellsIfacellofthetabledialogboxtableisblank,itmeansthatthevalueofthecellhasnotbeenspecified.YoumaybebuildingupanetoveranumberofsessionswithNetica,andyoucanusetheemptycellstokeeptrackofwhichpartsofthetablehavenotyetbeenentered.
Newtablesstartoutwithallemptycells,andyoucansetanycellorgroupofcellstoemptybyselectingthecellsandthenpressingtheDELETEkeyorchoosingEdit→Delete.Ifthenodeisdeterministic,youcansetacelltoemptybychoosing“Unknown”fromthepop-upmenuwhichappearswhenyouclickonthecell.
Ifyoudoinference(e.g.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating)withanetthathasnodetableswithemptycells,Neticawillconsiderthemtobeuniform,andgiveyouawarning=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">message.Neticacanfindanddisplayallthenodeswhosetableshaveoneormoreemptycells.(moreinfo)
CellsContainingXMeaning:AcellofthetabledialogboxtablewithjustanXinitindicatesthatnovalueisrequiredforthecell,becausethatconfigurationofparentvalueswillneveroccur.Itactuallydoesn’tsayanythingabouttherelationshipathand,butjustthatwhoeverwasbuildingtheBayesnetdidn’tfeelitwasnecessarytoenteravaluebecauseinthecontextoftheoverallnetitisnotrequired.IfNeticaislaterdoinginferenceanddiscoversthatconfigurationofparentvaluescanoccur,itwillalertyouwithamessageinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">messageswindow.
Importance:Ifyouputanyarbitraryvalueinsuchacell,allinferenceresultswillbethesame,becausethevaluewillnotbeused.Thebestvaluetoputinthecellisthetruevaluethatwouldbeapplicableiftherelationshipbetweentheparentswasdifferent,butifthatvaluedoesn’texist,oryoudon’tknowit,ordon’thavetimetodetermineit,itismuchbettertousetheXfeaturethantojustputinanarbitraryvalue,forthreereasons.First,duringinferenceNeticaperformsanimportantcheckforyouastowhethertheconfigurationisreallyimpossible.Second,itdocumentsyourunderstandingatthetimeyouwerebuildingtheBayesnetforanyoneelsewholaterworkswithit.Third,ifyoulaterchangeotherpartsofthenet,oryoucopyandpastethisnodeintoadifferentnet,orputitinanetfragmentlibrary,thoseparentconfigurationsmaybecomepossible.
Setting:YoucansetacelltoXbyselectingthecellandthentypingX(foraprobabilistictable),orbychoosing‘Impossible’fromthecell’spop-upmenu(foradeterministictable).Forprobabilistictables,ifonecellhasanX,thenallthecellsinthatrowmusthaveanX(becausetheyallcorrespondtothesameparentconfiguration).
GettingCPTsfromTextFilesIfyouwantNeticatolearntheCPTsbasedondatarecordsintextfiles,seethechapteronlearninginstead;hereweobtainactualprobabilitynumbersdirectlyfromtextfiles.
Thereareafewwaysto"import"entireCPTstothenetworkfromfiles:
1.Cut&Paste:Ifthetableisintab-delimitedform,witheachrowcorrespondingtothevariousstatesofthechildnode,youcanjustpasteitintothetabledialogboxforthenode.First,readthetablewithatexteditingprogram(e.g.wordprocessor,orchooseFile→OpenasText).SelecttheentiretableandchooseEdit→Copy.
Thenopenthetableeditorforthechildnode(Table→View/Edit),andselecttheupperleftcell(byright-clickingit,orbyleft-clickinganddraggingatinydistancewithinit).Thecellshouldturnblack.FinallychooseEdit→Paste,andtheentiretablewillbefilled.
Yourtableinthetextfilemustusethesameorderofparentsasinthetabledialogbox.Iftheyaren'tthesame,youcanadjustthecolumnsbeforehandjustbyclickinganddragginginitsheading.
Youcanalsocopyandpasteinasimilarwayfromaspreadsheetprogram,suchasExcel.
2.Makeasimulated"casefile":with1rowforeachentryoftheCPTtable(i.e.theCartesianproductoftheparentsandthechildnodeitself).Thatmeansthatifthechildnodehasnstates,therewillbentimesasmanyrowsinyoursimulatedcasefileastherearerowsintheCPTtable.
ThefirstcolumnofthecasefileshouldbeNumCases,andinthatcolumnyouplacetheCPTprobabilities.
ThenchooseCases→Learn→IncorpCaseFile,anditwillreadtheprobabilitiesinasthefrequencyforeachcase.YouwillneedtoTable→Hardenwithadegreeof1afterwards.Or,youcanmultiplyalltheprobabilitiesinthecasefilebysomelargenumber(thesamenumberforone),soitisasifyouarepresentingNeticawithasetofcaseswhoseprobabilitydistributionmatchestheCPTnumbers.
3.Usea.dnefile:SavetheBayesnetasa.dnefile(fromtheSaveAsdialogbox,choosednefromthemenuinthebox,ormakethefilenameendwith.dne).Thenopenthe.dnefilewithatexteditor.Itwillbequitereadable,andyoushouldeasilybeabletofindthetableforthenodeinquestion.(ifthereisnotablethere,youmaywanttocreateadummytableinNeticabeforehandwithTable→Uniform).Simplycopythewholetableastext,andthenpastetoreplacethetableinthe.dnefile.Thetableinyourtextfilemustbecomma-delimited,witheachrowcorrespondingtothestatesofthechildnode,andtherowsinodometerordercorrespondingtothesameorderofparentnodesasisshowninthe.dnefile(youcanre-ordertheparentsasdescribedabove).Don'tworryaboutthecommentsthatwereoneachlineofthe.dnefile(i.e.,thepartsstartingwith"//");theyaren'tneeded.
4.WriteaProgram:Ifyouwantittobeanautomatedprocess,youcanwriteaprogramthatreadsthetextfile,andthendoescallstoNeticaAPItofilltheCPTTables.
Selecting,CopyingandPastingCellsTodooperationsonasubsetofcellsinthetabledialogbox,youfirstselectthem,whichwillhilitethem.
Selecting:Toselectcellsofanumerictable,clickdowninonecell,anddragthemousetoanothercellbeforereleasingthemousebutton.Whileyouaremovingthemouse,allthecellsintherectanglebetweentheoriginalcellandthecurrentmousepositionwillbehilited.Thecellyoufirstclickdowninmustnotbethecellyouarecurrentlyediting(i.e.theonlyselectedcell,orthecellwiththeinsertionpointblinkinginit)orNeticawillthinkthatyouaredoinganoperationtoeditjustthatcell.Youcandragoutsidethewindowboundarytoforceautoscrolling.Onceaselectionismade,youcanholddowntheSHIFTkeywhileyouclickonanothercelltoextendorreducetheselection.Toselectwholerowsatatime,clickattheleftedgeoftherow(justtotherightofthedoubleline)anddragupordown.
Deterministic:Selectingcellsofadeterministictableisdoneinthesameway,exceptonlyselectionbyrowsisallowed(ifyouclickdowninacellyouwillgetapop-upmenuinstead).
Copy&PasteMultiple:Afteryouhaveselectedsomecells,youcancopytheirvaluestothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboardbychoosingEdit→Copy(orpressingashortcutkey,orclicking ).Toplacethosevaluesinsomeothercells,selectthecellsandchooseEdit→Paste(orpressCTRL+Vorclick ).Ifthepasteregionislargerthanthecopyregion,thecontentsofthecopyregionwillberepeatedhorizontallyand/orverticallytofillthepasteregion(youwillbegivenanoticeiftheyarenotanevenintegermultiple).Ifthepasteregionissmallerthanthecopyregion,youwillbegivenanoticeandthetruncatedcontentswillbepasted.Insteadofselectingthewholepasteregion,youmayfinditeasiertojustselecttheupper-leftmostcellofwhereyouwantthecontentspasted.
Copy&PasteSingle:Selectasinglecellbyclickingdownonitandslightlydraggingthemouse-pointerwithinthecell(ifyoudon'tdrag,Neticawillinsteadpreparethecellforediting),orrightclickthecell.Aswithnodes,youcancut,copyorpastesinglecells.Selectthecellandchooseacommandfrom
theEditmenu,orpresstheequivalentshortcutkey.
OtherPrograms:YoucancopyandpastebackandforthbetweentheNeticatableandaspreadsheet,suchasExcel,orawordprocessingprogram.Ifeachrowofprobabilitiesbeingpasteddoesn'texactlyadduptoone,thendoanormalizecommandafterpasting.Neticacellscopiedtotheclipboardareenteredastext,withatabbetweeneachentryonthesameline,andacarriage-return/line-feedpairattheendofeveryline.Whencopyingfromawordprocessoror=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditortoNetica,theformatshouldbethesame,exceptspace(s)and/oracommamaybesubstitutedforeachtab,andline-feed(s)maybesubstitutedforcarriagereturns.Blanklineswillbeignored.
WholeTablesIncludingNames:TopastewholeCPTtablesintoExcel(oranotherprogram),maketheBayesnetwindow=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activeand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggleonReport→TabSeparatorsandReport→CopytoClipboard(andifdesired,toggleoffReport→ToMessagesWindow).Then=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenode(s)youareinterestedin,chooseReport→CPTTables,clickacellintheExcelspreadsheet,andthenpressCTRL+VorEdit→Paste.YoucancontrolwhetheryouwantthenamesofthenodesandstatesincludedbytogglingReport→IncludeNames.
TableMenuCommandsWhileworkinginatabledialogbox,theTablemenuisoftenuseful.Selectsomecellsorrowsyouwishtooperateon,andthenchooseacommandfromthemenu(ifnocellsareselected,thecommandisappliedtoallthecells).
Table→FillinMissingentersaprobabilityintoemptycellssothattheprobabilitiesofeachselectedrowaddupto1.0(i.e.100%).Anyrowhavingnoemptycells,morethanoneemptycell,orXcellswillsimplybeignored.Thecorrespondingtoolbarbuttonistheonewiththenumberenteringtheemptycell: .
Table→UniformProbabilitieswillsettheselectedrowsofaprobabilitytabletouniformprobabilityvectors,whichmeansthatallstatesofthenodeareequallyprobable.Soallthecellsoftheserowswillcontainthenumber1/(numberofstates),expressedasapercentage.
Table→Randomizeworksonprobabilisticordeterministictables.Fordeterministictablesitsetseachselectedcelltoonepickedrandomlyfromthepossiblestatesofthenode,followingauniformdistribution(i.e.eachstateequallyprobable).Forprobabilistictablesitsetsthecellsofeachselectedrowtorandomlyselectedprobabilities.Ofcourse,theprobabilitiesofeachrowwilladdto1.0(i.e.100%).Thedistributionoftheprobabilitiesenteredisnotuniform(itfavorsnumberscloserto0inanattempttobettermatchrealisticdistributions).Thecorrespondingtoolbarbuttonhasonedieoverthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_relation_symbol.htm');returnfalse;">relationsymbol:
Table→Removewillconvertalltheselectedcellstoemptycells.Ifthereareselectedcells,thenpressingtheDELETEkeywillhavethesameeffect.Thetoolbarbuttonconsistsofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_relation_symbol.htm');returnfalse;">relationsymbolcoveredbyaredX:
Table→BuildFromOtherNetwillbuildthecptsofyourcurrentnetbasedonthecptsofanothernet.Moreinfo
Manyofthesecommandscanalsobedonefromthenetwindow,withoutusinganytabledialogbox,byselectingthenodesofinterest,andthenchoosingthemenucommandfromtheTablemenu.Itwillapplytotheentiretableofalltheselectednodes.
ChangingColumnOrderYoucanusethetabledialogboxofanodetochangetheorderingofitsstates,andofitsparents.Thiscanbeveryusefulforviewingandeditingthetables,andNeticawillmakeallrequiredre-arrangementstotablestoensurethatinferenceresultswillnotbeeffected.
HowTo:First,bringupthetabledialogboxforanode(e.g.by=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonit,andchoosingTable).Clickdownonthenameofthestateorparentnodethatyouwishtomoveinthegraybarofcolumntitles.Themousepointerwillturnintoadoublearrowasyouholddowntheleftmousebutton.Youcandragthecolumntitletoitsnewposition,thenreleasethemousebutton.
Whenyouchangetheorderofthenode'sstatesinthedialogbox,thatchangeimmediatelyeffectsthenodeinthenet,withoutpressingtheApplyorOkaybutton.Toreversetheeffectofthere-ordering,makethenetwindow=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">active,andperformaregular"Undo",forexamplebychoosingEdit→Undofromthemenu.
Whenyouchangetheorderofthenode'sparents,thestructureofthetablewillbesuitablychangedwithinthetabledialogbox.Thenewarrangementofprobabilitiescansometimesprovideusefulinsights.Ifyouareeditingthetable,thenewarrangementofrowsmaymakeiteasiertoselectadesiredrangeofrowsforsomeoperation,ortocopyandpasterangesofrows.WhenyoupresstheApplyorOkaybutton,theneworderingwillbetransferredtothenodeinthenet,sothatinthefuturewhenyoubringupthetabledialog,itwillhavethatordering.Asusual,youcanalways"undo"fromthenetwindow.
Sinceeachtabledialogboxmaintainsitsownparentordering,youcanhavemorethanonedialogboxopenatatimeforasinglenode,withadifferentparentorderingineachone,andworkandviewinterchangeablybetween
them.Inthatcasethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_changed_indicator.htm');returnfalse;">changedindicatorcanbeveryusefulforkeepingtrackofwhatisgoingon.
MultipleDialogBoxesforOneNodeYoumayhavemorethanonetabledialogbox(ornodedialogbox)forthesamenode.Thiscanbeconfusingifyouarenotcareful,soitisnotrecommendedunlessyouneedit(Neticawillaskyoubeforehand).
However,insomesituationsitisveryuseful.Eachdialogboxstoresallthesettingsforitsnodeanddoesn’tlosethemwhenyoumakechangesinanothernodedialogboxortothenodeitself(unlessyoupresstheResetbutton).Soyoucanhaveseveraldifferentsettingsforanode,onesetineachdialogbox,andalternatebetweenthemjustbypressingtheApplybuttononthedialogboxofchoice.Ofcourseyoucandoallkindsofotheroperationsinbetween(suchascompilingthenet,savingittoafile,makingqueries,undoinganoperation,etc.).
Youopenmultipledialogboxesforanodeinthesamewayasyouopenasingledialogbox.Justdotheactionrepetitivelywithoutclosingthepreviousdialogboxesfirst,andanswer‘no’tothequestionofwhetheryouwanttobringtheexistingdialogboxtothefront.
CasesThesetofall=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsenteredintothenodesofasingleBayesnetisreferredtoasacase.Acaseusuallyprovidessomeinformationaboutaparticularobject,person,event,thing,etc.
Neticahasfacilitiesforworkingwithcases,includingtheabilitytosaveacase(i.e.allthecurrentpositivefindings)fromaBayesnettoafile.Laterthosefindingscanbere-enteredintotheBayesnetbyreadingthefile.
Casefilesmayconsistofmanycases(actingasadatabase,inwhicheachcaseisadatabaserecord).YoucanuseNeticatolearnthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofaBayesnetfromsuchafileofcases.NeticacanalsogenerateafileofcaseswhichmatchtheprobabilitydistributionofaBayesnet,whiletakingaccountoffindingscurrentlyentered.Thereareanumberofotherwaystocreatemulti-casefiles.
Neticacanpassthroughafileofcases,applyingBayesnetinferencetoeachcasetogeneratenewinformationaboutit,andthensavingthecasewiththeadditionalinformationtoanewcasefile,whichisknownasprocessingcases.ItcanalsouseacasefiletotesttheperformanceofaBayesnet,finding=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_error_rate.htm');returnfalse;">errorrates,logloss,etc.,whichisknownastestinganetwithcases.
Example1:Inamedicalexample,eachcasemightcorrespondtoacertainpatient.Whenyouwanttoworkwithanewpatient,yousavealltheinformationgatheredforthefirstpatientintoacasefilebeforeremovingitfromthenet,perhapsusingthepatient’snameasafilename.Whenitcomestimetoreconsiderthefirstpatient-perhapssomelabresultshavearrived-youjustreadthatperson’scasefile.
Example2:Foranotherexample,eachcasecouldbeapoliticalriding.Thefindingswouldbedetailsaboutthatriding(suchasdemographics,poll
statistics,etc.),andtheBayesnetcouldbeusedtopredictthepercentageofvoteseachpoliticalpartywillgetinthenextelection.Asnewinformationaboutaridingarrived,itscasefilewouldbekeptupdated.
WorkingwithCasesEntering:ToenteracaseinaBayesnet,simplyentereachofitsfindings.
Removing:Toremovethecurrentcasefromabeliefnet,makesurenonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,andchooseCases→RemoveFindings,orclickthe toolbarbutton.Itwillleavethenetwithnofindingsentered,andifitisan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_auto_update.htm');returnfalse;">auto-updatingnet,thenitsbeliefswillbeupdatedtoreflectthat.IfsomenodesareselectedwhenyouchooseRemoveFindings,thenonlythefindingsforthosenodeswillbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">retracted.
Saving:Youcansavecasesinfilesandreadthembackin.
Reporting:Tocreateatexttableshowingthecurrentcase,useReport→Findings.UsingotherchoicesontheReportmenuyoucancontrolitsappearanceanddestination.Tolocateallthenodesthathaveanyfinding,orjustalikelihoodfinding,youcanselectthem.
SavingandReadingCasesSaving:Tosaveinafileallthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsfromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenet,makesurenonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,chooseCases→SaveCaseAs,orclick ,andthenenterthefilename.Ifsomenodesareselected,thenonlythefindingsfortheselectednodeswillbesaved,andNeticawillbeepandputanoticeinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowthatthewholecasewasn’tsaved.Later,ifyoumakechangestothecaseyoucanchooseCases→SaveCase.
SavingMulti-case:CurrentlyNeticaisunabletosaveacasetoamulti-casefile,butthereareotheroptionsforcreatingmulti-casefiles.
Reading:Tolaterreadthecasebackintoitsoriginalnet,makethatnet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">active,ensurethatnonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,chooseCases→GetCaseorclick andselectthecasefilefromthestandarddialogboxwhichappears.Anyexistingfindingsinthenetwillberemoved,thefilewillberead,andthefindingsenteredintothenet.Ifthenetis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_auto_update.htm');returnfalse;">auto-updating,thenbeliefupdatingwillbedoneautomaticallytoaccountforthefindingsof
thecase.
IfsomenodesareselectedwhenyouchooseCases→GetCase,thenNeticaonlyremovesfindingsandreadsnewonesfortheselectednodes(italsobeepsandputsanoticeinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowthatthewholecasewasn’tread).
Youcanalsoreadacasefromthecommandline.
ReadingMulti-case:Ifyoureadfromafilewithmorethanonecaseinit,thenNeticawillaskyouwhichcaseyouwant.PressingSHIFT+F8getsthepreviouscase.IfthecasefilestoresIDnumsthenNeticawillaskforone,otherwiseitwillaskforthepositionofthecase.
PressingtheF8keygenerallyproducesthesameresultaschoosingCases→GetCasefromthemenu,exceptifacasehasjustbeenreadfromamulti-casefile.ThenF8willautomaticallygetthenextcasewithoutopeninganydialogboxes,whichmakesitconvenienttobrowsethecasesonebyone.Neticaprintsthecase’snumberintheMessageswindow.
DifferentNet:Itispossibletoreadacaseintoadifferentnetthantheoneitwasoriginallysavedfrom.Findingsfromnodesoftheoldnetwillbeenteredintonodesofthesamenameinthenewnet(thetitlesofthenodesareignored).Thestatenamesofthenodes(ifpresent)shouldalsobethesame.Anyfindingsnotcorrespondingtoanodeinthenewnetwillsimplybeignored.Allnamecomparisonsarecase-sensitive.
NumericValues:Realnumbervaluesthatyouhave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredasfindingsfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizedcontinuousnodesaresavedincasefiles,ratherthanjustthestatetheycorrespondto.Thisenablesreadingthecaseintoanothernetwhosenodeforthatvariablehasbeendiscretizedinadifferentway.
MissingState:Ifyoureadinacase,andthecasefilehasavaluethatisn’t
anyofthestatesofthecorrespondingnodeinthenet,thenanerrormessagewillbedisplayed.Forexample,ifnode‘color’hasthestates‘red’and’green’,andinthecasefilethevalueforcoloris‘blue’,themessagewillbedisplayed.Anexceptiontothisoccursifoneofthestatesofthenetnodeisnamed‘other’.Thenthecasewillbereadwithouterror,andthefindingforthenodewillbe‘other’.(moreinfo)
CreatingCaseFilesIfyouwanttocreateacasefilecontainingasinglecase,youcanjustenterthecaseasfindingsintoaBayesnet,andthensaveittofilefromNetica.Tocreateafilecontainingmanycases,thereareseveraloptions.
WordProcessor:Onepossibilityistousea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditororawordprocessingprogram,andmanuallyconstructitaccordingtotheCASE-1format.Besuretosaveitasa“TextOnly”fileifyouuseawordprocessingprogram.
Spreadsheet:IfthedataisinaspreadsheetprogramsuchasExcel,usuallyyoucanjustcopythedatafromthespreadsheettothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboard,andthenpasteitintothetexteditorwindow,anditwillcomeoutintherequiredformat.YouwillhavetoaddthetwoheaderlinesdescribedintheCASE-1format.Oryoucanexportitfromthespreadsheetastext.Inthatcaseyoumayonlyhavetoaddthe“//~>[CASE1]>~”headerline.Alternatively,youcanlearnfromExcel.
Database:Mostdatabaseprogramshaveanoptiontoexportdatainthefromof“flatfiles”oftext.Suchfilesaresuitableascasefiles,withtheadditionoftheheaderlinesdescribedabove.
Simulation:Ifyouwishtocreateamulti-casefileconsistingofrandomcasessampledfromtheprobabilitydistributionrepresentedbyaBayesnet,Neticacanmakeitautomatically.
Programming:Anotherwaytocreateamulti-casefileistowriteacomputerprogramthatcreatesit.Usingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPIProgrammer’sLibraryisespeciallyusefulforthispurpose,sinceitcancreatesuchafilewithjustafewfunctioncalls.Itcanalsobeusedtoupdateand
otherwisemaintaincasefiles,andtoreadthemanddoBayesnetlearningandinferenceusingthem.
CaseFileFormatStructure:Casefiles(single-caseormulti-case)arepureASCII=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_file.htm');returnfalse;">textfiles.Theymaycontain“//~>[CASE1]>~”oratime-authorstamp,somewhereinthefirst3lines,butthatisnotnormallypresent.Thencomesalineconsistingofheadingsforthecolumns.Eachheadingcorrespondstoonevariableofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">case,andisthenameofthenodeusedtorepresentthevariable(sometimesthevariablesarecalledattributesandtheentriesinthecolumnvalues,i.e.attribute-value).Theheadingsareseparatedbyspacesand/ortabs(itdoesn’tmatterhowmany).Thereshouldbenospacesinthenamesofthenodes.
Thecasedataisnext,withonecaseperline(asingle-casefileonlyhasonesuchline).Thevaluesofthevariablesareinthesameorderastheheadingline,andareseparatedbyspacesortabs(thecolumnsdon’thaveto“lineup”astheydointheexamplesbelow).
Discrete:Thevalueofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariableisgivenbyitsstatename,orbyitsstatenumberprecededbya‘#’character(thefirststateis#0).Usingthestatenamesispreferred,sincetheorderofthestatesmaybechangedsometime,andthatwouldrenderafilewithstatenumbersinvalid.The‘#’symbolisrecommended,butmaybeomittedifthenodehasnodiscretizationorvaluesdefined.
Continuous:Thevalueofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousvariableisgivenbyanumberininteger,decimal,orscientificnotation(e.g.-3.21e-7).Ifithasbeen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretized,then
thevaluemaybegivenbyastatenameorstatenumberinstead,butthecontinuousnumberispreferredifitisavailable.Thatwaythecasefilecanbeusedfordifferentdiscretizationsofthatvariableinthefuture.Itisbestifthevaluehasthecorrectnumberofsignificantfigures,sincefutureversionsofNeticamayusethisinformation.
Missing:Ifthevaluesofsomeofthevariablesareunknownforsomeofthecases,thenanasterisk*isputinthefileinsteadofthevalue.Thisisknownas“missingdata”.Whenreadingcasefiles,Neticacanalsounderstandaquestionmark?usedformissingdata.
UncertainorNegative:Negative,interval,Gaussian,set,etcfindingscanalsobeenteredinacasefileusingtheUVFformat.
Comments:Theremaybeasmanyspacesortabsattheendofalineasdesired,andtheremayalsobeC/C++/Javastylecomments(e.g.adoubleslash“//”,followedbyanytext).
IDnum:Therearetwospecialcolumnsthatafilemayhavewhichdon’tcorrespondtonodes.Oneprovidesanidentificationnumberforeachcase,whichmustbeanintegerbetween0and2billion.Theheadingforthiscolumnis“IDnum”.Identificationnumbersdonothavetobeinorderthroughthefile.Themissingdatasymbol*mustnotappearinthiscolumn.
NumCases:Theotherspecialcolumnhastheheading“NumCases”,andindicatesthefrequencyormultiplicityofthecase.Amultiplicityofmindicatesmcaseswiththesamevariablevalues.Itisnotrequiredtobeaninteger,soitcanbeusedtorepresentafrequencyofoccurrenceifdesired.Themissingdatasymbol*mustnotappearinthiscolumneither.
Examples:Hereisalistingof“ChestClinic.cases”.Itinvolvesonlydiscretenodeswithstatenames,andhasanIDnumcolumn,butnofrequencycolumn.Hereisanotherexampleofacasefile,thistimeforcarsbroughtintoagarage.Ithasdiscreteandcontinuousvariables,statenumbersandstatenames,andasterisksformissingentries.
Future:FutureversionsofNeticawillsupportmoreadvancedoperationswithcases,includingamoreefficientfilerepresentation,andawayofusingBayesnetsas“indexingfunctions”todothekindoflookupcommonincase-basedreasoning.However,theabovedescribedtypeoffileformatwillalwaysbesupportedaswell.
CaseFileswithUncertainValues–UVFFormatThecasefilesdiscussedinpreviouspageshaveonlyhadvaluesthatwerecompletelycertain(orcompletelymissing).ButNeticacanalsocreateandreadcasefileshavingvaluesthatareknownwithlimitedaccuracy,oronlyknowntowithinsomelikelihood.Infact,Neticahasaveryelegant,practicalandpowerfulwayofexpressinguncertainfindings,calledtheUVFformat.
WhenNeticareadsinacasecontaininguncertainfindings(forexample,bychoosingCases→GetCase),itwillenterthemintheBayesnetaslikelihoodfindings,soanyprobabilisticinference,nodeabsorption,sensitivityanalysis,etc.willproperlyaccountforthem.Also,theoperationsoncasefiles,suchaslearningfromcases,testnetwithcasesandprocesscases,willworkproperlyoncasefilescontaininguncertainvalues.Whenlearningfromsuchcases,somelearningalgorithmswillworkbetterthanothers.Formoreinformationonthat,andanexampleofworkingwithcasefileshavinguncertainfindings,seethelearningalgorithmspage.
Belowisalistofthedifferenttypesofuncertainvalues,theirsyntaxinthecasefile,andwhattheymean.Eachtypeofuncertainvaluecanappearanywhereinacasefilewherearegularvaluenormallywould.Forexample,acasefilecouldbearegular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CSV_file.htm');returnfalse;">CSVfile,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_tab_delimited_file.htm');returnfalse;">tabdelimitedtextfile,butwithsomeofthevaluesreplacedwithentrieshavingthesyntaxdescribedbelow.
GaussianSyntax: m+-smandsarerealnumbers
Examples: 5+-23.27+-0.030+-1e-5
Thisisfora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_normal_distribution.htm');returnfalse;">Gaussian(alsoknownas“normal”)likelihoodfinding,wherethemis
themeanandsisthestandarddeviation.Notethattherecannotbeanyspacebeforeorafterthe+-.Theuncertaintiesinmeasurementsfromlabinstruments,orpollingresults,areoftenexpressedwitha±notation,andindicateaGaussiandistribution,sotheycannowbeeasilyinputintoNetica(althoughsometimestheymaymeananintervaldistribution,asdescribedbelow).
IntervalSyntax: [a,b]aandbarerealnumbers,statenamesorindexesprecededby
#
Examples: [0,10][-3,2.27][lo,med][#1,#3]
Theremaybespacesbeforeorafterthecommaorbrackets.Intervalsofstatesincludebothendpoints,so[lo,med]includesstateslo,medandanystatesbetween.Intervalsofnumbersincludethelowerendpoint,butnottheupperendpoint,so[0,10]forvariableXmeans0<=X<10.Likelihoodwithintheintervalisone;outsidetheintervalitiszero.
UnboundedIntervalSyntax: >mor<mmisarealnumber,statenameorstateindexprecededby#
Examples: >4.75<-10<med>#2
Whenmisastate,theintervalincludestheendpoint,andwhenitisarealnumber,theintervalincludestheendpointonlyfor>intervals(so>isreally).Theintervalcanpotentiallyextendtoinfinity,butinpracticewillprobablybelimitedbyknownmaximumorminimumvaluesforthevariable.Likelihoodwithintheintervalisone;outsidetheintervalitiszero.
SetofPossibilitiesSyntax: {s1,s2,…sn}eachsiisastatename,stateindexprecededby#,interval,
unboundedinterval,orGaussian.
Examples: {lo,med}{red,blue,green}{#1,#5,#7}{[0,3.5],[4.5,10]}{[#35,#122],>#500}
Theremaybespacesbeforeorafterthecommaorbraces.Thevaluecanbeconsideredtobeadisjunctionoftheelements(e.g.X=redorX=blueorX=green).Thelikelihoodofelementsinthesetisone;ofthosenotinthe
set,itiszero.
SetofImpossibilitiesSyntax: ~{s1,s2,…sn}eachsiisastatename,stateindexprecededby#,intervalor
unboundedinterval
Examples: ~{lo}~{red,blue,green}~{#1,#5,#7}~{[0,3.5]}
Theremaybespacesbeforeorafterthecommaorbraces,butnotbetweenthetilde(~)andthebrace.Thisisthesameas"SetofPossibilities"exceptthe"possible"statesarethosethatarenotlisted,ratherthanthosethatarelisted.Thelikelihoodofelementsinthesetiszero;ofthosenotintheset,itisone.
A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativefindingcanberepresentedeasilybyjustlistingthestate(s)eliminatedbytheobservation.
LikelihoodSyntax: {s1p1,s2p2,…snpn}eachsiisastatename,stateindexprecededby#,
interval,unboundedinterval,orGaussian.Eachpiisa
numberbetween0and1.Somepimaybeabsent.
Examples: {female.8,male.3}{3+-10.2,7+-20.4}{[0,1.5].5,[1.5,5]0.1,[5,10]0.02}
Thisisthesameasasetofpossibilities,buteachpossibilityisweightedwithalikelihoodthatappearsafterit(separatedbyasinglespace).Themostcommonkindoflikelihoodvectorsarefordiscretevariables,whereeachstateislisted,followedbyitsprobability.Anystatesthatappearwithoutaprobabilityhavealikelihoodof1,andanystatesthatdon'tappearatallhavealikelihoodof0.
Arbitrarylikelihooddistributionsforcontinuousvariablescanbeformedbyaseriesofadjacentintervals,eachwithitsownprobability.Ortheelementscanoverlap,andthentheirlikelihoodsarecombined.Forexample{[0,10].1,[2,4].2}wouldbethecombinationofarectfunctionextendingfrom0to10
withheight0.1,andanotherrectfrom2to4withaheightof0.2.
AnotherusefuldistributionthatiseasytoformistheweightedcombinationofGaussians.Forexample{3+-10.2,7+-20.4}isabi-modaldistributionwithpeaksat3and7.
ItispossibletomixweightedGaussians,intervals,anddiscretestateswithinasingle{...}likelihoodvector.
NegativeLikelihoodSyntax: ~{s1p1,s2p2,…snpn}eachsiisastatename,stateindexprecededby#,
interval,orunboundedinterval.Eachpiisapositivenumber.
Somepimaybeabsent.
Examples: ~{red,green,teal.2,olive.8}~{[0,2].4,[2,6].2}
Thesameasasetofimpossibilities,buteachentryisweightedwithalikelihood,whichappearsafterit.Ifnonumberappearsafterit,itslikelihoodis0.Entriesthathavenumbersabove1areindicatedtobemoreprobablethanthosenotlisted,andentrieswithnumbersbelow1arelessprobablethantheunlistedones(unlistedentrieshavealikelihoodof1).
CompleteUncertaintySyntax: *[i.e.thesyntaxisjustanasterisk]
Ifnothingisknownregardingthevalueofthisvariable(i.e.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdata),thenaquestionmark?oranasterisk*shouldbeusedtoindicatethat.Itisequivalentto~{}whichisalikelihoodofallones.
ExampleCaseFile-ChestClinicAsanexampleofacasefile,hereisalistingof“ChestClinic.cases”whichwasproducedbytheSimulatingRandomCasesexample.Itinvolvesonly=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenodeswithstatenames,andhasanIDnumcolumn,butnofrequencycolumn.(Anotherexample)
//~->[CASE-1]->~IDnum VisitAsia Tuberculosis Smoking Cancer TbOrCa
1 No_Visit Present Smoker Absent True
2 No_Visit Absent Smoker Absent False
3 No_Visit Absent Smoker Present True
4 No_Visit Absent NonSmoker Absent False
5 No_Visit Absent Smoker Present True
6 No_Visit Absent Smoker Absent False
...
119 No_Visit Absent Smoker Absent False
120 No_Visit Absent Smoker Present True
ExampleCaseFile-CarDiagnosisHereisanexampleofacasefileforcarsbroughtintoagarage.NoticeBatAge,whichisacontinuousvariable,Lightswhicharesuppliedbystatenumbersinsteadofnames,andtheasterisksformissingentries:
//~->[CASE-1]->~
Starts BatAge Cranks Lights StMotor SpPlug MFuse Alter BatVolt Dist PlugVolt
False 5.9 False #0 * fouled okay * dead * *
False 1.3 False #0 * okay okay * dead * none
False 5.2 False #0 Okay okay okay Okay dead Okay none
True 4.1 True #2 * okay okay * strong Okay strong
True 2.7 * #2 * wide okay * strong Okay *
* * True #2 * fouled okay * * Okay strong
False 1.7 True #0 Okay okay okay Okay dead * none
True 2.9 True #2 * * * * strong Okay strong
(Anotherexample)
SimulatingRandomCasesYoucanuseNeticatogenerateaseriesofrandom=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">caseswhoseprobabilitydistributionmatchesthatofaparticularBayesnet,whichisknownassimulation(sometimescalledsampling).ThesecasescanbyusedasexamplescenariosofwhatoneshouldexpectiftheBayesnetmatchesreality.Ortheycanbemanipulatedandcombinedwithothercases,andthenusedtolearnanewnet.
Thesamplingalgorithmsusedareprecise,sothatthelong-rangefrequenciesofthecaseswillexactlyapproachtheprobabilitiesoftheBayesnet,whiletakingaccountofallfindingscurrentlyentered.
Thecaseswillbestoredinafilewhoseformatmatchesthespecificationofacasefile.OnceNeticahasmadethecasefile,youcanbrowseitwiththeF8keytoseetheindividualcases.
HowTo:Togenerateacasefileforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activeBayesnet,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compileit,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodesforwhichyouwishtohavevaluesinthecasefile,andthenchooseCases→SimulateCases.Allthenodesofthenetwillbeusedtogeneratethecases,butcolumnswillonlybemadefortheselectedones.Youwillbequeriedforhowmanycasestogenerate,thefilenameforthecasefile,wheretoputit,andhowmuch=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdatayouwant.Normallyyouwillenter0fortheamountofmissingdata,butif
youwanttohaveacasefilewithasterisksforsomefractionofthefields,enterthatfraction(e.g.entering0.25means25%ofthevalueswillbemissing).Ifyouwishtogenerateonlyasinglerandomcase(andnotsavetofile),chooseCases→RandomCase.
Example:Asanexample,ifyoudoaCases→SimulateCasescommandwith‘ChestClinic.dne’fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder,andenter120,“ChestClinic.cases”and0tothedialogboxes,thenyouwillobtainacasefilesimilartothis(thecasefileyouobtainmaybealittledifferent,sincerandomnumbersareinvolved).
WithEquations:Ifoneormorenodeshaveanequationtodefinetherelationbetweenanodeanditsparents,thenyoumaywantNeticatousethoseequationsdirectlytogeneratetherandomcases,insteadoftheprobabilitytableswhichapproximatetheequations.Inthatcase,don’tcompilethenetbeforedoingCases→SimulateCases.Thesamplingprocesswillbeslowifthenethasanunlikelysetoffindingsentered(arejectionmethodisused).Inthecasefilegenerated,continuousvariables(whetherornottheyhavebeen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretized)willhaveasvaluestheircontinuousrealnumberforeachcase,notjustastaterepresentingarangeofvalues.
ProcessCasesNeticacanprocessafileofcases.Foreachcaseinthefile,NeticareadsthecaseandentersitasfindingsintoaBayesnet.ThenNeticadoes=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingtofindprobabilitiesforallthenodesthatdidn'thavefindings.FinallyNeticawritestheresultstoanoutputfile.
Note:Ifthepurposeistogradetheperformanceofthenet,basedonthecases,itissimplertouseTestWithCases.
Note:Ifmorecontrolisneeded,youmaywanttoprogramNeticathroughitsCOMinterfaceusingVisualBasic,JavaorC/C++.
HowTo:First,opentheBayesnetyouwishtouse.ThenchooseCases→ProcessCasesfromthemenu.Thestandarddialogboxforopeningafilewillappear.Fromitchoosethecontrolfile(describedbelow)thatyouwishtouse.WhenyouclickOkay,anewdialogboxforopeningcasefileswillappear,fromwhichyouchoosethecasefiletobeprocessed.AfteryouclickOkay,thedialogboxforsavingafilewillappear,inwhichyouenterthenameofthefileyouwanttheresultswrittento.
Neticawillthenproceedtoprocessallthecases,printingthefractioncompletedinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindow(ifthatisn'tobscuredbytheBayesnetwindow).Ifyouwanttohaltprocessingbeforeitiscompleted,holddowntheCTRLkeyandpresstheleftmousebutton.
Ifthereareanyfindingsenteredintothenetworkbeforeprocessingstarts,thosefindingswillbeusedforallbeliefupdating,evenoverridingfindingsfoundinthecasefile.Ifan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredfindingisgoingtooverridecasefilefindings,youwillbewarnedandaskedifyouwantto=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">retractallfindingsfirst.
ControlFile:ThecontrolfileisatextfilewhichyoucancreatebychoosingFile→New→TextEdit.Youenterinthisfilewhatyouwishtoappearineachcolumnoftheoutputfile(eachrowoftheoutputfileisfortheresultsofonecase).Thechoicesforcolumnsare:
IDnum()freq()finding(<node>)caseprob()bel(<node>,<state>)util(<node>,<state>)belvec(<node>)utilvec(<node>)mostprob(<node>)expval(<node>)best(<node>)stddev(<node>)
where<node>shouldbereplacedwiththenameofanode(notitstitle),and<state>shouldbereplacedwithastatenameforthatnode,ora#symbolfollowedbythestatenumber(e.g.,#0).
IDnum()andfreq()transfertheIDnumandfreqvaluesfromthecasefiletotheoutputfile.finding(<node>)transfersthefindingfromthecasefileifthereisone,otherwiseitplacesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdatasymbol.
caseprob()displaysthejointprobabilityofallthefindingsofthecasetakentogether(andincludinganyfindingsentereddirectlyinthenetbeforeprocessingwasstarted).
bel(<node>,<state>)displaysthebeliefthatthevalueof<node>is<state>.Inotherwords,itputsP(<node>=<state>|findings),wherefindingsare
fromthecase,andthosedirectlyenteredinthenetbeforeprocessingwasstarted.
mostprob(<node>)providesthemostprobablestatefor<node>.
util(<node>,<state>)isforadecisionnode,anditdisplaystheexpectedutilityofmakingdecision<state>.
best(<node>)providesthebestdecisionfor<node>,ifthatisavailable.
belvec(<node>)displaysalistofnumbersinparenthesis,eachseparatedbyaspace,thatarethebeliefsforeachofthestatesof<node>.
utilvec(<node>)isforadecisionnode,anditdisplaystheexpectedutilityofeachdecisionof<node>inaparenthesizedlist.
expval(<node>)displaystheexpectedvalue(i.e.meanvalue)of<node>,andstddev(<node>)putsthestandarddeviationof<node>.Thesemayonlybeusedforcontinuousvariables,orfornodesrepresentingdiscretevariableswhichhavearealnumbervalueassignedtoeachstate(thisisdoneusingthenodedialogbox).
Example:Hereisanexamplecontrolfile:
IDnum()bel(Color,red)bel(Color,blue)bel(Color,green)expval(Cost)
andhereistheoutputfileitcreated:
IDnum P(Color=red) P(Color=blue) P(Color=green) E[Cost]
1 0.000167195 0.0117262 0.988107 6.86929
2 0.422277 0.0130726 0.56465 3
3 0.610178 0.0203665 0.369455 3
4 0.324446 0.0163193 0.659235 5.94723
5 0.000381718 0.0893132 0.910305 3
TestNetUsingCasesThepurposeofthistestistogradeaBayesnetusingasetofreal=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">casestoseehowwellthepredictionsordiagnosisofthenetmatchtheactualcases.Itisnotfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.
First=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodesyoudonotwishthenettoknowthevalueofduringitsinference.Forexample,ifthenetisformedicaldiagnosis,youmightselectthediseasenodeandnodesrepresentingotherunobservableinternalstates.Thesenodesarecalledunobservednodes.
ThenchooseCases→TestwithCases.Youwillbeaskedwhichcasefiletouse,andafteryouchooseone,Neticawillstartprocessing.The=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowwillcometothefrontanddisplaythefractionofcasesprocessedsofar.HolddownCTRL+SHIFT+LEFTBUTTONatthesametimeifyouwanttostopprocessingcasesandprinttheresultsobtainedsofar.
Neticawillpassthroughthecasefile,processingcasesone-by-one.Foreachcase,Neticareadsinthecase,exceptforanyfindingsfortheunobservednodes.Itthendoesbeliefupdatingtogeneratebeliefsforeachoftheunobservednodes.Itgoesbackandchecksthetruevalueforthosenodesassuppliedbythecasefile(iftheyaresuppliedforthatcase),andcomparesthemwiththebeliefsitgenerated.Itaccumulatesallthecomparisonsintosummarystatistics.
WhenNeticaisdone,itwillprintareportforeachoftheunobservednodes.Thesereportsincludeaconfusionmatrix,=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_error_rate.htm');returnfalse;">errorrate,calibrationtable,quadratic(Brier)score,logarithmiclossscore,sphericalpayoffscore,surpriseindexes,and=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_test_sensitivity.htm');returnfalse;">testsensitivity.For=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_binary_node.htm');returnfalse;">binarynodesitalsoreports=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_test_specificity.htm');returnfalse;">testspecificity,predictivevalueandpredictivevaluenegative.Foraneasywaytoproducereceiveroperatingcharacteristic(ROC)plots,seeQualityofTesttopic.
Forfulldocumentationonthisfunction,andthereportsgenerated,seetheTestNetwithCasesChapterinSpecialTopics.
Netica’sLearningYoumaywanttoreadtheintroductiontoBayesnetlearningfromcases.
Neticacanlearnfromafileofcases,oritcanlearnfromcasesone-by-oneasyouenterthem.Itcanalsoconnectdirectlywithadatabase,orlearnfromcasesinExcel.
ThewaythatNeticalearnsreliesontheconceptofexperience.
Ifyouarelearningfromaworldthatisconstantlychanging,andyouwantthenettoadapt,fadingmaybeuseful.
Afterlearningfromsomecases(orperhapsmanuallyconstructinganet)youmaywanttotestitsperformanceusinganothersetofcases.
Neticaversions5.0andlaterallowforbasicstructurelearning.
LearningfromCaseDataBayesnetlearningistheprocessofautomaticallydeterminingarepresentativeBayesnetgivendataintheformof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">cases(calledthetrainingcases).Eachcaserepresentsanexample,event,objectorsituationintheworld(presumablythatexistsorhasoccurred),andthecasesuppliesvaluesforasetofvariableswhichdescribestheevent,object,etc,asspecifiedinthepreviouschapter.Eachvariablewillbecomeanodeinthelearnednet(unlessyouwanttoignoresomeofthem),andthepossiblevaluesofthatvariablewillbecomethenode’sstates.Learningfromcasesdataresultsin=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probability_revision.htm');returnfalse;">probabilityrevision.
Thelearnednetcanbeusedtoanalyzeanewcasewhichcomesfromthesame(orappropriatelysimilar)worldasthetrainingcasesdid.Typicallythenewcasewillprovidevaluesforonlysomeofthevariables.Theseare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredasfindings,andthenNeticadoesprobabilisticinferencetodeterminebeliefsforthevaluesoftherestofthevariablesforthatcase.Sometimeswearen'tinterestedinvaluesforalltherestofthevariables,butonlysomeofthem,andwecallthenodesthatcorrespondtothesevariablestargetnodes.Ifthelinksofthenetcorrespondtoacausalstructure,andthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_query_node.htm');returnfalse;">targetnodesareancestorsofthenodeswith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_findings_node.htm');returnfalse;">findings,thenyoucouldsaythatthenethaslearnedtododiagnosis.Ifthetargetnodesaredescendants,thenthenethaslearnedtodoprediction,andifthetarget
nodecorrespondstoa"class"variable,thenthenethaslearnedtodoclassification.Ofcoursethesamenetcoulddoallthree,evenatthesametime.
TheBayesnetlearningtaskhastraditionallybeendividedintotwoparts:structurelearningand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parameter_learning.htm');returnfalse;">parameterlearning.Structurelearningdeterminesthedependenceandindependenceofvariablesandsuggestsadirectionofcausation,inotherwords,theplacementofthelinksinthenet.Parameterlearningdeterminestheconditionalprobabilitytable(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPT)ateachnode,giventhelinkstructuresandthedata.
YoumightnotwantNeticatolearnthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofallthenodesinyourBayesnet.SomeofthenodesmayhaveCPTsthathavealreadybeenlearnedwell,werecreatedmanuallybyanexpert,orarebasedontheoreticalknowledgeoftheproblemathand(perhapsexpressedbyanequation).Neticaallowsyoutorestrictthelearningprocesstoasubsetofthenodes,andthosenodesarecalledthelearningnodes.
Ifeverycasesuppliesavaluewithcertaintyforeachofthevariables,thenthelearningprocessisgreatlysimplified.Ifnot,therearevaryingdegreesofpartialinformation:
Ifthereisavariableforwhichnoneofthecaseshaveanyinformation,thatvariableisknownasalatentvariableor“hiddenvariable”.
Ifsomecaseshavevaluesforacertainvariable,andothersdon’t,thatisknownasmissingdata.
Somevaluesforvariablesmaynotbegivenwithcertainty,butonlyaslikelihoodfindings.
Itmayseemstrangetobelearninganetthathaslatentvariables,sincenoneofthetrainingcaseshaveanyinformationonthem.Youintroducealatent
variableasaparentnode(orintermediatenode)ofmultiplechildnodes,andNeticausesthecorrelationsamongthechildrentodeterminerelationshipsbetweenthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_latent_node.htm');returnfalse;">latentnodewithothers.TheresultmaybeaBayesnetthatisactuallysimpler(hasfewerCPTentries),andgeneralizesbetter(i.e.performsbetteronnewcasesseen).ForanexampleofusingNeticatolearnalatentvariable,seethe“LearnLatent.dne”netinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">ExamplesfolderofNeticaApplicationdistribution,orgetitfromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsysnetlibrary.
MoreinfoonNetica’slearning.
MoreinfoonLearningAlgorithms.
LearningAlgorithmsTherearethreemaintypesofalgorithmsthatNeticacanusetolearnCPTs:counting,expectation-maximization(EM)andgradientdescent.Ofthethree,“counting”isbyfarthefastestandsimplest,andshouldbeusedwheneveritcan.Itcanbeusedwheneverthereareno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_latent_node.htm');returnfalse;">latentvariables,andnotmuch=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdataoruncertainfindingsforthelearningnodesortheirparents.Whenlearningthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTofanodebycounting,Neticawillonlyusethosecaseswhichsupplyadefinitevalueforthenodeandallofitsparents.
Ifyoucan’tusecounting,thenyoumustuseEMlearningorgradientdescent.Foreachapplicationarea,itisusuallybesttotryeachonetoseewhichgivesthebetterresults.Generallyspeaking,EMlearningismorerobust(i.e.givesgoodresultsinwidevarietyofsituations),butsometimesgradientdescentisfaster.Forallthreealgorithms,theorderofthecasesdoesn’tmatter.
DuringBayesnetlearning,wearetryingtofindthemaximumlikelihoodBayesnet,whichisthenetthatisthemostlikelygiventhedata.IfNisthenetandDisthedata,wearelookingfortheNwhichgivesthehighestP(N|D).UsingBayesrule,P(N|D)=P(D|N)P(N)/P(D).SinceP(D)willbethesameforallthecandidatenets,wearetryingtomaximizeP(D|N)P(N),whichisthesameasmaximizingitslogarithm:log(P(D|N))+log(P(N)).Belowweconsidereachofthetwotermsofthisequation.Themoredatayouhave,themoreimportantthefirsttermwillbecomparedtothesecond.
Therearedifferentapproachestodealingwiththesecondtermlog(P(N)),whichisthepriorprobabilityofeachnet(i.e.howlikelyyouthinkeachnetisbeforeseeinganydata).Oneapproachistosaythateachnetisequallylikely,inwhichcasethetermcansimplybeignored,sinceitwillcontributethesame
amountforeachcandidatenet.Anotheristopenalizecomplexnetsbysayingtheyarelesslikely(whichisofmorevaluewhendoingstructurelearning).Neticabasesthepriorprobabilityofeachnetontheexperienceandprobabilitytablesthatexistinthenetbeforelearningstarts,whichappearstobeauniqueandelegantapproach.Ifthenethasnotbeengivenanysuchtables,thenNeticaconsidersallcandidatenetsequallylikelybeforeseeinganydata.
Thefirsttermlog(P(D|N))isknownasthenet’sloglikelihood,IfthedataDconsistsofthenindependentcasesd1,d2,…dn,thentheloglikelihoodis:log(P(D|N))=log(P(d1|N)P(d2|N)…P(dn|N))=log(P(d1|N))+log(P(d2|N))+…+log(P(dn|N)).Eachofthelog(P(di|N))termsiseasytocalculate,sincethecaseissimplyenteredintothenetas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings,andNetica’sregularinferenceisusedtodeterminetheprobabilityofthefindings.
BothEMandgradientdescentlearningworkbyaniterativeprocess,inwhichNeticastartswithacandidatenet,reportsitsloglikelihood,thenprocessestheentirecasesetwithittofindabetternet.Bythenatureofeachalgorithmtheloglikelihoodofthenewnetisalwaysasgoodasorbetterthantheprevious.Thatprocessisrepeateduntiltheloglikelihoodnumbersarenolongerimprovingenough(accordingtoatolerancethatyoucanspecify),orthedesirednumberofiterationshasbeenreached(alsoaquantityyoucanspecify).Neticausesaconjugategradientdescent,whichperformsmuchbetterthansimplegradientdescent.
References:Tounderstandhoweachalgorithmworks,itisbesttoconsultareference,suchasKorb&Nicholson04,Russell&Norvig95orNeapolitan04.Briefly,EMlearningrepeatedlytakesaBayesnetandusesittofindabetteronebydoinganexpectation(E)stepfollowedbyamaximization(M)step.IntheEstep,itusesregularBayesnetinferencewiththeexistingBayesnettocomputetheexpectedvalueofallthemissingdata,andthentheMstepfindsthemaximumlikelihoodBayesnetgiventhenowextendeddata(i.e.originaldataplusexpectedvalueofmissingdata).GradientdescentlearningsearchesthespaceofBayesnetparametersbyusingthenegativeloglikelihoodasanobjectivefunctionitistryingtominimize.GivenaBayesnet,itcanfinda
betteronebyusingBayesnetinferencetocalculatethedirectionofsteepestgradienttoknowhowtochangetheparameters(i.e.CPTs)togointhesteepestdirectionofthegradient(i.e.maximumimprovement).Actually,itusesamuchmoreefficientapproachthanalwaystakingthesteepestpath,bytakingintoaccountitspreviouspath,whichiswhyit’scalledconjugategradientdescent.Bothalgorithmscangetstuckinlocalminima,butinactualpracticedoquitewell,especiallytheEMalgorithm.
Mostneuralnetworklearningalgorithms(suchasbackpropagationanditsimprovements)aregradientdescentalgorithms.ThatinvitesacomparisonbetweenBayesnetlearningandneuralnetlearning,with=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_latent_node.htm');returnfalse;">latentvariablescorrespondingtohiddenneurons.InthecaseofBayesnetlearning,therearegenerallyfewerhiddennodes,thelearnedrelationshipsbetweenthenodesaregenerallymorecomplex,theresultofthelearninghasadirectphysicalinterpretation(byprobabilitytheory)ratherthanjustbeingblack-boxtypeweights,andtheresultofthelearningismoremodular(partscanbeseparatedoffandcombinedwithotherlearnedstructures).
SingleCaseLearningNeticahastheabilitytorevisethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofnodestoaccountforthecurrentlyenteredcase,aswellassomeotherlearningabilities.
Preparation:Tolearnfromasinglecase,youmustfirsthaveanetconstructed,includingallnodes,statesandlinks.NodesinthenetmayalreadyhavetheirCPTs,whichyouenteredmanuallyorpreviouslylearned,andwhichyounowwanttoimproveusinglearning.OrtheremightnotbeanyCPTs,andyouwanttolearnthemfromscratch.
Doing:IfthecaseisnotalreadyintheBayesnet,youenteritintothenetasfindings.Only=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefindingswillbeused;negativeandlikelihoodfindingswillbeignored.Thenyou=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodeswhoseprobabilitiesyouwouldliketohaverevisedtoaccountforthecase,ifpossible.Usuallyyouwouldlikeallpossiblenodestohavetheirprobabilitiesrevised,soyouwouldselectallthenodes(ordon’tselectanynodes,whichisequivalent).ThenchooseCases→Learn→IncorporateCase,orclickthetoolbarbuttonwhichhasanarrowpointingfromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case_symbol.htm');returnfalse;">casesymboltothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_relation_symbol.htm');returnfalse;">relationsymbol: .
Degree:Youwillthenbequeriedfora“degree”,whichisnormally1.Bymakingit2,youcanachievethesameeffectaslearningthesamecasetwice,andequivalentlyforothernumbers.Bymakingit-1,youcanexactlyunlearnacasethatwasearlierlearnedwithdegree=1,andsoonforothernegative
numbers.Don’ttrytounlearncasesthatwereneverlearned,ortounlearnthemwithgreaterdegreethantheywerelearned.
WhatHappens:Selectednodesforwhichthecaseprovidessufficientdata(i.e.findingsforitandits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parents)willhavetheirprobabilitiesrevisedasmallamounttoaccountforthecase,andtheirappropriateexperiencelevelsincreasedslightly,accordingtoNetica’slearningalgorithm.
LearningFromaCaseFileThisdescribeshowtolearnaBayesnetfromafileofcases(alternately,youcanlearnfromcasesone-by-oneasyouenterthem,ordootherlearningfunctions).Thestepsinvolvedarelistedbelow,followedbymoredetailedinstructions:
1.Obtainafileofcases2.Createnodesforthevariablesofinterest3.Connectthenodeswithlinks4.Learntheconditionalprobabilitytables(CPTs)5.YoumaythenwanttoviewormodifytheCPTs,hardentheCPTs,absorbnodes,orlearnfromfurthercasefiles(whichmayrequirechangingthenamesofnodesorstates,oraddingnewnodesorlinks)
1.CaseFile:SeeCreatingCaseFiles.Note:IfyouareusingNeticaonaMac,itcannotlearncasesfromanExcelfile.YoumustfirstconverttheExcelfileintoatextfileinordertosuccessfullyexecutelearning.Note:besureyourtextfilefollowsproperformatting.
2.Nodes:Beforelearningbegins,youmusthaveaBayesnetwhosenodesarethevariables(i.e.attributes)ofthecases.Itisokayifithasadditionalnodesrelatedorunrelatedtothecasesinthefile.
Ifyoudon’talreadyhaveanetconstructed,orthenetyouhavedoesn’tincludeallthevariablesinthecasefilethatyouwish,Cases→Learn→AddCaseFileNodesmaybehelpful.Itwillscanthroughacasefileandaddtothecurrentnetnewnodesforanyvariablesthatitdiscoversinthecasefilethataren’talreadyinthenet.Thestatesofthenewnodeswillbeallthepossiblevaluesdiscoveredfromthecasefile.Ifyournetalreadyhasanodewiththesamenameassomevariablefromthecasefile,butthatnodedoesn’thaveallthestatesthatarementionedinthecasefileforthatvariable,thenthosestateswillbeaddedtothenode(unlessthenodehasastatecalled‘other’).
AfterNeticahasaddedallthenodes,youmovethemtothepositionsyouwant,anddeleteanythatyouaren’tinterestedin.
3.Links:Addlinksbetweenthenodesinthenettocapturethedependencies
thatyouwishtolearn.Trytoavoidgivinganynodetoomanyparents,especiallyifyoudon’thaveverymanycasestolearnfrom.Alternatively,youcanuseTANlearningtolearnthelinkstructure,givenatargetnode.
4.Learn:WhenyouchooseCases→Learn→IncorpCaseFile,Neticawillaskyouforacasefileanda“degree”.Normally,youenter1forthedegree,butyoucanenterothernumbersforspecialeffects.Ifyouwanttoundotheeffectofearlierlearning,youcanlearnagainfromthesamefile,butwithadegreeof–1(itdoesn’tmatterifyouhavedoneothercountinglearningsincethen,providingyouhaven’thardened,softened,faded,oreditedthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTs).Ifyouenter2forthedegree,thelearningwillactasifitseeseverycaseinthefiletwice,andsimilarlyforothernumbers(fractionalnumbersareokay).NeticabuildsuptheCPTsaccordingtoitslearningalgorithm,andasitprocessesthecases,itreportsitsprogressinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindow.
LearningFromCasesUsingExcelNeticacanlearnthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofnodesdirectlyfrom=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">casesstoredinanExcelspreadsheet(akaworkbook).DescribedelsewhereisNetica’sabilitytolearnfromtextfilesofcases,andNetica’sabilitytolinkwithExceltoexportposteriorbeliefs.
HerearethestepstolearnaBayesnetdirectlyfromanExcelspreadsheet:
1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
Note:ifyouareusingNeticaonaMac,learningfromanExcelfilewillnotwork.Youmustconvertyourcasefileintoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_file.htm');returnfalse;">textfileandthenyoucanproceedwiththestepslistedabove.
LearningFromCasesUsingExcel1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
Structure:Thespreadsheetshouldbearrangedwithcolumnscorrespondingtothevariablesofinterest(bynodename),andeachrowbeingacase(aka"record").Attheintersectionofeachrowandcolumnisthecellthatgivesthevalueofthevariableindicatedbythecolumn,forthecaseindicatedbytherow.
Thefirstrowmustcontainthenamesofthevariables.EachwillcorrespondtoanodeintheBayesnet,althoughtheExcelfilemayhavesomevariablesthatdon'tappearinthenetandvice-versa.Ifdesired,youcangiveeachcaseanidentificationnumber.
RepresentingPriorKnowledge:Tosimplifypriorpercentageknowledgeinyourfile,youcanusetheNumCasesfunctiontodenotethepercentageofcases.Forexample,ifyouhadamillioncasesandthereare50casesthathavethesame"setoffindings",youcanwrite10%intherowthatmatchesthatdataset.Thisindicatesthatyouhaveseen10%ofcaseswiththeseexactfindings.Neticawillthenrunthatlinethrough10times(orwhateverrepresents10%ofthecases).
Link:TheWindowsdatabasesoftwaremustbeabletoidentifytheExcelworksheetasadatabasetable.Itmaydothisautomatically,orfromExcelyoumayhavetoselectalltherelevantcells,andtheninthelittleboxtotheleftoftheformulabar(fordefiningnames),enterinanynameandpressENTER.Finally,savethefile.Note:ifyouareusingNeticaonaMac,itwillthrowanerrorwhenlearningfromanExcelfile.Youmustconvertyourdataintoatextfileinorderforthelearningtowork.
SubsetofCells/ChoosingTable:Ifyoualreadyhaveseveraltablesdefinedin
thespreadsheet,oryouwantNeticatojustuseasubsetofthecells,selectthesetofcellsyouwanttouse,anddefineitwiththename“ForNetica”,asdescribedabove.Wheneverthereisatablewiththatname,Neticawilluseitinsteadofanyother.
>>NextStep
LearningFromCasesUsingExcel1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
YoumayalreadybestartingwithaBayesnetthathasnodeswithsuitablenamesandstatestomatchtheExceldata,inwhichcaseyoucangoontothenextstep.Ifnot,youwillhavetoaddnodesorchangetheirnames,asdescribedbelow,orletNeticadoitautomaticallyasdescribedfurtherbelow.
Manually:Ensurethateachnode'snameoritstitleexactlymatchesthetextinthecellatthetoprowoftheExcelspreadsheet.Also,thestatenamesortitlesmustexactlymatcheachofthepossibleentriesinthatcolumn(unlessthecolumncontainsnumericdata).Thematchesarecasesensitive.
Toachievethis,youmaywanttochangethenamesofthenodes,orchangetheExcelcells,oraddnodetitles.
Important:IftheExcelnameshavespacesorspecialcharactersinthem,theywon'tbeabletomatchthenodeorstatenames(sincethosecharactersarenotallowedinnames),sotheywillhavetomatchnodeorstatetitles.
Automatically:AgreattimesaverisNetica’sabilitytoexaminethespreadsheetandaddnodestotheBayesnetwithproperlymatchingnodeandstatenames.TheBayesnetmaystartoffempty,oritmayalreadyhavesomenodes.ChooseCases→Learn→AddCaseFileNodes,andfromtheopen-filedialogboxpresented,choosetheExcelfilewiththespreadsheet.Afterthenodesareadded,youmaywanttore-arrangetheirposition,ordeleteonesyouaren’tinterestedin.Nodesfornumericdatawillbeaddedas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenodes,whichyouprobablywanttoconvertto=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousnodes,andthenextstepdescribesanautomaticwaytoeasilydothat.
ExtremelySlow:IfExcelisrunning,andhasopenthesamefilethatyouaretryingtoworkwithinNetica,theoperationsinNeticawillbeextremelyslow,soclosethefileinExcelfirst.
Prevstep<<>>Nextstep
LearningFromCasesUsingExcel1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
Youneedto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizecontinuousnodes,andiftheyhavealreadybeendiscretized,youmaywanttoadjustthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_threshold.htm');returnfalse;">thresholdstobettercapturetheExceldata.Ifthenodeswereaddedautomatically,thenyoumaywanttoconvertdiscretenumericnodestocontinuousones,andthendiscretizethem.
Automatically:TousehistograminformationgeneratedfromtheExceldataset,selectoneormorenodesandchooseModify→DiscretizeNodefromthemenu.Anyofthenodesthatare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretewillbeconvertedto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuous.Neticamayaskyouwhatfileyouwishtousetogeneratethehistogram,towhichyouwouldnormallyindicatetheExcelspreadsheetfile.ThenNeticawillaskhowmanystates(i.e.bins)youwanteachnodetohave,andthedegreeofrounding(20%isusuallyagoodamount).Finally,itwillautomaticallydothediscretizationsothatthebinshaveapproximatelyequalamountsofdatasamples.Ifyouspecified0%fortherounding,theneachbinwillhaveascloseaspossibletothesamenumberofsamples,andifyouchose
alargernumber,thebinamountswon’tbeexactlyequalsinceNeticatriestochoosesomewhatroundnumbersforthethresholds.
Manually:Alternatively,youcanmanuallychangediscretenodestocontinuouswiththenodepropertiesdialog,andforcontinuousnodes,youcandiscretizethemoradjusttheirdiscretizationthresholdswiththeNodeDiscretizationsetter.
CombineStates:Iftheentriesinacolumnarenotnumeric,andtherearesomethatyoudon’tcareabout,youcanDELETEthenode’sstateswhichcorrespondtothem,andthenaddastatecalledother.
Prevstep<<>>Nextstep
LearningFromCasesUsingExcel1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
Oncetheappropriatenodesareinplaceandtheirdiscretizationlevelschosen,addthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructurethatyouwanttoworkwith.Youcandothismanuallyasdescribedbelow,oryoucanuseTANLearning.
Ifthereisonevariableofinterestthatismostimportant(calledthe“targetvariable”or“targetnode”),thenitisbesttodrawlinksfromittoalltheothernodes.Thatwayyouaredirectlycapturingitssinglerelationshipwitheachoftheothernodes.
Rememberthateachnodeshouldnothavetoomanylinksenteringit,sincethenits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTtablewillbetoolarge,andtherewillnotbeenoughsamplinginformationinthespreadsheettoadequatelyfillallthecells.
Thereisnoprobleminhavingagreatmanylinksleavinganode,andsinceNeticawilldoBayesian=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">inferenceontheresults,itisokayforlinkstogoineitherdirection.Thatiswhytoclassify,predictordiagnosisaparticularvariablewiththebestaccuracy,youwanttocaptureitsrelationwithasmanyoftheothervariablesaspossible,soyouputmanylinksleavingthatvariable.
Iftheonlylinksthatarepresentinthenetareonesthatleavethetargetnode,thenalthoughthewaythateachothernodeeffectsthetargetnodehasbeencaptured,theyareonlybeingconsideredinisolation,andsynergisticeffectsofthewayinwhichtheyeffectthetargetnodearebeinglost.
Example:Saythatwewanttocapturethesynergybetweenthe3strongestinfluencersofthetargetnode.Wemightuse“SensitivitytoFindings”(seefurtherbelow)toidentifythese3nodes.Thenwecanputlinksfromthose3nodesintothetargetnode,andfromthetargetnodetoalltheothernodes.Ineffectthatsays,“Considerindetailthesynergybetweenthe3mostimportantinfluencersofthetargetnode,andfortherestofthenodes,considerallofthem,butnotallthesynergiesbetweenthem.”
UsingInference:SinceNeticadoesBayesianinference,thereisanalternatewaytoaccomplishtheabove,thatisn’timmediatelyintuitive.Wecanhavelinksgoingfromthetargetnodetoeachoftheothernodes,andthenjustputlinksbetweenthestrongestinfluencers.Thismethodwillproducethesameresults,anditispreferable,sinceitmakesexploringanumberofmodelseasier.Also,itallowslinkingtwovariableswhosesynergisticeffectswewanttoexplore,andlinkinganothertwosuchvariables,andyetstillconsideringthetwopairsasindependentlyinfluencingthetargetvariable.
Sometimesyouwanttoputlinkssimplytocreatea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTwithcertainparentnodes,sothatyoucanlaterobservetheconditionalprobabilitiesinthattable.
Ifyouwanttotakeadvantageofdomainindependenceinformation,oryouaredevelopingacausalmodel,thatmayalsoinfluencethedirectionoflinksyouchoose.However,keepinminditispossibletolearntheCPTsusingonelinkstructure,thenlaterreverseanddeletelinkstocapturethecausaldirectionsyouwant,asdescribedfurtherinthissection.
Ingeneral,therearemanypossibilitiesforgoodlinkstructures,dependingonwhatyouwanttoaccomplish.Youmaywanttoexperimentwithafewdifferentstructures,toseetheresultsyougetfromeach.Forexample,youcanuseNeticatodostructurelearningbywritingyourownsmallprogramthattestsanumberofcandidatelinkstructurestofindthebestone.Youwritea
functionwhichsearchesthroughsomecandidatelinkstructuresthatareplausibleandpracticalinyourdomain,perhapsalsoaddingtriallatentvariables.ForeachstructureyouuseNetica’sparameterlearningfunctionsdescribedinlearningfromcases,thentesttheresultingnetwithNetica’snettestingfunctionsalsodescribedinthischapter.Thenetthatscoresthehighest(perhapspenalizedforcomplexity)isthebeststructure.
AddLinksFast:Todrawlinksfromonenodetoawholesetofnodes,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthesetofnodes,thendrawasinglelinkfromthedesiredparentnodetooneoftheselectednodes,andNeticawilladdallthelinks.
Prevstep<<>>Nextstep
LearningFromCasesUsingExcel1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
ThenextstepistohaveNeticalearntheconditionalprobabilitytables,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTs.
ChooseCases→Learn→IncorpCaseFilefromthemenu,andfromtheopen-filedialogboxpresented,choosetheExcelfilewiththespreadsheet.Whenasked,entera“degree”of1.0unlessyouarelearningfrommorethanonedatasource,andyouwanttoweighteachone.NeticawillprocesstheExcelspreadsheet,andfilleachnode’sconditionalprobabilitytable.
Note:Whenlearningfromdatasets,thetoprowdoesnotnecessarilyneedtohavethenodename(Neticacanstilllearnthedataifthereisn'tarowheading/nodename).Itispreferabletohaveanodename,butNeticacanlearnitwithoutthename.Ifitdoeshaveanodename,itmustexactlymatchandmustnotcontainspacesorspecialcharacters.Seecasefileformatformoreinfo.
Ifthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowisvisible,youwillbeabletoseetheprogressasthepercentofcasesprocessedsofar.YoucanaborttheoperationbypressingCTRLwhileholdingdownthemousebuttonforawhile.
Prevstep<<>>Nextstep
LearningFromCasesUsingExcel1.CreateanExcelSpreadsheet2.AddNodestotheNet3.DiscretizeorCombineStates4.AddLinkStructure5.LearnCPTs6.UsetheResultingBayesNet
OncetheCPTshavebeenlearned,youcanusetheresultingBayesnet.Ifnecessary,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compilethenettodo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">probabilisticinferencebychoosingNetwork→Compile,orclickthetoolbarbutton.Youcandowhat-ifanalysisbyentering=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsforsomenodes(byclickingonthestatenames),andobservinghowalltheprobabilitieschange.
Ifyouhaveaparticularnewcaseyouwishtoanalyze,thenyoucanentereverythingyouknowaboutitasfindings,andthenobservetheresultingprobabilitiesofthetargetnodetohaveNeticadoclassification,predictionordiagnosis.
Youcanopeneachnode’s=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTdialogboxtoviewtheconditionalprobabilitiesofeachnodegivenitsparentnodes.
Ifthereisonevariableofparticularinterest(the“targetvariable”),thenyoucanseehowstronglyeachoftheothervariablesarerelatedtoitbyselectingitandchoosingNetwork→SensitivitytoFindingsfromthemenu.To
understandthereportgenerated,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">contactNorsysfortheSensitivitydocument.
YoucancopyandpastepartsofthenetworkintoanothernetworktocombineknowledgelearnedfromthisExcelspreadsheetwiththeknowledgefromtheothernetwork(whichmayhavebeenlearnedfromotherdata,orcreatedbyhandbyanexpert).Ifyoudothis,youmaywanttouseModify→ReverseLinksanddeletesomeextraneouslinksbeforeyoucopyandpaste,togetthelinkdirectionsintheright(i.e.causal)directionfirst.
Prevstep<<
ExperienceTherehasbeenconsiderablecontroversyoverthebestwaytorepresentuncertainty,withsomeofthesuggestionsbeing:probability,fuzzylogic,nonmonotoniclogic,belieffunctions,Dempster-Shafer,etc.Currentlyprobabilityandfuzzylogicarethemostpracticalmethodsformostapplications.Ofthesetwo,probabilityhasamuchsoundertheoreticalbasis(atleastwithrespecttothewaytheyareactuallyused).However,probabilitybyitselfdoesnotrepresenttheconfidenceonehasinone'sbeliefs,orlackthereof(e.g."ignorance")
Example:Supposeyouhadtodrawaballfromabagfullofblackandwhiteballs,andyoucouldn’tobservehowmanywhiteballsorblackballsareinthebag.Ifyouhadtosupplyaprobabilitythatyouweregoingtodrawawhiteball,itshouldbe0.5,providingyouhadnoadditionalinformation.
Contrastthatwithasituationinwhichyoucancounttheballsinthebagbeforehand(thereare10ofeach),andyouwillshakethebagbeforeyoudraw.Inthissituationtheprobabilityofdrawingawhiteballis0.5,butwhereasinthefirstsituationyouwereinastateofignorance,nowyoufeelmuchmoreinformed.
Ifyouneededtodo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">probabilisticinferenceorsolvedecisionproblems,thenthe0.5probabilitywouldbesufficientineithersituation.Inbothsituationsyoushouldbelieveandactasiftherewasanequalchanceofdrawingawhiteorablackball.Sotheconceptofexperienceisnotrequiredforthesetypesofproblems,andyoudonotneedtobeabletorepresentignorance(ignoranceistheendpointoftheexperiencespectrum).However,forlearningandcommunicatingknowledge,itisusefultobeabletorepresentthedegreeofexperienceaswellastheprobability,asweshallsee.
Supposeyouthensequentiallydrawanumberofballsfromthebag.Ifyoudrew3whiteballsinarow,theninthefirstsituationyourprobabilitythatthenextballwillbewhiteshouldbegreaterthan0.5,becauseyouarelearning(perhapsincorrectly)thatthereseemtobealotofwhiteballs.Inthesecondsituationyourprobabilityofthenextballbeingwhiteshouldbelessthan0.5,
becauseyouknowthatnowtherearemoreblackthanwhiteballsleftinthebag.Sinceyoushouldarriveatdifferentconclusionsineachofthetwosituations,youneedsomemoredetailedwayofrepresentingtheoriginalknowledgethanjustP(white)=0.5.
Onewaytohandlethisusingjustprobabilitiesistokeeptrackofyourbeliefsabouttheratioofwhitetoblackballsinthebag.Thenyouwillhavemanyprobabilities,oneforeachpossibleratio.Eachoftheseprobabilitieswillchangeasyoudrawaball,andwhenyouareaskedtosupplyaprobabilitythatthenextballdrawnwillbewhite,theywillallbeinvolvedinthecalculation.Thesearesometimescalledsecondorderprobabilities,butinthisexampletheyarereallyjustaprobabilitydistributionoverpossibleratiosofballs.ItwouldbeeasytocreateaBayesnetforthis,whichwouldhaveanextracontinuousnoderepresentingtheactualratioofballsinthebag,andbeliefsforeachpossibleratiowouldbeupdatedwitheachobservation(foranexampleofthis,seethe"BetaUpdating"net).Thatapproachworksfineforthissimpleproblem,butyoucanimaginethatifyouhadmanyinterrelatedvariables,thatitwouldbecometoocomplicated,becauseyouwouldneedaseparateextranodeforeachprobabilitynumberofeach=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPToftheoriginalnet.
InsteadNeticausestheconceptofexperience,whichisameasureoftheconfidencethatNeticahasinitsprobabilities.
AteachnodeNeticakeepsanexperiencetable,whichhasasingleexperiencenumberforeachrowoftheCPT.Theexperiencevaluecorrespondscloselytothenumberofcasesthathavebeenseenoritsequivalent(normallyitis1morethanthenumberofcases).Thisformofexperiencehassometimesbeencalledthe“equivalentsamplesize”or“ess”.Tosavespace,Neticadoesn’tkeepexperiencetablesfornodesthathaven’tbeeninvolvedinanylearningandhaven’thadamanualentryofexperience.Youcanvieworeditexperiencetableswiththetableeditor.
Theexperiencenumbersarenotinvolvedinprobabilisticinferenceordecisionproblems,sincetheyaren’tneededthen.ButwheneverNeticadoeslearning,theyareinvolved(andthatwilleffecttheCPTs,whichwilleffectfuture
probabilisticinferenceanddecisionproblemresults).(Moreinfoonhowexperienceiscalculated)
Counting-LearningAlgorithmThisdescribesthesimplestalgorithmusedbyNeticaforparameterlearningofconditionalprobabilitytables(CPTs)fromafileofcases,calledcounting-learning.Althoughitissimple,itisatrueBayesianlearningalgorithm.
Beforelearningbegins,thenetstartsoffinastateofignorance(providingtherehasbeennopreviouslearningorentryofprobabilitiesbyanexpert).Ateachnode,all=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTprobabilitiesstartasuniform,andeachexperiencestartsatitslowestvalue(normally1.0).
Foreachcasetobelearnedthefollowingisdone.Onlynodesforwhichthecasesuppliesavalue(finding),andsuppliesvaluesforallofitsparents,havetheirexperienceandconditionalprobabilitiesmodified(i.e.,no=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_missing_data.htm');returnfalse;">missingdataforthatnode).Eachofthesenodesismodifiedasfollows.
Onlythesingleexperiencenumber,andthesingleprobabilityvector,fortheparentconfigurationwhichisconsistentwiththecaseismodified.Thenewexperiencenumber(exper')isfoundfromtheold(exper)by:
exper'=exper+degree
wheredegreeisthemultiplicityofthecase(setbyyoujustbeforelearningbegins).Itisnormally1,butisincludedsothatyoucanmakeit2tolearntwoidenticalcasesatonce,or-1to“unlearn”acase,etc.IfthecasefilehasaNumCasescolumn,thenactuallydegreewouldbetheproductofthedegreeyouenteredandthevaluefromtheNumCasescolumn.
Withintheprobabilityvector,theprobabilityforthenodestatethatisconsistentwiththecaseischangedfromprobctoprobc'asfollows:
probc'=(probc*exper+degree)/exper'Theotherprobabilitiesinthatvectorarechangedby:
probi'=(probi*exper)/exper'whichwillkeepthevectornormalized(experandexper'actastheoldandnewnormalizationconstants).
BayesianLearningGenerallyspeaking,itisawiseideatorelateanyproposedmachinelearningmethodtoaBayesianmethodtobetterunderstanditsassumptions,strengthsandweaknesses.Ifitcanbecast,atleastapproximately,intoaformofBayesianlearning,thenyoucanchecktoseeifthepriorprobabilitiesaresuitablefortheproblem.IfitdoesnotevenroughlycorrespondtoanyformofBayesianlearning,thenthereislittleguaranteeinthevalidityofitsresults,anditshouldonlybeusedifithasothervaluablequalities,suchasbeingparticularlysimpleorfast.
TheNeticalearningalgorithmisequivalenttoasystemoftrueBayesianlearning,undertheassumptionsthattheconditionalprobabilitiesbeinglearnedareindependentofeachother,andthepriordistributionsareDirichletfunctions(ifanodehas2states,theseare“betafunctions”).FormoreinformationseeSpiegelhalter&DLC93,section4.1(withtheword“precision”equivalenttoour“experience”).
AssumingthepriordistributionstobeDirichletgenerallydoesnotresultinasignificantlossofaccuracy,sinceprecisepriorsaren’tusuallyavailable,andDirichletfunctionscanfairlyflexiblyfitawidevarietyofsimplefunctions.Assumingtheconditionalprobabilitiestobeindependentgenerallyresultsinpoorperformancewhenthenumberofusablecasesisn’tlargecomparedtothenumberof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentconfigurationsofeachnodetobelearned.
FadingWhenaBayesnetissupposedtocapturerelationshipsbetweenvariablesinaworldwhichisconstantlychanging,itisusefultotreatmorerecentcaseswithahigherweightthanolderones.AnexamplemightbeanadaptiveBayesnetthatisconstantlyreceivingnewcasesanddoinginferenceswhileitslowlychangestomatchachangingworld.
Neticaachievesthispartialforgettingofthepastbyusingfading.Youdoregularlearningfromcasesasthecasesarrive,andeverysooftenyouselectthenodestobefaded,chooseTable→Fade,andenteradegreefrom0to1.Neticawillreducetheexperienceandsmooththeprobabilitiesoftheselectednodesbyanamountdictatedbythedegree,with0havingnoeffect,and1creatinguniformdistributionswithnoexperience(therebyundoingallpreviouslearning).Thenwhenyoucontinuetolearnnewcases,theywilleffectivelybeweightedmorethanthecasesyoujustfaded.
Fadingoncewithdegree=1d,andagainwithdegree=1f,isequivalenttoasinglefadingwithdegree=1df.Sotheeffectsofmultiplefadingsaccumulateastheyshould.Tobemostaccurateyouwouldfadeaverysmallamountaftereachcase,butforallpracticalpurposesyoucanjustfadealargeramountafterabatchofcases.
Ifanoccurrencetimeforeachcaseisknown,andthecasesarelearnedsequentiallythroughtime,thentheamountoffadingtobedoneis:degree=1–r^ twhere tistheamountoftimesincethelastfadingwasdone,andrisapositivenumberlessthan(butcloseto)1,anddependsontheunitsoftimeandhowquicklytheenvironmentischanging.Differentnodesmayrequiredifferentvaluesofr.
Duringfading,eachoftheprobabilitiesinthenode’sconditionalprobabilitytable(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPT)ismodifiedasfollows(whereprobandexperaretheoldvaluesofprobabilityandexperience,andprob'andexper'arethenewvalues):
prob'=normalize(prob*exper*(1-degree)+degree)
exper’isobtainedasthenormalizationfactorfromabove(rememberthatthereisoneexperiencenumberpervectorofprobabilities).So:
prob'*exper'=prob*exper*(1-degree)+degree
StructureLearningWearecontinuallyaddingtoNetica'slearning-from-datacapability(structure,parameter,testing).ThefirstadditionistheTANStructurelearningofversion5.00.TANstructurelearningistheautomaticmethodforlearningthelinkstructureofaBayesnetfromacasefile.
Howto:First,selectatargetnodethatyouwanttodiagnose/predict.Next,chooseCases→Learn→LearnTANStructure.Neticawillautomaticallydeterminetheappropriatelinkstructure.
Asnotedinthetopiclearningthelinkstructure,thereisnoprobleminhavingagreatmanylinksleavinganode,andsinceNeticawilldoBayesian=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">inferenceontheresults,itisokayforlinkstogoineitherdirection.Thatiswhytoclassify,predictordiagnosisaparticularvariablewiththebestaccuracy,youwanttocaptureitsrelationwithasmanyoftheothervariablesaspossible,soyouputmanylinksleavingthatvariable.
Furtherdocumentationwillbeavailableshortly;inthemeantime,youcanreadFriedman,Niretal1997todiscoverhowNeticadoesTANlearning(freeversionavailableonlineorbye-mailingus).
Ifyouhavesomedatasetsthatyouwouldlikeustousethroughoutourresearchwewouldbehappytousethemandsendyoualltheresults.
DecisionNetsDecisionnetsareusefulinsolvingdecisionproblems,wheretheinterrelationsbetweenvariablesarerepresentedasina=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnet,andthegoalistofindasetofdecisionfunctionswhichmaximizeautilityobjective.Anexampledecisionnetis“Umbrella”.
CreatingadecisionnetissimilartocreatingaBayesnet.Oncethedecisionnetisconstructed,itmaybesolved,afterwhichyoumaywanttodomodel-iterationandwhat-ifanalysis.
DecisionNetsBayesnetsareusedtodeterminenewbeliefs(intheformofprobabilities)asobservationsaremadeorfactsaregathered.Theyarecomposedonlyofnaturenodes.Toformadecisionnet(alsoknownasan“influencediagram”),youadddecisionnodesandutilitynodes(alsoknownas“value”nodes).Decisionnodes,whicharetraditionallydrawnasrectangularboxes,correspondtovariablesoreventsthatyouwillbeabletocontrol.Utilitynodesaredrawnwithadiamondorflattenedhexagonshape,andcorrespondtoquantitiesyouwanttomaximize.
Thedecisionnetasawholerepresentsadecisionorplanningproblemthatyouface,orthatsomeotheragent,oftencalled“thedecisionmaker”,faces.Neticacanfindvaluesforthedecisionnodesthatwillresultinthelargestpossibleexpectedvaluefortheutilitynode(orsumofthemifthereismorethanone).Thisisknownas“solving”thedecisionnet.Oncethenetissolved,you(orthedecisionmaker)canbegintoenacttheplanbytakingtheprescribedactionforeachdecisionasitarises.
Linksthatgointoadecisionnodehaveaspecialmeaningandarecalledinformationallinks.Theyindicatewhatwillbeknownatthetimethedecisionistobemade.Thatis,thedecisionmakerwillknowthevaluesofallthenodeswhichhavelinksintothatdecisionnode,andwillnotknowthevaluesofanyothernodes.
EarlieritwasstatedthatwhensolvingadecisionnetNeticafindsvaluesforeachofthedecisionnodes.Butiftherearesomelinksenteringadecisionnode,itactuallyfindsadecisionvalueforeachpossibleconfigurationofvaluesofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parents.Thisisacontingentplan,withaformlike:“ifIobserveA=highandB=no,thenIwilldoX,ifIobserveA=lowandB=yes,thenIwilldoY,andsoon.So,solvinganetfindsadecisionfunctionforeachdecisionnode(i.e.afunctionwhichgivesadecisionvalueforeachpossiblesetofparentvalues).
Ifthereareanumberofdecisionnodes,possiblycorrespondingtodecisionsmadeatdifferentpointsintime,thensolvingthenetwillfindadecisionfunctionforeachofthem,andthissetofdecisionfunctionsisknownasa
policy.Itisafullconditionalplan,specifyingwhattodoineachpossiblecontingency,basedontheinformationthatwillbeavailable.
Workingthroughanexamplemaymaketheseideasclearer,andthenyoumaywanttocreateyourown.
“Umbrella”ExampleDecisionNetAverytinydecisionnetfromRossShachterknownas“Umbrella”servesasagoodsimpleexample.YoucanreaditintoNeticafromthe“Examples”folder.
Ithas2naturenodesrepresentingtheweatherforecastinthemorning(sunny,cloudyorrainy),andwhetherornotitactuallyrainsduringtheday(rainorno_rain).Ithasadecisionnodeofwhetherornottotakeanumbrella,andautilitynodethatmeasuresthedecisionmaker’slevelofsatisfaction.ThereisalinkfromWeathertoForecastcapturingthebelievedcorrelationbetweenthetwo(perhapsbasedonpreviousobservations).
ThereisalinkfromForecasttoUmbrellaindicatingthatthedecisionmakerwillknowtheforecastwhenhemakesthedecision,butnolinkfromWeathertoUmbrella;ifheknewforcertainwhattheweatherwasgoingtobe,itwouldbeeasytodecidewhetherornottotaketheumbrella.
TherearelinksfromWeatherandUmbrellatoSatisfaction,capturingtheideathatheismosthappywhenitissunnyandhedoesn’ttakeanumbrella(utility=100),nextmostwhenitisrainingandhetakesanumbrella(utility=70).Hehatescarryinganumbrellaonasunnyday(utility=20),butismostunhappyifitisrainingandhedoesn’thaveone(utility=0).Youcanexaminetheutilityvaluesby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingnodeSatisfaction,andthenclicking
Tocompilethisdecisionnet,click ..Auto-updatingisturnedonforthisdecisionnet,soassoonasyoucompileit,updatingwilloccur(i.e.itwillbe“solved”).
Thedisplaywillchangetosomethinglike:
Thenumberbesideeachdecisionchoiceindicatestheexpectedutilityofmakingthatchoice.Sobeforeanyinformationisknown,decidingtotaketheumbrellaresultsinanexpectedvalueof35,whileleavingitathomegives70.Clearlythebestchoicegiventheavailableinformationistoleavetheumbrellaathome.
Ifthedecisionmakerhearsthattheweatherforecastissunny,thenthiscanbeenteredbyclickingontheword“sunny”oftheForecastnode.Theexpectedutilitiescorrespondingtoeachdecisionchoicechange.Thebestdecisionisstilltoleavetheumbrellaathome,buttheexpectedutilityhasincreasedto91.59,becausetheextrainformationindicatesitisnowmorelikelythattheumbrellawon’tbeneeded.
Sayinsteadtheforecastwascloudy.Clickontheword“cloudy”tochangethefinding.Stillthebestdecisionistoleavetheumbrellaathome,buttheexpectedutilityhasdecreasedto65.12,becauseoftheincreasedchanceofrain.
Tryaforecastofrainy.Thebestdecisionchangesto“taketheumbrella”,andtheexpectedutilityofthatdecisionis56.
Withnofindings=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredfornodeForecast(sinceitistheparentnode),selectnode“DecideUmbrella”,andclickon .Thetabledialogwillopen,andthereyoucanseetheoptimaldecisionfunction,whichistoleaveitathomeunlesstheforecastisrainy.
ForamoreadvancedexampleseeCarBuyer.Itrepresentsasequentialdecisionproblem(hasalaterdecisiondependingonthefirst),andithasmultipleutilitynodes.
“CarBuyer”ExampleDecisionNet“CarBuyer”isanexampledecisionnetillustratingsequentialdecisionsandmultipleutilitynodes.Foramoresimpleexample,seetheUmbrellaexample.
Open“CarBuyerNeapolitan”fromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder.ItisfromNeapolitan90,whichisasimplerversionofthecarbuyerexampleofHoward62.Eliminatingtherationalegiventhereofhowthenumbersarearrivedat,wehavethefollowingstory:
Joeisgoingtobuyausedcar,whichcouldbegoodwithprobability0.8oralemonwithprobability0.2.Afteraccountingforrepairs,Joe’sprofitwillbe$60ifthecarisgood,and$-100ifitisbad.Beforebuyingthecarhehastheoptionofhavingonetestortwotestsdoneonit.Thefirsttestcosts$9,andbothtogethercost$13.Thefirsttesthasa90%chanceofreturningpositiveifthecarisgood,anda40%chanceifit’salemon.Ifthefirsttestreturnspositive,thenthesecondtesthasa88.89%chanceofreturningpositiveifthecarisgood,anda33.33%chanceifit’salemon.Ifthefirsttestreturnsnegative,thenthesecondtesthasa100%chanceofreturningpositiveifthecarisgood,anda44.44%chanceifit’salemon.
Joehas2decisionstomake:whethertodothetests,andwhethertobuythecar.Thesearerepresentedbythe“DoTests?”and“BuyIt?”decisionnodes.Theoutcomeofthetestsaregivenbynodes“FirstTest”and“SecondTest”.ThecostsofthetestsarerepresentedbyutilitynodeU,andtheprofitsafterrepairs(notincludingtestcosts)byutilitynodeV.Theoverallutilityisthesumofthesetwo(withcostsbeingnegative).
WhenJoedecideswhethertodothetests,hedoesn’tknowthevalueofanyofthesevariables,sotherearenolinksenteringthe“DoTests?”node.Whenhedecideswhethertobuy,hewillknowtheoutcomeofbothtests(theoutcomesmaybe“notdone”),andsotherearelinksfromthosetwonodesto“BuyIt?”.Hewillalsoknowthevalueof“DoTests?”sincehehasalreadymadethatdecision,soyoucouldputalinkfromthatnodeto“BuyIt?”,butitisnotnecessarysinceitisano-forgettinglinkandthereisalreadyadirectedpathfrom“DoTests?”to“BuyIt?”.
Youcanexaminetherestofthelinkstructure,andcheckouttherelationtables,tomakesuretheymakesensetoyou.
Thencompilethenet.Sinceauto-updatingisturnedon,itwillbesolvedimmediately.Neticaaddsano-forgettinglinkfrom“DoTests?”to“BuyIt?”,indicatingthat“DoTests?”mayberelevanttotheseconddecision,basedonlyontherestofthelinkstructure(asitturnsout,itisn’t).Theexpectedutilityofeachdecisionchoicefor“DoTests?”isprintedinthenode;notdoinganyofthetestshasthehighestexpectedutilityof28,soitisthebestchoice.Noexpectedutilitiesareprintedinthe“BuyIt?”node,sincethefirstdecisionhasnotyetbeenmade.
Ifyouclickonthe“None”decisionof“DoTests?”toindicatethatJoedecidesnottodoanytests,expectedutilitiesappearinthe“BuyIt?”node.Thebestchoiceistobuyit,resultinginthehighestexpectedutility–anoverallprofitof$28.Tryclickingon“First”ofthe“DoTests?”nodes,indicatingthatJoedecidestojustgetthefirsttestdone.Hisoverallexpectedutilityis26.2.Thenclickindicatingthatthefirsttestoutcomewas“Positive”.Thebestdecisionistobuyandtheexpectedutilityis35.Ifthefirsttestcomesoutnegative,thenthebestdecisionistonotbuy,anditsexpectedutilityis–9(whichisthecostofthetest).Youcanexperimentwithothercombinationsoffindingsanddecisionchoices.
Nowperhapsyouwanttocreateyourowndecisionnet?
CreatingaDecisionNetCreatingadecisionnetisprettymuchthesameascreatingaBayesnet,soitinvolvesaddingthenodesandlinks,settingnodepropertiesandenteringnodetables.
Onedifference,obviously,isthatyoumustdesignatesomenodesas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynodes.Usuallyyoudothiswhenyoufirstaddthem,byusingthe toolbarbuttontoadddecisionnodes,andthe buttontoaddutilitynodes.However,youcanchangenodekindsusingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogbox,orbyselectingthenodesyouwishtochange,andthenclickingonthetoolbarbuttonforthedesiredkind,whileholdingdowntheCTRLkey.
Youdon’tentera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">tablefordecisionnodes,sinceNeticafindsthatwhenitsolvesthedecisionnet.
Utilitynodesmustbecontinuous,anddonotneedtobediscretized.Youmayhavemultipleutilitynodes,andNeticawillusethesumofthemasthetotalutility.Utilitynodesshouldnothave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">children.
Thereshouldbeatleastone=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_path.htm');returnfalse;">directedpaththroughallthedecisionnodestoindicatetheirorderingintime.Youdonotneedtoaddno-forgettinglinks;Neticawilladdanynecessaryoneswhilesolvingthedecisionnet.
No-ForgettingLinksNormally,intheprocessofmakingadecision,adecision-makerwillknowatleasteverythingknownforearlierdecisions,aswellaswhatthoseearlierdecisionswere.
Thatcanberepresentedinthedecisionnetbyincludinglinkstoadecisionnodefromallearlierdecisionnodes,andfromalltheir=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentnodes.Theselinksarecalledno-forgettinglinks,sincetheyindicatethatalltheinformationthedecisionmakerknewearlier,hestillknowswhenmakinglaterdecisions.Keepinmindthatlinksenteringadecisionnodeare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_informational_link.htm');returnfalse;">informationallinks,andindicatewhatthedecisionmakerwillknowwhenhemakesthedecision.
Havingmoreinformationtomakedecisionsalwaysleadstoapolicyhavinggreaterexpectedutility,ifthatinformationisrelevant.Manyoftheno-forgettinglinksmaynotberelevant;theyprovideinformationaboutthepastthatdoesnothelpinthenewdecision.Iftheselinksareincluded,theoptimaldecisionfunctionswillsimplyignorethem,andtheexpectedvalueofthepolicywillbethesame,buttheymayresultinverylargerelationtablesforthelaterdecisions.
Whenconstructingadecisionnet,youdonotneedtoconcernyourselfwithno-forgettinglinks,aslongasyouputenoughtocreatea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_path.htm');returnfalse;">directedpathrunningthroughallthedecisionnodes(toindicatetheirtimesequence).WhenNeticasolvesthedecisionnetitwillremoveirrelevantno-forgettinglinks,andaddanyrelevantonesthatarenotpresent,basedonthestructureofthenet.
Ifyouwishtoseealltheno-forgettinglinksimpliedbyadecisionnet,makesurethereisa=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_path.htm');returnfalse;">directedpathrunningthroughallthedecisionnodesandchooseModify→AddNo-ForgettingLinks.Thisisusefulwhensolvingthedecisionnetusingthealternatemethodofnodeabsorption(insteadofcompiling).
SolvingaDecisionNetAftercreatingadecisionnet,youcancompileitinthesamewayasyoucompileaBayesnet(excepttheoptimizingcompilerdoesn’tworkondecisionnetsyet).
Neticawillattachtoeachdecisionnodeadeterministicfunction(theoptimalisneverprobabilistic),whichprovidesavalueforthedecisionnodeforeachpossibleconfigurationof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentvalues.Sincethelinksintoadecisionnodeindicatewhatthedecisionmakerwillknowwhenheisabouttomakethedecision,thisfunctionprovidesadecisionforeachpossibleinformationstate.Takentogether,thedecisionfunctionsfromeachofthedecisionnodesforma=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_policy.htm');returnfalse;">policywhichmaximizesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueofthesumoftheutilitynodes.Youcanusethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogboxtoexaminetheoptimaldecisiontableforeachdecisionnode.
Todisplaytheoverallexpectedutilitycorrespondingtoeachchoiceofadecisionnode,changethenodestyletobelief-bars.Thenumericalvaluewillappeardirectlyaftereachstatename(althoughnobarswillbedrawn).Thebestdecisionistheonewiththehighestexpectedutility.
FindingsanddecisionnodechoicesmaybeenteredinthesamewayasforBayesnets,andupdatingdonetorevealthenewprobabilitiesandexpectedutilities.
LinksChange:Whenyoucompileadecisionnet,Neticamayaddorremovesomelinksintodecisionnodes.Ifalinkdisappears,thenitmeansthatforallpossibleutilities,CPTsorfindings,thatlinkwon'tberelevanttothedecision.
Ifanewlinkappears,thenitisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_no_forgetting_link.htm');returnfalse;">no-forgettinglinkthatisrelevanttothedecision.
MissingNumbers:Ifthereisapathfromonedecisionnodetoanother,itmeansthattheancestordecisionistobemadebeforethedescendentdecision.Soyoumustenterachoicefortheancestordecisionnodebeforeutilitieswillbedisplayedatthedescendentdecisionnode(ifyouarefamiliarwithHugin,youwillknowthatitdisplaysutilitiesforthedescendentdecisionnodeallthetime,buttheHugindocumentationstatesthatthesevaluesarenotmeaningfuluntiltheancestordecisionchoiceisentered).
Example:Foranexampleofsolvingadecisionnet,seetheumbrellaexample.
SolvingaDecisionNetbyNodeAbsorptionUsuallyyousolveadecisionnetbycompiling,butifyouknowaboutnodeabsorption(linkreversal),youmaywanttousethat.Whensolvingbynodeabsorption,theremustbeonlyoneutilitynodeanditmustnothaveanychildren.Alsothenetmusthaveallno-forgettinglinksaddedbeforesolving.
ChooseNetwork OptimizeDecisions,andNeticawillattachtoeachdecisionnodeitsoptimaldecisionfunction.Takentogether,thedecisionfunctionsfromeachofthedecisionnodesforma=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_policy.htm');returnfalse;">policywhichmaximizesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueoftheutilitynode.Inthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">MessageswindowNeticawillprinttheexpectedutilityoffollowingthispolicy.Itwillalsoputupa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogboxshowingthedecisionfunctionforthefirstdecisionnode.Youcanusethenodeselectorintheupperlefttoseethedecisionfunctionsforothernodes.
Fortheumbrellaexample,thedecisionwillbe:
Forecast Bestdecision
sunny dont_take_umbrella
cloudy dont_take_umbrella
rainy take_umbrella
And“Expectedutility=77”willbeprintedintheMessageswindow.
Thenodeabsorptioncanalsobedonemanually.=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">Selectallthenodesandthenclickthe toolbarbutton.Thenetwillbedecomposedandonlythedecisionnodesandutilitynodewillbeleft.Eachdecisionnodewillhavetheoptimaldecisionasitsrelation,butitmayhavesomeparentlinksremoved.Anyremovedlinksareonesthatareirrelevanttothedecision.Alltheutilitynode’sparentswillberemoved,anditwillhavethemaximizedexpectedvalueasitstable.After=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">observingthetables(andperhapscopyingandpastingthemtoanewnet),youcanrestoretheoriginalnetbychoosingEdit Undo.
Alternatively,youcanabsorbthenodesone-by-one,butyoumustpickalegalorder(Neticawilltellyouifyoutrytouseawrongorder).
ModelIterationForsomeapplicationsofdecisionnets(especiallyinareaslikegambling,controlorautomateddecisionmaking),itisrelativelyeasytosetupthetablestosuitablyreflectreality,andthedecisionsthatthenetmakesaremuchbetterthandecisionsyouwouldmakeunaided,becauseofNetica’ssuperiorabilitytoreasonpreciselywithprobability,andtodealwithmanyinteractionsinverycomplexsituations.
Howeverforotherapplications(especiallyinareaslikebusinessdecisionmakingorpublicpolicy),thedecisionsthatNeticamakesmaynotmatchyour“gutfeelings”,andyoumaysuspectthatNeticaiswrong.Inthatcase,usuallythedecisionnetdoesn’tcapturethedecisionproblemwellenough.Theusualprocedureistogobacktothedecisionnetmodel,changeittomoreaccuratelyreflectreality,andsolveitagain.Thenrepeattheprocessuntilyouaresatisfiedwiththeresults.
But,ofwhatuseisthedecisionnetifallyoudoistrytogetittomatchthedecisionsyouwouldmakeanyway?Professionaldecisionanalystswhousedecisionnetsonaregularbasistellusthattheyareinvaluablefordisciplineddecisionmaking.Theprocessofbuildingthedecisionnetclarifiestheproblem(oftenslowlychangingyourgutfeelingasyouproceed),andtheiterationprocessforcesyoutore-examineassumptionsyouhavemade.
Inagroupdecisionmakingenvironment,creatingadecisionnetisoftenofgreatbenefitinfleshingoutthedifferencesinpeople’sbeliefsandvalues,andallowspeopletodiscussspecificsratherthanarguingingeneralities.
Also,oncethepolicyisformed,thedecisionnetactsasalivingdocumentofthebeliefsandvaluesthatleadtoit.Ifthosechangeovertime,thedecisionnetcanbechangedtogenerateanewpolicy.Orpartsofitcanbecopiedandpastedintonewnetsfornewdecisionproblems.Ifapolicyresultsinabadoutcome,itispossibletogobackanddeterminewhetheritwasbasedonbadinformation,andifso,tochangethatinformationforthenextdecisionmakingsituation.
What-ifDecisionAnalysisWithNetica’sundofeatureitiseasytosolveadecisionnet,undoit,changeautilityvalueoranodetable,andthenre-solvethenettoseehowtheoptimaldecisionsandmaximumexpectedutilityareaffected.
Butwhatifyouwanttoforceadecisionnodetohaveacertaindecisionfunction,andseehowtheotherdecisionsandmaximumexpectedutilitychange?Justenterthedesireddecisionfunctionforthenodeinitstabledialogbox(orpasteitin,sinceyouareoftenobtainingitfromaprevioussolutionofadecisionnet),selectthedecisionnode,andchangeitintoanaturenodebyclickingthe toolbarbuttonwhileholdingdowntheCTRLkey.Thensolvethenetintheusualway,andobservethechangestotheotherdecisionfunctionsandthechangetothemaximumexpectedutility.Ofcourseyoucanuse‘undo’toreturntotheoriginalsituation.Ingeneral,whenyouwanttosetadecisionnodetoacertaindecisionfunctionwhileyoucontinueyouranalysis,youtemporarilychangeitintoanaturenode.
DisplayStyleandPrintingTheStylemenuallowsyoutochangethewaynetsaredisplayedandprintedout,withoutchangingwhattheymeanorthewaytheybehave.Thesize,font,colorandlabelingofthenodescanbeadjusted,andindividualnodescanbedisplayedinaformwhichisbestforthatnode.Thelabelingandnatureofthedisplayedlinkscanalsobechanged.Themagnificationofthedrawingcanbeadjusted.
Netdiagramscanbeprintedwithaprinter,incolorandmagnified/reducedifdesired.PresentationqualitygraphicscanbecreatedbycopyingandpastingfromanetintootherapplicationsorbygeneratingSVGgraphics.
Ifanend-userwhoisnotfamiliarwithBayesnetsisgoingtobeusingthefinishednet,thenitcanbedisplayedinasuitablemanner,perhapsbyhidinglinksandsomenodes,anddisplayingtherestofthenodesasbargraphs,meters,ordataentryovals,dependingontheapplication.Youmayalsowanttoplacetextonthenetdiagram,toaddatitleornote.
NodeNameandTitleDisplayEverynodehasaname,butthereare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">restrictionsonnames.Toprovideyouwithgreaterflexibilityinlabelingnodes,someorallofthenodescanalsobegivenatitle,whichhasnorestrictions.Oneofthestyleoptionsofnodesishowthenameandtitlearedisplayedonthem.
Tohaveallthenodesofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenetdisplayedusingtheirname,chooseNamefromtheStylemenu,todisplaythembytitlechooseTitle,ortodisplaythemusingboth,chooseName:TitleorTitle(Name).Thechoicethatyoumakewillapplytoallthenodesofthenet,forbothscreendisplaysandprintingdisplays.
Tochangethenameortitleofanode,usethenodedialogbox.
Ifyouaredisplayingnodesbytitle,andsomenodesdon’thaveatitle,thentheirnamewillbeusedinstead.ThestartingstyleofanewnetisTitle,butyoumightnotnoticethisifyoudon’tenteranytitles,sincethenjustthenodenameswillappear.
FontandSizeOneofthestyleoptionsofnodesisthefontusedforthewritingwithinthem.Thenethasadefaultfont&sizefornodes,whichmaybechangedbymakingsurenonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,andthenchoosingStyle→Font(orby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchoosingModify→DefaultNodeStyle→Font).Adialogboxwillappearshowingthecurrentfontandsize,whichyoucanmodifyaccordingly.
Ifyou=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectsomenodesbeforedoingthisoperation,thenewfontwillapplytotheselectednodesonly,andwilloverridethedefault.
Ifyouchangethedefaultfont,andsomenodesdon’tchange,itisbecausetheyhaveanoverridingfont.Toresetthemtodefault,selectthem,right-clickontheselection,chooseStyle→Fontandsetthemtothesamefontasthedefault.
NodeSize:Wheneveryouchooseanewnodefont,oranewfontsize,thenodeswillberesizedsothatthewritingwithinthemfitsnicely.Infact,thewayyouenlargeorshrinkthenodesofanetistochoosealargerorsmallerfontsizeforthem.
Links:Tochangethefontforthelabelsofalldisconnectedlinks,useStyle→Links→LinkFont,oralternately,right-clickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">background
andchooseModify→DefaultLinkStyle.MoreInfo
CharacterSets:Keepinmindthatifyournetmustdisplayinternationalcharactersets,thenyoumustchoosea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Unicode.htm');returnfalse;">Unicodefontthatincludesthedesiredcharacters."ArialUnicodeMS"isusuallyasafechoice.
NodeColorOneofthestyleoptionsofanetisthecolorschemeofthenode-setswithinthenet.
DefaultNodeColors:
DecisionNodes:blue
NatureNodes:beige
UtilityNodes:pink
Note/TextNodes:lightblue
UndertheStylemenu,choose‘Colors’toproduceanode-setpropertiesdialogboxandarrangethenode-setcolorstoproducethedesiredvisualeffect.MoreInfo
NodeStylesThereareseveraldifferentformsinwhichanodecanbedisplayed,andtheseareknownasnodestyles.Thereisadefaultstyleforthewholenet,buteachnodecanbesettoitsownstyleindividually,whichoverridesthedefault.
DefaultStyle:Tosetthedefaultstyleforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenet,makesurethatnonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,andthenchoosethedesiredstylefromtheStylemenu,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchooseModify→DefaultNodeStyle.Ifsomenodesdon'tchange,perhapstheyhaveoverridingstyles(seebelow).
Tohavesomenodesoverridethedefaultstyle,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthemandthenchoosethedesiredstylefromtheStylemenu.Ifyouhavegivensomenodesanoverridingstyle,butnowyouwantthembacktothedefaultstyle,selectthemandchooseStyle→Default.
Forms:Thevariousnodeformsare:•Labeled-Box:
Drawsaboxwhoseshapeandcoloraredeterminedbythenodekind,withthename/titleofthenodewrittenwithinit(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicnodeswillbedisplayedusingathickborder).
•Belief-Bar: Drawsabargraphshowingthecurrentbeliefsforeachstateofthenode.
•Meter: Displaysaneedlemetershowingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_mean_value.htm');returnfalse;">meanvaluefor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousnodesandthecurrent=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">belieffor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenodes.
•Hidden: Doesn'tdrawanything(youcanalsohidethelinks).
•Circle: Displaysthenodeasasmallcircle.
OtherStyles:Keepinmindthatyoucanalsochangeotheraspectsofthenodestyle,suchasthesize,font,color,andlabelingofthenodes.
Belief BarNodeStyleThenodeformmostusefultodisplaythe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsofamulti-statenaturenode,orexpectedutilitiesofadecisionnode,isthebelief-barstyle.Nodescanbydisplayedinthisformby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingthem,andthenchoosingStyle→BeliefBars(choosethiswithnonodesselectedtosetthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_default_node_style.htm');returnfalse;">defaultstyleofthewhole=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activenet).
Eachnodewillbedisplayedasaboxlabeledatthetopwiththenode’sname,titleorbothdependingonthenode’slabeling.
Examplesofadiscretenode(left)andadiscretizedcontinuousnode(right):
Thenameofeachstateisshowninthesectiontotheleft,alongwithanumberexpressingthebelief(probability)ofthatstateasapercentage.Ifthenameistoolongtofit,itwillendwithan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_ellipsis.htm');returnfalse;">ellipsis.Ifthe
percentageistoosmalltodisplaynumerically,butnonzero,thenitwillbedisplayedas“0+”.
Scale:Inthesectiontotherightarebargraphsdepictingthebeliefamounts.Verticaldottedlinesmarkthe25%,50%and75%levels.Ifthenodehas4orlessstates,thentheleftedgeoftheboxis0%andtherightedgeis100%,butiftherearemorestates,thenthescalemaybeexpanded,sotherightedgeislessthan100%.Ifthescaleisexpandedsomuchthattherightedgeislessthan25%,thennoneoftheverticaldottedlineswillbevisible.
Finding:Ifthenethasbeensuccessfully=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compiled,a=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">findingmaybeenteredintoanodejustbyclickingonthenameofitsstate(andremovedbyclickingonitagain).A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativefindingforanodecanbeenteredbyholdingdowntheSHIFTkeyandclickingonthenameofthestatethatitsknownnottobe.
Ifthenodehasa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefinding,thenthebarforthestatecorrespondingtothefindingwillbeborderedaboveandbelowbyblacklinesandthenodecolorwilldarkentogray(unlessyou'vechangedthedefaultnodecolors).Ifthecolorofthenodeindicatesithasafinding,butnobarissurroundedbyblacklines,thena=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativeor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">likelihoodfindinghasbeenentered.
Mean&Variance:Ifanodeis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousorhas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">statevaluesdefined,thenits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_mean_value.htm');returnfalse;">meanvalue(i.e.,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalue)willbeshowninaseparateareabelowthebelief-bars.Themeanvaluewillbefollowedbya±symbolandits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_standard_deviation.htm');returnfalse;">standarddeviation.
DisplayFewerStates:ItispossibletohaveNeticadisplayonlythemostprobablestates,whichisveryusefulfornodeshavingmanystates.Ifyou=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectsomenodes,chooseStyle→ShowOnlyNStates,andenteranumber,thenthedisplayofthosenodeswillbelimitedtotheNmostprobablestates,orderedfrommostprobabletoleast.Atthebottomwillbeanentrycalled"other-"thatisthesumtotalofallthestatesnotdisplayed.Asyouenterfindingsandthebeliefschange,thenwhichstatesaremostprobablealsochange,sowhichstatesaredisplayed,andtheirordering,changes(ifyouwanttheirorderingpermanentlychangedbybeliefs,seehere).
IfnonodesareselectedwhenyouchooseShowOnlyNStatesfromthemenu,thenthenumberyouenterwillbethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_default_node_style.htm');returnfalse;">defaultforthewholenet.Nodesthathavefewerstatesthanthenumberyouenterwill
bedisplayednormally(i.e.withalltheirstatesintheorderyoudefined).Thedefaultforanetbeforeyouchangeitis50.Soifyounoticethatonly50statesarebeingdisplayedforthenodesinyournet,youcanusethismethodtochangethat.
Dimmed:Ifthebeliefpercentagesandbarlengthsarecurrentlyinvalidforthenet’sfindings(probablybecausethelatestfindingshavenotyetbeentakenintoaccountwitha=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating),thebarswillbedrawninagrayedordottedmanner.
MeterNodeStyle–DiscreteNodesMetersareoftenthenodeformofchoicefor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_binary_node.htm');returnfalse;">binarynodesliketrue/falsepropositionsorokay/faultyconditions.Example:
Belowthemeteristhenode’sname,titleorbothdependingonthenode’slabeling.Thetwostatesareprintedatthebottomofthemeter,ontheleftandright.Theneedleindicatestherelativebeliefineachstate.Fortheright-moststate,theleftendofthescalecorrespondstoabeliefprobabilityof0%andtherightendto100%.The50%pointiswhentheneedleisvertical,sothecenterofthescaleismarkedwithatick.
HowTo:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">SelectanydiscretenaturenodeandchooseStyle→Meter.IfnonodesareselectedwhenyouchooseStyle→Meter,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_default_node_style.htm');returnfalse;">defaultstyleforthewholenetwillbeset.Iftheneedlehasbandstothesides,ornumbersappearinsteadofstates(likethis),itisbecausethenodeiscontinuousorhas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">statevaluesdefined.
Finding:Ifa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingisentered,
thebackgroundcolorofthenodewillbechangedtogray(unlessyou'vechangedthedefaultnodecolors).Ifitisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefinding,theneedlewillbeallthewaytooneside,indicatingcertainty.
Dimmed:Ifthecurrentpositionoftheneedleisinvalidforthefindingsentered(probablybecausethelatestfindingshavenotyetbeentakenintoaccountwitha=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating),theneedlewillbedrawngray,ornotatall.
MoreStates:Ifthemeterstyleisusedforanodewithmorethantwostates,thenallthestatesexceptthefirstwillbegroupedtogetherandwillbecalled“Other”.Thefirststatewillberight-mostonthemeter,soitsbeliefwillbewellrepresentedbytheneedle(0%fullleftand100%fullright).
Continuous:Foracontinuousvariableexample,clickhere.
MeterNodeStyle–ContinuousNodesBelief-metersfornodesofcontinuousvariables,orthosewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">statevaluesdefined,displayaneedlewhichshowsthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueofthenode,andbandsonthesidesoftheneedlewhichshowthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_standard_deviation.htm');returnfalse;">standarddeviation,likethis:
Thenumbertotheleftofthescaleistheminimumvalueofthevariable,andtotherightisthemaximumvalue.Belowthemeteristhenode’sname,titleorbothdependingonthenode’slabeling.
HowTo:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">SelectanycontinuousnaturenodeandchooseStyle→Meter.IfnonodesareselectedwhenyouchooseStyle→Meter,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_default_node_style.htm');returnfalse;">defaultstyleforthewholenetwillbeset.Iftheneedlehasnobandstothesides,orstatenamesappearinsteadofnumbers(likethis),itisbecausethenodeisdiscrete.
Finding:Ifa=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingisentered,thebackgroundcolorofthenodewillbechangedtogray(unlessyou'vechangedthedefaultnodecolors).Ifitisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefinding,theneedlewillbeallthewaytooneside,indicatingcertainty.
Dimmed:Ifthecurrentpositionoftheneedleisinvalidforthefindingsentered(probablybecausethelatestfindingshavenotyetbeentakenintoaccountwitha=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating),theneedlewillbedrawngray,ornotatall.
Discrete:Foradiscretevariableexample,clickhere.
LinkStylesTheStyle→Linksmenuprovidesstyleoptions,whichallowyoutochoosethewayallthelinksinthenetaredisplayed.Themenuisalsoavailableby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchoosingModify→StyleDefaultLink.
Hidden:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">TogglingStyle→Links→HideLinksallowsyoutohideallthelinksinthenet.Thisisespeciallyusefulwhenyouarecreatingsomethingforanend-userwhodoesnotcarehownodesarelinkedtogether(thenyoumayalsowanttohidesomenodes).Toavoidconfusion,itisnotpossibletodisplaysomelinksandhideothers(althoughifthenodesatbothendsofalinkarehidden,thelinkbetweenwon'tbedrawneither).
Technical:Theremaining3choicesoftheStyle→LinksmenuareforthosefamiliarwiththeprocessofBayesnet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compiling,andwishtoseehowitisbeingdone.Theyallowyoutoswitchbetweenshowingthelinkstructureofthenetwhichwasoriginallyconstructed(Style→Links→RegularDag),thelinkstructureofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Markov_network.htm');returnfalse;">Markovnetderivedfromit(→MarkovNet),andthelinkstructureofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_triangulated.htm');returnfalse;">triangulated
netderivedfromtheMarkovnetwork(→Triangulated).
Thetriangulatednetisusedinternallytodeterminethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clique.htm');returnfalse;">cliqueswhencompilingthenet,andanumberisdisplayedwitheachnodetoindicateitspositioninthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_elimination_order.htm');returnfalse;">eliminationorderofthecompilation.
TheTriangulatedandMarkovNetstylesareonlyforviewingthenet,printingit,andcopyingitsgraphics(withnonodesselected).IfyoutrytodoanyotheroperationthestylewillautomaticallychangebacktoRegularDag.Beforeyouchoosethesefromthemenu,youmaywanttosaveyournet,sincetheywilllooseinformationaboutlinkbends.
CopyingandPastingGraphicsAftercopyingorcuttingallorpartofanet,youcanpastethegraphicsintootherWindowsapplications,suchasMicrosoftWord,PowerPoint,Works,etc.Ifsomenodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectedwhentheCopycommandisdone,thengraphicsforonlythosenodeswillbeplacedinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboard.Ifnonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,thengraphicsforthewholenetwillbe.Thenodeswillbedrawnwiththesamedesignstyleastheyareshownonthescreen,soyoumaywanttoadjustthestyleoptionsbeforecopyingtotheclipboard.
Shape:Afteryoupastethegraphicintoanotherprogram,youmaywanttoadjustitssizeandshapesothattheaspectratio(i.e.height/widthratio)issimilartotheBayesnetitcamefrom,inordertoachievethebestappearance.Iftheaspectratioisverydifferentfromtheoriginal,someofthecharactersmayoverlap.
IntoWord:Neticagraphicsarepastedintootherprogramsas“enhancedmetafiles”.WhenpastingintoMicrosoftWorditisoftenmoreconvenienttohavethegraphicasaMicrosoftWord“picture”.YoucanachievethisbyfirstpastingitintoWord,thenwhileitisstillselecteddoaCut,thendoanEdit→PasteSpecialandchoose“Picture”fromthedialogbox(andperhapsremovethecheckfrom‘floatovertext’).SometimesWorddoesnotdoaperfectjobofconvertingit,butjustdouble-clickingonthegraphictobringupthepictureeditor,andthenclosingitagainwithoutmakinganychanges,seemstofixanyimperfections.
Bitmap:Ifyouwanttopasteanetintoabitmapprogram,suchas“Paint”(whichcomeswithMicrosoftWindows),itisrecommendedthatyoupressALT+PRINTSCREENwhileNeticaisthecurrentapplication.ThecontentsofthewholeNeticawindowwillbeplacedintheclipboardinbitmapform,soyou
canpasteitintowhateverprogramyouwant,andtheneditittoremovepartsoftheimageyoudon’twant.
PrintingYoucanprintanetonaprinterwithFile→Print,orfromthecommandline.FirstyoumaywanttouseFile→PrinterSetuptoselectprintingoptions,suchaspagesize,margins,magnification/reduction,andwhichprintertouse.AfterpressingOkayonthefirstdialogboxwhichcomesup,ifthediagramislargeenough,youwillbequeriedforhowmanypageslargeyouwanttheprintingtobe(defaultistoappearononepage).Ifyouleavethoseentriesblank,thenyouwillbequeriedforaprintermagnificationinstead(defaultis100%).
Multi-Page:Ifthenetdiagramislargerthanonepage,thentheprinterwillprintpartsofitonseparatepagesinsuchawaythatthepagescanbetrimmedandthenattachedtogethertoproducetheoveralldiagram.Ifyouwishtoseewhatpartofthediagramwillenduponwhichpage,youcanturnonthepagebreaksby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">togglingLayout→ShowPageBreaks.Thiswilldrawlightbluelinesatthepagedivisions,whichcanalsobeusefulforvisualizingyourdrawingsize.
Whenyouchangethemagnification/reduction(ormargins,etc.)usingFile→PrinterSetup,thepagebreaklineswillshiftshowinghowmuchfitsoneachpage.
IfyouwantreallyprofessionalgraphicsresultsfromNeticauseSVGs.
SVGGraphicsNeticacangenerateveryhighqualitygraphicsforprintpublishingorwebsiteconstruction.ThesegraphicsareinaformatknownasSVG,whichstandsfor"scalablevectorgraphic".ItisthemainXMLbasedformatforgraphics,andsinceitisavectorgraphic,theimageslookverygoodatallresolutions,andthefilesizesareverysmall.(Neticacanalsomakeothervectorgraphics).
SVGwasjointlydevelopedbyW3C,Adobe,Sun,Apple,IBM,etc.Microsofthasstatedthatalltheirrelevantproductswillsupportit(thelatestversionofMSVisionowdoes).SVGgraphicscanbeimportedintomostmodernAdobeproducts,foreditingorconvertingtoothergraphicsformats.TheFirefox(Mozilla)andOperabrowsersnativelysupportSVGgraphics,andvariousplug-insareavailablefortheMicrosoftbrowser.
HowTo:HaveNeticadisplayyourBayesnetinthedesiredstyle,makesureitisthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activewindow,andchooseFile→MakeSVGGraphic,orpressCTRL+G.Ifyouwantthegraphictobeofasubsetofthenet,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthedesirednodesfirst.ThedefaultformatthatNeticawillgenerateisSVGZ,whichisacompressedSVG.SVGZisgenerallyabetterchoicebecauseithasasignificantlysmallerfilesize,producesexactlythesameimage,andmostprogramscanworkwithit.IfyouneedaregularSVG,eitherbecauseitisforsomeprogramthatcan'tworkwithSVGZ,orbecauseyouwanttoexamineoredititwithatexteditor(orXMLeditor),thenchoose"GraphicsFile-XML(.svg)"fromthedrop-downmenuatthebottomoftheSaveAsdialogboxthatappearsduringgeneration.
ImageEditing:OnceanSVGhasbeenmade,youcanopenitwithMicrosoftVisioandedittheimage.Nodeswillactaswholeobjects,sotheycanbemoved,resized,scaled,etc.Ifyouwanttoeditsomefeaturewithinanode,youmustfirst"ungroup"thenode,withShape→Grouping→Ungroup.Youcanalsoaddtitlesandgraphics,changecolorsandtheliketomakesharp
presentationpieces.
MicrosoftBrowser:SinceMSInternetExplorerdoesnotyetnativelysupportSVG,itrequiresaplug-in.Thereareseveralavailable,butcurrentlythebestistheonefromAdobe,sinceitcandozoomingandpanning.Thatplug-inusuallygetsquicklyandpainlesslyinstalledovertheinternetassoonasExplorertriestodisplayanSVG(afterputtingupadialogboxaskingifyouwantitinstalled).Ifyoudon'tseethedialogbox,thenyoucangettheplug-infrom:
http://www.adobe.com/svg/viewer/install/main.html
Examples:IfyouwishtoseeexamplesofSVGsgeneratedfromBayesnetsandhowtobuildawebsiteusingthem,see:
http://www.norsys.com/netlibrary/index.htm
WebsiteConstruction:ToaddanSVGgraphictoawebpage,youcanputthe.svgor.svgzfileinthesamedirectoryastheHTMLfileforthewebpage,andintheHTMLfileput:
<embedsrc="myFile.svgz"width="100%"height="100%"pluginspage="http://www.adobe.com/svg/viewer/install/">
Thewidthandheightattributesarenotstrictlynecessary,butareoftenuseful.
NotethatAdobenolongerrecommendsusingtheOBJECTtag(seehttp://www.adobe.com/svg/viewer/install/mainframed.html
Forthewebserver,youprobablydon'thavetodoanything,sincerecentversionsofwebservers(Apache,IIS,etc.)arealreadyproperlyconfigured,butforolderversionsyouneedtoaddtotheirmime-typetablethattheofficialMIME-typeforSVGandSVGZdocumentsis:
image/svg+xml
TheaboveinformationwasvalidasofOct2006,butsincebrowsersoftenchange,itmaybewisetoGoogleforthelatestrecommendationsfromAdobe,Microsoft,Mozilla,Opera,etc.Usefulsitesinclude:
http://www.adobe.com/svg/indepth/pdfs/ReadMewin.pdf
http://www.adobe.com/svg/viewer/install/mainframed.html
http://svg-whiz.com/wiki/index.php?
title=Server_Configuration
http://svg-whiz.com/wiki/index.php?title=MIME_Type
http://www.mozilla.org/projects/svg/faq.html
ForsupportingolderversionsofFirefoxandOperathatdonotsupporttheEMBEDtag,wehavefoundthefollowingtowork:
<head><scriptlanguage="Javascript">vari.e.=false;</script><!--[ifIE]><scripttype="text/javascript">i.e.=true;</script><![endif]--></head><body><scriptLANGUAGE="Javascript">if(i.e.){document.write('<embedsrc="myFile.svgz"width="100%"height="100%"
pluginspage="http://www.adobe.com/svg/viewer/install/">');}else{document.write('<objectdata="dir/myFile.svgz"width="100%"
height="100%"type="image/svg+xml"></object>');}</script></body
ReportsandDataLinkingThepurposeofNeticareportsisto:displayinformationin=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_file.htm');returnfalse;">textformonthescreen,sendittoaprinterorafile,orpasteitintoawordprocessingorspreadsheetprogram.SomeinformationcanalsobesentbyhotlinkstoMicrosoftExcel,orNeticacanbelinkedtoaprogramyoucreateusingNeticaAPI.
FromtheReportmenu,youcangeneratereportson=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTtablesofnoderelations,thefindingscurrentlyentered(i.e.thecase),beliefsforthecurrentcase(i.e.posteriorprobabilities),summarystatisticsonthewholenet,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontreestructureandtheeliminationorderusedforcompiling,oralistofthecurrentlyselectednodes.Neticacanalsogeneratereportsonutility-freesensitivityandhowwellaBayesnetperformswithrespecttoadataset.
HowTo:TheReportmenuconsistsofthreegroupsofitems,separatedbyhorizontalmenulines.Tomakeareportyounormallychooseitemsfromthesecondgrouptodeterminewherethereportwillbesent,anditemsfromthethirdgrouptochoosethereportoptions.Thenmakeachoicefromthefirstgrouptogeneratethereportonthedesiredsubject.
Seealso:UserReports
ReportSubjectsNeticacangeneratetextreportson:
Network Summaryinformationonthewholenet.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_whole.htm');returnfalse;">EXAMPLE
CustomReport Tailoredinformationonanode(s)orthewholenet.
Findings(Case) The=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings(i.e."case"or"evidence")currentlyentered,includinglikelihood("virtual")findings.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_findings.htm');returnfalse;">EXAMPLE
Equations Alistofall=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equationsofnodes.ChoosingtheHorizontalFormatoptionprintsthemininternalform.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_equations.htm');returnfalse;">EXAMPLE
Beliefs Thecurrentbeliefs(i.e.posteriorprobabilities)fornaturenodes,andexpectedutilitiesfordecisionnodes.typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_beliefs.htm');returnfalse;">EXAMPLE
Node-Sets Thelistofnodeswithintherequestedset.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_nodesets.htm');returnfalse;">EXAMPLE
CPTTables Thenoderelationasaconditionalprobabilitytable(
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontable.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_CPT.htm');returnfalse;">EXAMPLE
ListofSelected Alistofthenamesofthenodescurrentlyselected.typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_listselected.htm');returnfalse;">EXAMPLE
=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">JunctionTree
Detailsofthenetcompilationprocess.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_junctiontree.htm');returnfalse;">EXAMPLE
EliminationOrder Theorderusedduringcompiling.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_elimination.htm');returnfalse;">EXAMPLE
LinkstoExcel Hot-linkstothenodebeliefs.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_excel.htm');returnfalse;">EXAMPLE
EachoftheaboveisanitemoftheReportmenu,andchoosingitwillgeneratethatreport.Youcanalsosetoptionsorchangethedestinationofthereport.
WhichNodes:TheNetwork,JunctionTreeandEliminationOrderreportsalwaysapplytothewholenet.ListofSelected,CPTTablesandLinkstoPasteinExcelreportsapplyonlytothenodescurrentlyselected.Theothersapplytotheselectednodesifsomeareselected,orthewholenetifnoneare.
IftheFindingsreportisdonewithnodesselected,theywillallbelistedinthereport,buttheirfindingswillbeleftblankiftheydon’thaveone.Ifnonodesareselected,onlythosenodeshavingafindingwillbelisted.
Dimmed:JunctionTreeandEliminationOrderwillbedimmedifthenetisnotcompiledListofSelected,CPTTablesandLinkstoPasteinExcelwillbedimmedifnonodesareselected.
ListofSelectedcanbeusedtosavethecurrentsetofselectednodes,tolaterberestoredwithEdit→SelectNodes→ListedinClipboard.ItisalsousefulafteranEdit→FindAllsearchtogenerateatextlistofthefoundnodes.
ReportDestinationsReportscanbesenttoanyof:
•To=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">MessagesWindow•Copyto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">Clipboard•ToFile
EachoftheaboveisanitemoftheReportmenu,andchoosingtheitemwill=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggleitonoroff.Ifthereisacheck-markbesidetheitem,thenwhenareportisgenerateditwillbesenttothatdestination(soitmaygotomultipledestinations).
IfCopytoClipboardischeck-marked,thenaftergeneratingthereportyoucansimplypasteintoatexteditor,spreadsheetprogram,wordprocessor,etc.Ofcourse,youcanalwayshavethereportsenttotheMessagesWindow,whereyoucanlookatitoreditit,thencopyitfromthereandpasteit.However,ifitistoolarge,itmaynotfitintheMessagesWindow.
IfyouchooseToFile,youwillbeaskedwhichfiletosenditto.Ifyouwishtoremovethecheck-markfromToFile(sooutputisnotsentthere),chooseReport→ToFileandwhenthedialogboxappears,clickitsCancelbutton.YoucanusethereportoptionReport→AppendtoFiletodeterminewhethertooverwriteanexistingfile,orappendtoit.
IfitisannoyingyouthattheMessageswindowkeepscomingtotheforegroundwhensendingareporttotheclipboardorafile,thenuncheckToMessagesWindow.
ReportOptionsThereportoptionsare:
•IncludeNames•HorizontalFormat•TabSeparators•AppendtoFile
EachoftheseisanitemoftheReportmenu,andcanbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggledonandoff.
IfIncludeNamesischeck-marked,thenthenamesofnodesandstateswillbeincludedinthereportsforfindings,relationCPT,beliefsandbelieflinks,otherwiseonlythenumberswillappear.Whethernodesarereferredtobyname,titleorboth,canbesetbychangingthestyleofthenet.
HorizontalFormateffectsonlytheequations,findings,beliefsandbelieflinksreports.Ingeneralitproducesamorecompactreport,especiallyifnodeshavethesamestatenames.Forequations,itshowstheinternalrepresentationoftheequation.
TabSeparatorsshouldbecheck-markedifyouaregoingtopastethereportintoaspreadsheet(suchasExcel).Ifyouarepastingintoawordprocessingprogram(suchasMSWord),theneitherusespaceseparatorsandchangethefonttoamono-spaceoneafterpasting(suchasCourier),orusetabseparatorsandadjustthetabpositionsofthepastedtexttoproducepleasingcolumns.
LinkingwithExcelUsingreports,NeticacansendthebeliefsitcalculatestoanExcelspreadsheet.DescribedelsewhereisNetica'sabilitytolearnfromcasesusingExcel.
HowTo:FromtheReportmenu,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">toggletheoptionsHorizontalFormatandIncludeNames,dependingonhowyouwantthereporttolookinExcel(theotheroptionsareignored).=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">Selectthenodesofinterest,andthenchooseReport→LinkstoPasteinExcel.Thebelieflinks(AKAhot-links)willbeplacedinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clipboard.htm');returnfalse;">clipboard(thedestinationchoiceisignored).
Then,clickinasinglecellofanyExcelsheet,andpaste.Onceyouhavepasted,thebeliefnumberswillappearinExcel,andwillautomaticallychangewhenevertheychangeinNetica(forexample,asaresponsetoenteringafinding).
Beautifying:Whilethepastedcellsarestillselected,youmaywanttochooseFormat→Cells…fromExcel,clickontheAlignmenttabofthedialogboxwhichappears,andthenchooseHorizontalLeft.Itmaylookbettertowidensomeofthecolumns.Youcandeleteanyofthepastednamesornumbersyouarenotinterestedin,andcutandpastetheotherstomovethemaround.Theycanbeusedastheinputforanyequation,etc.,justlikeanyothercellinExcel.
NeticaExits:IfyoustoptheNeticaprogram,whileExcelwiththelinksisstillrunning,thebeliefnumbersusedwillsimplybethelastonesNeticaproduced.IfyourestartNeticathenExcelwillcontinuetousetheoldnumbersuntilyoutellittoreconnecttoNeticabyclickingonanycellwithalinkinit,thenclickinginthe"fx"textboxforeditingthecellscontents,andthenclickingthegreencheck-mark,orpressingtheENTERkey.
Alternately,youcanchooseEdit→Links…fromthemenu,andinthedialogboxthatcomesup,clickonthefirstlinkandthenSHIFT-clickonthelastonesotheyareallselected,andthenclicktheUpdateValuesbutton,andthentheClosebutton.Afterthedialogboxisgone,thelinkswillbereconnectedandwillremainso.
ExcelExits:IfyoustopExcelwhileNeticaisstillrunning,andthenrestartExcelandopenthespreadsheetwithlinks,thereconnectionwillbemadeautomatically.IfsomenetshavetobereadintoNeticabecauseExcelreferstothem,and/orcompiledorupdated,thatwillhappenautomatically.
Troubleshooting:TotroubleshootExcellinkswithNetica,ortocontroltheirbehavior,checkthefollowing:Edit→Links…Theyshouldhave"A"inthe"Update"columntoupdateautomatically.Tools→Options→Calculation→UpdateremotereferencesshouldbecheckedTools→Options→General→IgnoreotherapplicationsshouldNOTbecheckedTools→Options→Edit→AsktoupdateautomaticlinksEdit→PasteSpecialisnotrequiredwhenpastingthelinks.
LinkingwithNeticaAPI=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_Application.htm');returnfalse;">NeticaApplicationcanbeusedtoprovideauserinterfacefor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPI.Bayesnetscanbedisplayedintheusualway,findingscanbeenteredandbeliefsdisplayed,withNeticaAPIautomatingNeticaApplication.
ThisisanexcitingnewfeaturethatisbeingexpandedwitheachnewreleaseofNetica.InmanycasesitallowsyoutowriteashortprogramthatextendsthefunctionalityofNeticaApplication,orashortprogramthatcompletelycontrolsNeticaApplicationtodosomespecificfunction.
NeticaAPI(embeddedinyoursoftware),runsconcurrentlywithNeticaApplication,asaseparateprocess,andtheycommunicatewitheachother.Thecommunicationiscompletelytransparenttoyou;allyoudoiscalltheregularNeticaAPIfunctions,andallthedetailsaretakencareof.
ThesecapabilitiesarebuiltintoversionsofNeticaafter3.17.Contact=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsystoobtaindocumentationonusingthem.AversionofNeticawithaCOMinterface(ActiveX)hasnowbeenreleased,whichprovidesyetanotherconnectivityoption.
GeneratingUserReportsYoucanuseNeticatodisplayinformationorreportwindows,calleduserreports.Thepurposeismainlytoprovideextrainformation,assistanceordirectionseithertodevelopersortootherswhomaybeusing/viewingyourBN.Auserreportcouldbeassimpleasatextmessagegivingamoredetaileddescriptionofanode.Oritcouldbemorecomplex,suchasthecurrentbeliefprobabilitiesofanode-set,orasensitivityanalysisofquestionswithrespecttothetargetnode.
UserreportsareoftenusedwithNetica-Web,astheycanalsobecreatedfortheuseronthecurrentcaseorinferredresults,whichcanbeprintedoutorsavedtofile.TheycanalsobeusedfromtheAPI.
TheNeticamechanismtosupportthisiscalledcustomreports.Youcancreateatemplatefileormodifyanexistingtemplate(usuallyinHTMLwithspecialnotationsforreportelementstobeinserted)whichdefineswhatyouwanttohavedisplayed.YouthenaccessthattemplatefilefromyourBayesnet.Atemplatefilecanbeusedtogenerateareportontheoverallmodel(i.e.Bayesnet),oritcanapplytoindividualquestions(i.e.nodes).Inthefirstcase,itiscalledanettemplatefile,andthetagswithinitstartwith"Net",andinthesecondcaseitiscalledanodetemplatefile,withtagsthatstartwith"Node".
Seealso:ReportsandDataLinking
AddingaReportAddingandcreatingcustomreportstoyourtemplatefolderisquickandsimple:
1.Createorcustomizeareporttemplatefile.
2.Editandsavethetemplate.
3.Selectthedesirednode(s)andchooseReport→CustomReport.
1.Createareportfile:Thefirststepistocreatetheuserreportfile.Theeasiestwayistouseanexistingreporttemplatefile,ormodifyonethatissimilartowhatyouwant.Tofindexistingtemplatefiles,lookintheReportTemplatesfolder,whichisinthesamefolderastheNeticaexecutable:Netica.exe(thepathtothisfolderisprintedoutintheMessageswindowofNeticaApplicationwhenitfirststartsup).
2.Editthetemplate:Youcanopenandeditan.htmfiledirectlyinNetica,bychoosingFile→OpenasText.However,thedefaulttemplatesareHTMLfiles,soyouwillprobablywanttouseatexteditorthathasspecialfacilitiesforHTML(suchasVisualStudio.YouconstructthetemplatefileoutofnormalHTMLcode,butyouputspecialtagswhereyouwantNeticatoinsertinformation.
Thetagsconsistofdoubleopeningsquarebrackets[[followedbyoneofthetagnames,possiblyfollowedbysomeextradirectionsinparenthesis,andendingwithtwoclosingsquarebrackets]].Youcanrefertonodesaccordingtotheirnumberoraccordingtotheirname.Forselection,thenodethatyouselectfirstwillbeconsideredNode(0).ThesecondnodeselectedwillbeSelNode(1).
Fornumber,write:[[Node(0).someInstruction]]
Forname,write:[[Node("nodename").someInstruction]]
Thensaveyourtemplatefilewhereveryouwish.Ifyouaremakinghtmfiles,theextensionshouldbe'.nsp.htm'.ItisprobablybestnottosaveyourtemplatesinthesamefolderastheonesthatcomewithNeticaApplication,justsotheydon'tgetmixedup.
3.Generatetheuserreport:Next,selectthedesirednode(s)andchoose
Report→CustomReporttogeneratethetailored"report".Fromthefiledialogwhichappears,pickthetemplatefileyouhavejustcreated.Inamomentyourbrowsershoulddisplaytheresultsofyourreport.Note:thereportwillbedisplayedinwhateverformatitwascreated(e.g.htmfileswillbedisplayedinaninternetbrowserwindow,docfileswillbedisplayedinMicrosoftOfficeWord,etc).
ReportsonMultipleNodes:Youcanrunacustomreportonasinglenode,multiplenodes,ortheentirenet.Torunareportonmultiplenodes,firstselectthenodesthenchooseCustomReport.Openthetemplatefileyoucreatedforthosenodes,whichshouldcontaintextwiththeprefix:[[SelNode(0).someInstruction]].Remember,thenodeyouselectfirstwillbeconsideredNode(0).
AvailableUserReportTagsThefollowingtagsmayappearinanyreporttemplatefile,indoublesquarebrackets.Theywillbereplacedwithareportaccordingtotheirdescription.Foranexampleoftheiruse,seethefile"ReportTemplates\NetAll.nsp.htm".Foreditingtips,seeitem2ofaddingareport.
Net.BeliefsTableReportonallthebeliefsinthenet.Canbedisplayedintextorhtmlrespectively,asNet.BeliefsTable(TextFormat)andNet.BeliefsTable.
Net.CaseIDTheIDnumberofthecasecurrentlyreadintothefindings.Net.CaseProbabilityThejointprobabilityofthefindingscurrentlyentered,aspredictedbythenet.
Net.CaseExpectedUtilityTheexpectedutilityofthefindingscurrentlyentered.
Net.CommentCommentsmadewithinthenetorthenetdescriptionNet.EliminationOrderList(Seperator=",")Theeliminationorderusedtoconstructthejunctiontree.
Net.Equations(Compiled)Reportonalltheequationswithinthenet.Ifthe"Compiled"tagisleftout,thentheequationswillappearintextasentered.WiththeCompiledtag,theequationappearsinaninternal(text)format,whichissometimesilluminating.
Net.FileNameFilenameshouldendin.netaNet.FindingsList(Equals="=",Seperator=",")
Reportonallthefindingswithinthenetinlistformat.Net.FindingsTableReportonallthefindingswithinthenetintableformat.Canbedisplayedintextorhtmlrespectively,asNet.FindingsTable(TextFormat)andNet.FindingsTable.Ifyouwantthequestionslistedvertically,youcanuse:Net.FindingsTable(VerticalFormat)
Net.GraphicReportonnetgraphics.Notavailableonmostsystems.Net.JunctionTreeTable(TextFormat)Reportonthenet'sjunctiontree.
Net.ModifyDateDateBayesnetfilewaslastmodified.
Net.NameNameofthenet.Net.NodesetTableReportonthenode-setswithinthenet.Canbedisplayedintextorhtml,asNet.NodesetTable(TextFormat)orNet.NodesetTablerespectively.
Net.OverallTableReportontheoverallnet.Canbedisplayedintextorhtml,asNet.OverallTable(TextFormat)orNet.OverallTable(StyleHtml=tableOverall).Thisreportcontainsgeneralnumericmeasurementsonthenumberofnodesofeachtype,numberoflinks,numberoffindings,numberofloops,andnumberofCPTsetc.
Net.TitleTitleofthenet.Net.User(Field="..")Thevalueofthenameduserfield.EspeciallyusefulwhenbuildingNetica-Webprojects.
NodeTagsThefollowingtagsmayappear,indoublesquarebrackets,inareporttemplatefilemeantforanode.Theywillbereplacedwithareportaccordingtotheirdescription.Foranexampleoftheiruse,seethefile"ReportTemplates/NodeAll.nsp.htm".
Node.BeliefsList(Seperator="</td><td>")
Node.Comment
Node.CPTable
Node.CPTable(Experience)
Node.CPTable(TextFormat)
Node.Equation(Compiled)Thisnodesequation,ifithasone.Ifthe"Compiled"tagisleftout,thentheequationwillappearintextasentered.WiththeCompiledtag,theequationappearsinaninternal(text)format,whichissometimesilluminating.
Node.Finding
Node.HoverComment
Node.InputName(Parent=0)
Node.IsDeterministic
Node.Kind
Node.Label
Node.MutualInfo(Node="TargetNode(0)")
Node.MutualInfo
(Node="TargetNode(0)",Fraction=Percent)
Node.MutualInfo(Node=0)
Node.MutualInfo(Node=0,Fraction=Percent)
Node.Name
Node.NumberStates
Node.Real(State=0)
Node.RelativesList(Generation=-3,Seperator=",")
Node.RelativesTable(StartGeneration=-4,
EndGeneration=2,StyleHtml=table)
Node.SensitivityTable(MutualInfo)
Node.SensitivityTable(TextFormat,MutualInfo)
Node.StateComment(State=0)
Node.StateLabelsList(Seperator="</td><td>")
Node.StateName(State=0)
Node.StateTitle(State=0)
Node.ThresholdLower(State=0)
Node.ThresholdUpper(State=0)
Node.TitleNode.Type
Node.VarianceReal
(Node=0,IndicatesUnknown="unknown")
Node.VisualPositionNode.VisualStyle
Built-InGenericReportTemplateFilesNeticacomeswithanumberofpre-madetemplatefilesforcommontypesofreports,andtheymightbejustwhatyouneed.Ifyourequireamorecustomizedapproach,youcancreateyourowntemplatefile.Ifso,youmaywanttouseoneofthegenericonesasastartingpoint,orexamineitforideasonhowtomakeyourown.
Location:YourNeticadownloadcomeswithabatchofpre-madereporttemplates.InthemaindirectoryofyourNeticainstallation,youwillseeafoldercalledReportTemplates(thepathtothisfolderisprintedoutintheMessageswindowofNeticaApplicationwhenitfirststartsup).
ThegenericfilesNetAll.nsp.htmandNodeAll.nsp.htmareespeciallyuseful,sincetheycontainmanypossiblemethodsfordisplayinginformation.
Forexample,forareportonthetableofanode,youcoulduse:Generic/ReportTemplates/NodeTable.nsp.htm
Hereisalistofthegenericreportsavailable:
NetAll.nsp.htmNetBeliefs.nsp.htmNetCase.nsp.htmNetComment.nsp.htmNetCommentUnformatted.nsp.htmNetDeveloper.nsp.htmNetEquations.nsp.htmNetFindings.nsp.htmNetGraphic.nsp.htmNetSensitivity.nsp.htmNetUser.nsp.htmNodeAll.nsp.htmNodeDescription.nsp.htmNodeDeveloper.nsp.htm
NodeEquation.nsp.htmNodeParents.nsp.htmNodeSensitivity.nsp.htmNodeTable.nsp.htmNodeUser.nsp.htmNodeWeb_Description.nsp.htm
EquationsTherelationshipbetweenanodeanditsparentnodescanbeenteredusinganequationifdesired.Thisispossiblewhetherthenodesarecontinuousordiscrete,andwhethertherelationshipisprobabilisticordeterministic.Neticawillconvertallequationsintotables(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontable)beforecompilinganet,doingnettransforms,orexpandingaDBN.Thetablesarethenusedinthesamewayasifyouhadenteredthembyhand.
ThefollowingsectionsoutlinefurtherinformationonNetica’sequations:
•UsingEquations•Syntax•ConvertingtoaTable•ComparisontoJava/C/C++•Conditionals•Link(Input)Names•StateNamesasConstants•DiscreteVariableswithStateValues•InternalFormofEquations•ConstantNodesasAdjustableParameters•ExamplesofEquationUse•Built-inConstants•Built-inFunctionsandDistributions
UsingEquationsFollowthesestepstoenteranduseanequationtorepresentanode’srelationshipwithitsparents:
1.Entertheequationintothenodedialogboxinthecorrectform,perhapsusingbuilt-infunctions.Herearesomeexamples.
2.Ifthenodeiscontinuous,orhasanycontinuousparents,theymustbediscretized.
3.Converttheequationtoatable.
4.Usethenet(e.g.compileit,dobeliefupdating,absorbnodes,reverselinks,orsolvedecisionproblems).Neticawillusethetablegeneratedfromtheequation.
Ifyouchangetheequationforanode,orthediscretizationofthenodeoranyofitsparents,orthevalueofarelevantconstantnode,youmustrepeatstep3abovebeforethechangestakeeffect.
Tips:
•Iftheequationsgetlarge,itmaybeeasiertocreatethemina=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditor,andthenpastethemintothenodedialogbox.•Wheneditinganequationyoucancut,copy,paste,undo,etc.usingtheirCTRLkeycommands,orby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clicking.•Ifthereisamistakeinthesyntaxoftheequation,Neticawillpopupanalertboxwithanerrormessage.Ifnecessary,movethealertboxsothattheequationisunobscured,andthenclickonthetitlebaroftheNodePropertiesDialogbox.ThatwillcausetheNodePropertiestobecometheactivewindow,andaselectionpointwillappearintheequationtextclosetowheretheerrorislocated.•Youcanprintoutalltheequationsinthenet,orselectthenodeswith
equations.•Ifyouneedtodefineintermediatevariablestosimplifytheequations,implementthemasnew(intermediate)nodes.•Thetablesgeneratedbyequationsmayresultinlargefiles(andthereforeslowreading),soyoumaywantremovethenode’stablewithTable→Removeor beforesavingthenettofile.Whenyoulaterreaditin,doTable→EquationtoTableor (withnonodes=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected)beforeusingit.
EquationSyntaxNeticaequationsfollowmostoftheusualstandardsformathematicalequations,andaresimilartoprogramminginJava,CorC++.Theusualmathematicaloperators(+,-,*,/,etc.),andtheusualfunctions(min,abs,sin,etc.)canbeused,parenthesisareusedforgrouping,andnumericconstantsareintheirusualform(e.g.3,-4.2,5.3e-12).
Left-HandSide:Thepartofanequationtotheleft-handsideoftheequalssymbolforadeterministicnodeconsistsofthenameofthenode,anopenparenthesis,alistofthenamesofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsseparatedbycommas,andacloseparenthesis(ifyouhavedefinedlinknames,youmustusethoseinsteadofparentnames).Forinstance,iftheequationisfornodeX,andtheparentsofXareVel,dtandsigma,theleft-handsidecouldbe:
X(Vel,dt,sigma)=...
Notethatspacesarenotrequired,andtheremaybemorespacesifdesired.
Forprobabilisticnodes(i.e."=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_chance_node.htm');returnfalse;">chancenodes"),theleft-handsideconsistsofalowercase"p",anopenparenthesis,thenameofthenode,averticalbar,alistofthenamesoftheparents(orlinknames)separatedbycommas,andacloseparenthesis.Ifthenodementionedabovehadbeenaprobabilisticnode,thelefthandsideofitsequationcouldbe:
P(X|Vel,dt,sigma)=...
Right-HandSide:Theright-handsideofanequationmayconsistofnumbers,adjustableparameters,statenames,conditionals,referencestothevariables(i.e.parentnodes),andbuilt-inconstants,functionsoroperators.
NodesAllowed:Theonlynodeswhichmaybementionedinanequationare:thenodetheequationdescribes,itsparents,andanyconstantnode.
Errors:Ifthereisamistakeinthesyntaxoftheequation,Neticawillpopup
analertboxwithanerrormessage.Ifnecessary,movethealertboxsothattheequationisunobscured,andthenclickonthetitlebaroftheNodePropertiesDialogbox.ThatwillcausetheNodePropertiestobecometheactivewindow,andaflashingcursorwillappearintheequationtextclosetowheretheerrorislocated.
Comments:Commentscanbeembeddedinequations,andtheywillbeignoredbyNetica.Everythingbetween/*and*/willbeinterpretedasacomment,aswilleverythingbetween//andtheendoftheline.Asmanyspacesorlinebreaksasdesiredmaybeplacedbetweenanytwosymbols.
AllValues:Iftheequationisforaprobabilisticnode,itsright-handsidemustprovideaprobabilityforallthenode’spossiblevalues(sothenameofthenodemustappearthereatleastonce).Forexample,ifnodeColor(withstatesred,orange,yellow)hasparentTemp(withstateslow,med,high),itsequationcouldbe:
p(Color|Temp)=
Temp==high?(Color==yellow?1.0:0.0):
Temp==med?(Color==orange?1.0:0.0):
Temp==low?(Color==orange?0.2:
Color==red?0.8:0.0):0
Ifyouusethebuilt-indistributions(suchasNormalDist),theaboveisautomaticallytakencareof.Oneexceptiontotheaboveisifanodeis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">boolean.Thenonlytheprobabilityforthetruestateneedbegiven.Forexample,ifnodeIt_Fallsisboolean,itsequationcouldbe:
p(It_Falls|Weight,Size)=
Weight/Size>10?0.10:
Weight/Size>5?0.03:
0.01
Examples:Herearesomeexamplesofequations:X(Vel,dt,X0)=X0+Vel*dt
p(X|Vel,dt,spread)=NormalDist(X,Vel*dt,spread)
Color(Taste)=
Taste==sour?blue:Taste==sweet?red:
Taste==salty?green:gray
p(Color|Taste)=
(Color==red&&Taste==sweet)?0.7:0.1
MoreExamples
ConvertinganEquationtoaTableBeforedoingmostnetoperations(e.g.compiling,absorbingnodes,reversinglinks,oroptimizingdecisions),eachinvolvednodemusthavearelationcontingencytable(e.g.its=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPT)toexpressitsrelationshipwithitsparents.Ifyouhaveenteredtherelationshipasanequation,thenatablemustbebuiltfromtheequation.
Tobuildtablesforparticularnodes,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodes,andthenchooseTable→EquationtoTableorclickthe toolbarbutton.Ifsomeoftheselectednodesdon’thaveequations,theywilljustbeskipped.Ifnonodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deselect_nodes.htm');returnfalse;">selected,thenNeticawillbuildtablesforallthenodeswhichhaveequations.
Ifanodewithanequation,oranyofits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parents,areforcontinuousvariables,thentheymustbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizedbeforeconvertingtheequationtoatable(excepta=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynode).WhenNeticadoestheconversion,itmustdecidewherewithineachdiscretized“cell”toevaluatetheequation.Itchoosesanumberofpoints(attrulyrandompositions)withinthecell,andusestheaverageoftheresultsobtained.Justbeforetheconversionprocess,Neticawillputupadialogboxaskingyouhowmanyrandomsamplestomakepercell.Thelargerthis
number,themoreaccuratetheresultswillbe,butthelongeritwilltake.
SamplingUncertainty:Sincethissamplingprocesscan’tcheckeverypointwithinthecell,itmaymissanarrowspikeorridge.Neticacanrepresentwithinthecreatedtabletheadditionaluncertaintyduetothesampling,oritcanassumethatthesamplingwastrulyrepresentative.Neticawillputupadialogboxaskingyouwhichitshoulddo.Itisbesttoignorethesamplinguncertaintywhenyouknowtheequationdoesn’thaveanynarrowspikesorridges.
Whenthesamplinguncertaintyisincluded,thennoneofthetableentrieswillbezero,sinceNeticacanneverbesurethatithasn’tmissedsomenonzeropointswithinthecell.Thesamplinguncertaintywillbesmallerifyouincreasethenumberofsamplespercell.SamplinguncertaintycanberemovedafterthetableiscreatedbychoosingTable→Harden,andprovidingadegreeof1.
Large:Thesizeofthetablegeneratedistheproductofthenumberofstatesofthenodewiththenumbersofstatesofeachofitsparentnodes.Soifanodehasmanystates,ormanyparents,thenthetablesmaybeverylarge,andNeticamayreportthatitdoesn’thaveenoughmemoryfortheoperation.Oritmayjusttakealongtime.Youcanalleviatetheproblembyeliminatingunnecessaryparentsandusingcoarserdiscretizations(perhapshavemorethanonenodeforthesamevariable,withdifferentdiscretizationsdependingonwhichnodeitisaparentfor).
EquationSyntaxvs.JavaorC/C++LanguagesTheequationsyntaxispreciselythesameastheJava(andCandC++)programminglanguages,excepttheparttotheleftoftheassignmentoperator(=)isdifferent,andnosemicolonisrequiredattheendoftheequation.
TheC/C++/Javabitwiseoperators(suchas&,|,~,^)arenotavailableinNetica,butthelogicaloperators&&,||,!are.InadditionNeticahasalogical‘xor’function(thebitwisexoroperator^ofC/C++/JavaisusedforthepoweroperatorbyNetica).
AlloftheCStandardLibrarymathfunctions(sin,log,sqrt,floor,etc.)areavailableandusethesamenames.
EquationConditionalsSupposecontinuousnodeXhastheparentsYandB.IfyouwantedtogiveP(X|Y)adifferentequationinvolvingXandYfordifferentvaluesofB,youcouldwritesomethinglike.p(X|Y,B)=
(B<2)?NormalDist(X,3+Y,1):
(B<6)?NormalDist(X,2+Y,3):
UniformDist(X,0,10)
Theconditionsareevaluatedinorder,sothefirstcoversallcaseswhereB 2,thesecondcoverscases2 B 6,andthelastcoverstheremainingcases(i.e.B 6).So,ifBislessthan2,Xisdistributednormallywithmean3+Y,ifitisbetween2and6thenthemeanis2+Y,andifitisover6thenXisdistributeduniformly.
Iftherearemoreparents,thissortofconstructcanbenestedtoprovideatreestructureofpossiblecontingencies.
Hereareacouplemoreexamples.Theyshowawaytoconditionoverthestatesofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenode:
p(X|Y,B)=
(B==yellow)?NormalDist(X,2,sqrt(Y)):
(B==orange)?NormalDist(X,4,Y):
(B==red)?NormalDist(X,6,Y^2):0
p(X|B)=
member(B,CA,TX,FL)?NormalDist(X,3,1):
member(B,MA,WA)?NormalDist(X,5,1):
member(B,NY,UT,VA)?NormalDist(X,7,2):
UniformDist(X,0,10)
Noticethatthe“fallthrough”caseofthefirstexampleissimplya0.ThisindicatesthatthedesigneriscountingonBtobeoneofyellow,orangeorred.IfBeverhasanotherstate,thenwhenNeticaisconvertingtheequationtoa
tableitwillgiveawarningmessagethat“forn/Nconditions,nononzeroprobabilitywasdiscoveredbysampling”(providingnosamplinguncertaintyisbeingadded).
Inthelastexample,thefallthroughcasegivesauniformdistribution.IfextrastatesarelateraddedtoB,thentheywilljustfallthroughandusetheuniformdistribution.
LinkNamesWhenyoufirststartworkingwithequations,youwillprobablyusethenamesoftheparentnodesinyourequations.However,sometimesyouwillwantamorelocalrepresentation,sothatyoucandisconnectsomeoftheparentsandhookthenodeuptonewparentswithouthavingtochangeallthenodenameswithintheequation.
Orperhapsyoucopyandpastethenodetousewithnewparents.Oryouputthenodeinanetfragmentlibrarywithoutanyparents,sothatitwillbesuppliedwithnewparentswhenitisused.Oryouwanttocopyandpastetheequationfromonenodetoanother,withoutchangingallthenodenames.
Thesolutiontoalltheseproblemsistouselinknames,sometimescalledinputnames.Theyprovideanargumentnameforeachlinkenteringthenode(andthereforeaproxyforeachparentnode).Youcansetthemwiththenodedialogbox.Yourefertotheminyourequationinexactlythesamewayyouwouldthecorrespondingparentname.Whenaparentisdisconnected,thelinknamewillremain.
Iflinknamesaredefinedforanode,theymustbeusedinsteadoftheparentnames.
StateNamesasConstantsYoucanusethestatenamesofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretenodeasconstantsinanequation.Forexample,ifnodeColorhasstatesred,green,blueandyellow,andnodeTemperaturehasstatescoolandwarm,youcouldwrite:
Temperature(Color)=member(Color,red,yellow)?warm:cool
SpecifyingNode:Eachstatenameonlyhasmeaningrelativetothenodeit’sfor.Usuallywhenyouuseastatename,Neticacanidentifythatnodefromcontext.However,ifNeticadoesn’tknowwhichnodeastatenamerefersto(e.g.itgivesanunknownvalueerrormessage),youcanindicatewhichnodebyfollowingthestatenamewithadouble-dashandthenthenameofthenode.Continuingwiththeaboveexample,ifnodeSwitchhadthestates0,1and2,youcouldwrite:
Color(Switch)=select0(Switch,red--Color,yellow,blue)
The“--Color”wasnotrequiredon“yellow”and“blue”,becausethecontextwascarriedoverfrom“red--Color”,butitcouldbeputthereaswell.
StateNumbers:Insteadofstatenames,youcanjustusethestatenumber(numberingstartsat0),butitishighlyrecommendedtousethenames,becausetheyaremorereadableandlesserror-prone.Also,itisnotasseriousiflaterstatesareaddedorre-ordered.
DiscreteVariableswithStateValuesWhenanodeequationcontainsa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariablewhichhas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">statevaluesdefined,thenumericquantitieswhichthatvariablesuppliestotheequationcouldbethestateindexesofthevariable,orthevaluesassociatedwiththestateindexes.Usuallyafunctionoroperatorwillassumeitisthevaluesthataredesired,butinafewcasesitwillusethestateindexes,forinstanceiftheotherargumentstoitarestateindexes.
Forexample,considertheequalityoperator,andadiscretevariableColor,whichhasvaluesandstatenames(suchasblue)defined.WhenColorappearsintheequation,itcouldrefertoastateindexofColor,ortothevalueassociatedwiththatstateindex.
Usesstateindex:Color==blueColor==#1#Color1==#Color2Usesstatevalue:Color==3.2Color==1Color1==Color2
Theaboveisfortheevaluationofequationexpressions.WhenitcomestoassigningtheresultoftheequationtoitsLHS(left-handside)variable,ifthevariableisdiscretewithvaluesdefined,thesameissuearises.Hastheequationcalculatedastateindexforthevariable,oravalueassociatedwiththestate?ThepurposeoftheAsStatefunctionistoindicatethatstateindexesshouldbeused.
Continuingwiththeexampleabove:
Assignsbyvalue:Color()=3Color1(Color2)=Color2Assignsbyindex:Color()=#3Color1(Color2)=AsState(Color2)Color1(X,Y)=AsState(integer(X/Y))
YoumaywanttoverifythatNeticaisdoingasyouexpectbyhavingitcalculateafewvaluesandchecking(forexample,byusingTable→EquationtoTable).OryoucanexaminetheinternalrepresentationoftheequationbychoosingReport→HorizontalFormatfromthemenuandthenReport→Equation.CheckforplaceswhereNeticahasinsertedthefunction"_levels"(mapsstateindex→realvalue),"_find0"(mapsrealvalue→stateindexofadiscretevariable),or"_discretize"(mapsrealvalue→stateindexofacontinuousvariable).
InternalFormofEquationsNeticaconvertsequationstoaninternalformforfastevaluation.Sometimesthatmeansextrafunctionsareinvokedthatweren'tintheoriginalequation;thesefunctionsalwaysstartwithanunderscore.
Youmayreceiveanerrormessagethatindicatestherewasaproblemevaluatingoneofthesefunctions.Generallythatoccursbecauseinyourequationyousupplyvaluestoafunctionthatareoutofitsdomain.
IfyouwanttoseewhattheinternalrepresentationoftheequationinNeticalookslike,youcangenerateareportbychoosingReport→HorizontalFormatfromthemenuandthenReport→Equation.
Someexampleinternalfunctionsare:
_not_discretize_find0
_levels_select0_Bernoulli
“Constant”NodesasAdjustableParametersYoucreateaconstantnodebyaddinganaturenodetothenet,bringingupitsnodedialogbox,andchoosing“Constant”fromthenodekindselector.Youcanalsosetothercharacteristicsofaconstantnodeinthesamewayasanyothernode,suchasgivingitstatenames.
Tosetorchangethevalueofaconstantnode,enterthevalueinthesamewayasyouwouldenterafinding.
ForEquations:Youcanrefertothevalueofaconstantnodeanywhereinanynodeequationbyusingitsnodenameasyouwouldaparentnode.Itshouldnotappearintheargumentlisttotheleftofthe=symbol.Nolinkisrequired.
Whenyouconverttheequationtoatable,thevalueofanyreferencedconstantnodeswillbeused.Ifyouchangethevalueofaconstantnode,youmustrebuildthetableforthechangetotakeeffect.
ExamplesofEquationUseHereareexampleequationsforsomecommonornon-obvioussituations:
StateComparisons:SupposethestatesofnodeSourceareCA,TX,FL,BCandNY.ThestatesofnodeDestareTX,NY,MAandUT.Wewanttoknowifcross-bordertravelisrequiredtotransportfromSourcetoDest,andthatisindicatedbythe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleannodeTravel.TheequationbelowworkseventhoughnodesSourceandDesthavedifferentsetsofstates,andinadifferentorder.
Travel(Source,Dest)=(Source!=Dest)
AdditiveNoise:Sayyouwanttorepresentsomethinglike:x1=x2+gauss(0,0.2)whichcouldindicatethatx1isthesameasx2,butwiththeadditionofGaussiannoisehavingmean0and =0.2.Youcoulddothisbydefininganewnodex3,andsettingtheequationsofx1andx3as:
x1(x2,x3)=x2+x3p(x3)=NormalDist(x3,0,0.2)
MultipleDiscretizations:Sometimesitisusefultousemorethanonenodetorepresentacontinuousvariable,anddiscretizeeachdifferently.Forexample,thecoarseronemaybeaparentforanothernodewhoseCPTwouldbetoobigwithafinerdiscretization,whilethefineronewouldserveasaparentfornodesrequiringmoreaccuracy.Putalinkfromthefinernodetothecoarser,andgivethecoarsernodeanequationlike:
X_d4(X_d12)=X_d12
Noisy-Or:Tocreateanoisy-ornode,justcreatearegular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleannaturenode,putlinkstoitfromthepossiblecauses,giveitanoisy-orequation,andusethattobuilditsCPT.Forextracomputationalefficiencyyou
maywanttoselectitandchooseModify→DecomposeEquationsbeforebuildingtheCPT.
Forexample,ifC1,C2andC3are=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleannodesrepresentingcausesofbooleannodeE,andtherearelinksfromeachCitoE,thenEcouldhavethenoisy-orequation:P(E|C1,C2,C3)=
NoisyOrDist(E,0,C1,0.5,C2,0.3,C3,0.1)
Foritsmeaning,seetheNoisyOrDistdescription.Thecauses,andeventhelinkparameters,canbemorecomplexexpressions(thenyouwon’tbeabletouseModify→DecomposeEquationsthough).
Forexample:P(Bond|Temperature,BackTemp,Pressure,Switch,Eff)=NoisyOrDist(Bond,0.001,Temperature>BackTemp,0.5,Pressure==high,0.3,Switch,0.9*Eff)
Built-inConstantsThefollowingconstantsmaybeusedinequations:
pi=3.141592654deg=radianperdegree=pi/180
Ifyouwishtohavetheconstante(=2.7182818)inyourequation,useexp(1).
Neticaalsocontainsanextensivelibraryofbuilt-infunctions.
Example: sin(35*deg)returnsthesineof35degrees
Built-inFunctionsNeticacontainsanextensivelibraryofbuilt-infunctionsandconstantswhichyoucanuseinyourequations.
Theprobabilitydistributionfunctionsallhaveanamethatendswith"Dist"(e.g.NormalDist).Theirfirstargumentisalwaysthenodeforwhichthedistributionisfor.SoifnodeXhasparentm,youcouldwrite:
P(X|m)=NormalDist(X,m,0.2)
toindicatethatXhasanormal(Gaussian)distributionwithmeangivenbyparentm,andastandarddeviationof0.2.
CommonOperatorsFunctionalNotation OperatorNotation
neg(x) -x
not(b) !b
equal(x,y) x==y
not_equal(x,y) x!=y
approx_eq(x,y) x~=y
less(x,y) x<y
greater(x,y) x>y
less_eq(x,y) x<=y
greater_eq(x,y) x>=y
plus(x1,x2,...xn) x1+x2+...+xn
minus(x,y) x-y
mult(x1,x2,...xn) x1*x2*...*xn
div(x,y) x/y
mod(x,base) x%base
power(x,y) x^y
and(b1,b2,...bn) b1&&b2&&...&&bn
or(b1,b2,...bn) b1||b2||...||bn
if(test,tval,fval) test?tval:fval
CommonMathabs(x) absolutevalue
sqrt(x) squareroot(positive)
exp(x) exponential(e^x)
log(x) logarithmbasee
log2(x) logarithmbase2
log10(x) logarithmbase10
sin(x) sine
cos(x) cosine
tan(x) tangent
asin(x) arcsine
acos(x) arccosine
atan(x) arctangent
atan2(y,x) atan(y/x)butconsidersquadrant
sinh(x) hyperbolicsine
cosh(x) hyperboliccosine
tanh(x) hyperbolictangent
floor(x) floor(highestinteger<=x)
ceil(x) ceiling(lowestinteger>=x)
integer(x) integerpartofnumber(samesign)
frac(x) fractionpartofnumber(samesign)
SpecialMathround(x)roundto(dx,x)approx_eq(x,y)eqnear(reldiff,x,y)clip(min,max,x)rect(x,a,b)sign(x)xor(b1,b2,...bn)increasing(x1,x2,...xn)
increasing_eq(x1,x2,...xn)avg(x1,x2,...xnmag(x1,x2,...xn)min(x1,x2,...xn)max(x1,x2,...xn)argmin0/1(x0,x1,...xn)argmax0/1(x0,x1,...xn)nearest0/1(val,c0,c1,...cn)select0/1(index,c0,c1,...cn)member(elem,s1,s2,...sn)factorial(n)logfactorial(n)logistic(t)logit(p)gamma(x)loggamma(x)beta(z,w)erf(x)erfc(x)binomial(n,k)multinomial(n1,n2,...nn)
ContinuousProbabilityDistributionsUniformDist(x,a,b)TriangularDist(x,m,w)Triangular3Dist(x,m,w1,w2)TriangularEnd3Dist(x,m,a,b)NormalDist(x, , )LognormalDist(x, , )ExponentialDist(x, )GammaDist(x, , )
WeibullDist(x, , )BetaDist(x, , )Beta4Dist(x, , ,c,d)CauchyDist(x, , )LaplaceDist(x, , )ExtremeValueDist(x, , )ParetoDist(x,a,b)ChiSquareDist(x, )StudentTDist(x, )FDist(x, 1, 2)
DiscreteProbabilityDistributionsSingleDist(k,c)DiscUniformDist(k,a,b)BernoulliDist(b,p)BinomialDist(k,n,p)PoissonDist(k, )HypergeometricDist(k,n,s,N)NegBinomialDist(k,n,p)GeometricDist(k,p)LogarithmicDist(k,p)MultinomialDist(bc,n,k1,p1,k2,p2,...km,pm)NoisyOrDist(e,leak,b1,p1,b2,p2,...bn,pn)NoisyAndDist(e,inh,b1,p1,b2,p2,...bn,pn)NoisyMaxDist(…)NoisySumDist(…)
Netica-WebNetica-WebisthenewestproductintheNeticafamily.ItisasystemtodeployyourBayesnetsovertheinternetasaquestion-answersystem.Suchasystemaskstheuserquestions,orprovidesadashboardtoenterrelevantinformation,andpresentstheuserwithconclusions.Ateachstageoftheprocess,thesystemchoosesthebestquestionstoaskbasedonthepreviousanswersgiven,usingNetica'ssensitivityanalysis.Itmaycontinuouslyprovideconclusions,orwaituntilitreachesacertainlevelofconfidencebeforepresentinganyinformation.ContactNorsysforfulldocumentationandpricinginformation(althoughyoumaytryitoutnowasdescribedbelow).
Howto:WithNetica-Web,youcaneasilybuildaninteractivewebsite,alsoknownasaHEDsystem(Human-ElectronicDialog).YouconstructaBayesnetinthenormalmannerusingNeticaApplication,andthenwithasingleclickofabutton,awebsiteisgenerated.First,selectanodeofinterest(calledaTargetnode),thenchooseNetica→BuildWebsite.Alternatively,youcanright-clickonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundandchooseHEDSystem→AddNettoWebsite.Inamomentyourbrowsershouldspringupwithyourworkingsystem.Youcancopy/pastetheURLfromyourbrowsertopublishyoursitetotheworld.Examplesite
Applications:Netica-Webcanbeusedtobuilddiagnosticsystems,suchastroubleshootingforsomemachineryorplant,ortoprovidemedical,environmental,corporate,etc.diagnostics.Itcanbeusedtobuildsystemsthatidentifysomeparticularitem(s)fromalargesetbasedonindirectcriterion,suchasaproducttobepurchasedfromaninventory,amovieorsongselection,restaurantchoice,person,etc.Itcanbuildclassificationsystemstodeterminewhichgroupanitemfallsinto,basedonitscharacteristics,suchasthepersonalitytypeofaperson,probablevotingpatterns,creditworthiness,whetheraplantorproductispoisonous,etc.Althoughthesearetypicalapplications,anyBayesnetcanberunonNetica-Web.
Netica-WebversusDecisionTrees:Netica-Webissuperiortooldtree-basedmethodsbecauseitiseasiertobuildandmaintainaBayesnetthanadecisiontree.Bayesnetsrepresenttheirknowledgeinaformwhichiseasyto
understand,andwhichcancombinehumanexpertisewithlearningfromdata.Furthermore,theirmodularityallowscombiningsub-modelsintoacompletemodel.Anychangesinprobabilitydistributionscandrasticallyalterthestructureoftheoptimumdecisiontree,whilsttheyproduceasmallchangeinaBayesnet.Bayesnetsallowuserstoskipquestions,answer“unknown”,orprovidelikelihoodanswers,andstillmaintainoptimalperformance.Andtheycanrecoverfromincorrectanswers,whichoftenthrowdecisiontreesonthewrongtrack.
ConstructingNetsforNetica-Web:WhenconstructingtheBayesnet,itsnodesaredividedinto(possiblyoverlapping)groups:observable,targetandintermediate.Eachobservablenodebecomesapotentialquestioninthesystem,andeachtargetnodewillresultinananswer,orhaveitsprobabilitiesdisplayed.Netica-Webdetermineswhichquestionsarethemostrelevanttodeterminethevaluesofthetargetresults.Itthenpresentsthosequestionsfirst,eitheroneatatime,orafewatatimeinascrollinglist(dependingontheconfigurationyouset).Theusermayskipquestionsatanytime,inwhichcasethequestionsaremovedtoanotherpartofthescreen,toallowlateransweringifdesired.
Sinceonlythemostrelevantquestionsareasked,basedonthepreviousanswers,aHEDsessionhasthefeelofaninteractivedialog,ratherthanjustfillingoutaform.Sincethesystemissojudiciousinchoosingwhichquestiontoaskfromitspoolofpossiblequestions,itisokaytohaveaverylargesetofpossiblequestions,furtheraddingtoitsabilitytoreachgoodconclusions.
AworkingHEDsystemcanbebuiltfromaregularBayesnetwithasingleclick,(Network→BuildWebsite)althoughifyouwanttoyoucanhighlycustomizeit.Itsvisualappearance,dimensions,colors,behavior,etc.canallbeeasilychanged,andgraphicscanbeaddedsothatitisseamlesslyintegratedwithalargerwebsite.
Hosting:YourHEDsystem,builtasdescribedabove,isbeinghostedbyNorsys,butifforsecurityorotherreasonsyouwishtohostityourself,thatisalsoanoption.Eitherway,ifyouwish,itcanbecomepartofyourexistingwebsite.Alternately,the“webpage”canjustbelocaltothemachineitisrunningon,allowingyoutodistributeyoursolutionasadesktopapplicationthatdoesnotrequiretheinternet.
TobuildyourfirstHEDsystem,besureyouhaveNetica5.0orlaterinstalled
Geo-NeticaManyNeticausershave,forsometimebeenusingNeticainconjunctionwithGIS(GeographicInformationSystems),sowedecidedtomakeiteasierforyou.
TheresultisGeo-Netica,ourlatestNeticaproduct,whichbringsBayesnetstothe2DworldofGIS.
Thisproductisinitsearlystages,butsinceitisalreadyveryusefultosome,wehavedecidedtomakeitavailableforsaletoselectclientsnow,withtheideathattheyareentitledtonewupgradesasfeaturesareadded.Additionally,wewilllistencloselytoearlyclients,todecidewhichnewfeaturestoadd.
Currentlyit:
-Operatesonrasterdata,suchasrasteroutputfilesfromArcGIS.-WorksinsideNeticawindow.-ShowsmultipleinputandoutputGISimagesatdesiredresolution.-Allowsprocessingatlowerresolutionforquickexplorationandmodelbuildingbeforedoingafullresolutionprocessing.
-CanclickonanypointwithinanimagetoenterdatafromthatlocationfromeachoftheimagesintotheBayesnettoseehowtheBayesnetprocessesit.
-Canhovercursoroverimage,todisplaydataonthatpoint.-Canauto-discretizenodesbasedonimagedata.-CandirectlyinteractwiththeBayesnetoneachprocessingcycle,forquickwhat-ifanalysis.
-Canhandleinputimagesthatarenotexactlythesamelocation,anddifferentresolutions.
-WorkswithanyBayesnetmodel,includingoneswithequations,probabilistictables,learnedfromdata.
-Bayesnetcouldbeforprediction,classification,diagnosis,probabilisticprocessing,speciesmodels,watermanagement,etc.
-Exampleinputimagesareelevation,slope,aspect,groundvegetation,speciespopulation,water,climate,rainfall,soils,satelliteimages,
traversability,friend/foepositions,municipalzoning,buildingtype,populationdensity,pollutantlevels,mineralassays,rocktype,accessibility,marketingdata,incomelevels,crimerates,propertycosts,politicalparty,etc.
Featurescomingsoon:-CanlearnBayesnetmodelsfromGISdata-EasierforBayesnetmodelstoincludedatafromotherpixelsneartotheonebeingoperatedon
Otherplannedfeatures:-Operateonvectordataaswellasrasterdata-InterfacenicelywithcommerciallyavailableGISsystems
IfyouareinterestedinpurchasingGeo-Netica,please=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">contactNorsys
Node-SetsSometimesitisusefultoform‘groups’or‘categories’ofnodes.WithNetica,youcancreategroupsofnodes,andtoassignanameandcolortoeach.Note:Arelatedconceptistogroupstatesofasinglenode.
Forinstance,toclearlyshowthedivisionsbetweenvariouspartsofyourBayesnet,youcanmakeeachsubsectionadifferentcolor.
Or,ifthereisasetofnodesthatyourepeatedlyuseforsomeoperation(forexample,asubsetofnodesthatyouoftenwanttoremovethefindingsfrom),youcansetthosenodesasanode-set.Wheneveryouwanttodotheoperation,youhaveNeticaselectthenodesinthatnode-set,andthenyouchoosetheoperationfromthemenu.
Anodemaybelongtoseveraldifferentnode-setsatonce,sointhatcaseNeticaneedsawaytochoosewhichnode-setcolortousewhencoloringit.Node-setshaveapriorityordering,soyoucanchoosethemostimportantcriteriatouseincoloringthem,whichyoumaywanttochangefromtimetotimetoviewthenetindifferentways.
Thenode-setoptionsare:
•CreatingNode-Sets•AddingandRemovingNodesfromNode-Sets•NodeColoring•UsingNode-SetstoSelectNodes•Node-SetReporting
CreatingNode-SetsIfthereisaparticularsetofnodesthatyouworkwithfrequently,youcanselectthemallandgivethemaname,creatinganode-set.AtanytimeduringyourworkyoucanselectthissetquicklybypressingtheCTRL+SHIFT+Sbuttonssimultaneously,andenteringthename.
Therearetwowaysnode-setsarecreated:
1.ByUser:Selectthenode(s)youwantinaparticularnode-set,chooseModify→SetNodeSet→New,(theshortcutkeyforthisisCTRL+SHIFT+N)andenterthenameofthenewset.Node-setnamesmustfollowtherulesofan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDname.Afteranode-setisset,youcanlateraddorremovenodesfromit.
2.Built-In:Automaticallybuilt-indefinition,basedonintrinsicqualitiesofthenodes.Thesenodesaredenotedwithadashinfrontofthename(e.g.–ConstantValue).
Thefollowingisalistofthebuilt-innode-sets,inorderoftheirpriorityforcoloring(LikelihoodFindinghighestpriority,Findingsecondpriorityetc.)
LikelihoodFinding Finding Deterministic
Boolean TwoState Discrete
Continuous Nature Title
Documentation ConstantValue Constant
DecisionSolved Decision Adversary
Utility Equation HasTable
Parentless Childless Node
Note:Someofthesenode-setswon’talwaysappearintheNodeSetPropertiesdialogbox.Toaccessthem,chooseModify→SetNodeSet→New,andtypeinanamefromtheabovelist(rememberingtobeginthenamewithadash).
AddingandRemovingNodesfromNode-SetsAsyouworkwithyournet,youmaywanttoaddorremovenodesfromapreviouslycreatednode-set.UnlikeaddingandremovingnodesfromyourBayesnet(whichcouldaffectthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">cpts),addingandremovingnodesfromanode-setwillonlyaffectthecategorizationofthenode(s)withinthenet.
Adding:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">Selectthenode(s)youwishtoaddtotheset,chooseModify→AddNodestoSet,andclickonthenameofthedesirednode-set,orclickonEnterandtypeinthename.Alternately,youcanselectoneormultiplenodes,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickontheselectionandchooseAddToNodeset.
Ifyouright-clickanunselectednode,themenuwilljustcontainNodesetinsteadofAddToNodeset,RemoveFromNodesetandSetNodeset,whichallowsyouto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_toggle_menu.htm');returnfalse;">togglewhetherornotthenodeclicked-onisinthenodesetyouchoose.
Removing:Selectthenode(s)youwishtoremovefromtheset,chooseModify→RemoveFromNodeSet,andclickonthenameofthedesirednode-set,orclickonEnterandtypeinthename.
Alternately,youcanuseright-clickingtoremovetheminamannersimilartothatdescribedaboveforadding.
Node-SetDialogBoxIfanode,ornodes,havepreviouslybeencreatedasanode-set,theycanbeassignedacolor.Coloringnode-setscanbeveryhelpfulvisuallywhenworkingwithaBayesnet,andisoneofthestyleoptionsavailableforimprovingthepresentationandcomprehensionofanet.
HowTo:ChooseModify→NodeSetProperties(fromtheoverheadmenuorby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthenet=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">background)Thesubsequentdialogboxcontainsalistofallthenode-setscreatedwithintheBayesnet.
Usingthisdialogboxyoucan:
SetColor:Beforeacolorhasbeenassignedtoauser-definednode-set,anXwillappearinthecolorswatchboxnexttoitsname.Tochooseorchangethecolorofanode-set,clickonitandclickSetColor.Acolorpalettewillbedisplayedfromwhichyoucanmakeyourchoice.ClickOkaytodismissthepalette,andthenclickApplyorOkayintheNodeSetpropertiesdialogbox.Youcanalsochangethedefaultcolorfortheothernodesofyournetatthistime.
NoColor:Toremovethecolorofanode-set,clickonit,thenclickNoColor.TheXthatwillappearinit’scolorboxindicatesthatthisnode-sethasnoassignedcolor,andwhenNeticaischoosingacolorfornodes,itwillskipthisnode-setandmovedowntothenextnode-setinthelist.Torestorethenode-set’spreviouscolor,clickonitandclickSetColor.Thelastchosencolorisremembered;henceyoucanjustclickOkayinthecolorpalettewhichappears.
ChangePriorityofColorDisplayed:Ifanodebelongstomorethanonenode-set,thefirstnode-setlistedinthePropertiesdialogboxwilldeterminethecolordisplayed.Tochangethecolordisplayed,dragthenode-settitleupordownthelisttothedesiredposition.
Rename:Tochangethenameofanode-set,selectit’snameandclick
Rename.Typethenewnameintothedialogboxthatappears.
DeleteNode-Set:Todeleteanode-set,clickonit’snameandpresstheDELETEkey.
SelectingNodesinaNode-SetTorestrictanoperation(e.g.clearing/settingfindings,removingtables,copyingnodes,absorbingnodes,modifyingnodekindordiscretization,hiding,etc.)toalimitedsetofnodes,youoftenselectthemfirst.Ifyouhaveacertainsetofnodesthatyouoftendoanoperationon,itisusefultocreateanode-setofthem,sothateachtimeyoucanquicklyselectthenodesinthatnode-set.
Torestrictanoperation(e.g.compiling,absorbingnodes,reversinglinks,oroptimizingdecisions)toapreviouslycreatednode-set,youcanquicklyselectthenodeswithinit.
HowTo:ChooseEdit→SelectNodes→InNodeSet,andthenselectthedesirednode-setfromthelistofnames,orEnterthename.TheshortcutkeyforthiscommandisCTRL+SHIFT+S.
Oncetheselectionhasbeenmade,itwillbehavelikeanyothernodeselection.
Thereisanalternatewaytoconsistentlyselectacertaingroupofnodes,ifallthosenodeshavethesamekeywordintheirtitleordescription(andothernodesdon't).FirstuseEdit→Findtoenterthekeyword,thenuseEdit→FindAlltoselectthemall.
Node-SetReportingUndertheReportmenuisaNodeSetsoption.Usethisfunctiontogenerateareportshowingallnodeswithinapreviouslycreatednode-set.
HowTo:ChooseReport→NodeSets→Alltogenerateadetailedlistofallthenode-sets.Ifyouwantareportonaspecificnode-set,chooseReport→NodeSetsandclickonthedesirednode-setname,oronEntertolabelasetofnodesforthereport.
Tohaveallthenodesofeachnode-setappearononeline,firstchooseReport→HorizontalFormat.Ifpastingthelistintoatableorcell,youmayalsowanttochooseReport→TabSeparators.
DynamicBayesNetsDynamicBayesnetsarealsoknownasDBNsortemporalBayesnets.TheyallowyoutospecifyaBayesnetmodelwhichhas"=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_time_delay_link.htm');returnfalse;">timedelay"links,indicatingthatthevalueofthechildnodedependsonthevalueoftheparentatanearliertime.LateryouexpandtheDBNsothatsomenodesintheoriginalnetbecomeseveralnodesintheexpandednet,indicatingthevalueofthatvariableatdifferentpointsintime.
DBNscanhavedirectedcycles,aslongasthereisadelaylinksomewherealongeachcycle.Delaylinkscanbeusedtomodelfeedback.Onceitisexpanded,itwillnolongerhavecyclesordelaylinks.
WeimproveNetica'sDBNcapabilitywitheachrelease,soifyouareworkingwithDBNsyoushoulduseatleastversion5.02.Downloadlatestversionsfromourftpsite.
ItisusuallyeasiesttoworkthroughanexampleDBNfirst.TheBayesnetcalled"Bouncing",inNetica's“=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examples”folder,issuitableforthatpurpose.
StepsforworkingwithaDynamicBayesNet:
1.CreateDBN2.Generatetimeexpansion3.Compileanduse
IfyouhaveanyrequestsorsuggestionsforNetica'sDBNfeature,besureto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">contactoursupportteam,sinceweareactivelyimprovingthisfeature.
SeealsoDBNBouncingExample
UsingDynamicBayesNets1.CreateDBN2.Generatetimeexpansion3.Compileanduse
NeticahasuniqueDBNcapabilitiesnotavailablewithanyothersoftware.Differentlinksmayhavedifferenttimedelays,sothatwhenthenetworkisexpanded,timeslicesmayhaveadifferentstructurefromeachother.Intheexpandednet,NeticawillreplicatenodesatafrequencythatisappropriatetomodelthedynamicsituationmodeledbytheDBN.Somenodeswillappearonlyonceintheexpandednet(correspondingtovariableswhosevaluesdon'tchangeovertime),somenodeswillappearafewtimes(forslowlychangingvariables),andotherswillappearmanytimes(forquicklychangingvariables).
Whenenteringthedelayamountforalink,youcanenteranumber(mostcommonissimply1),orthevalueofaconstantnode,oranequationbasedonthevaluesofoneormoreconstantnodes.Linkswithtimedelaysaredisplayedinareddish-browncolor.
Tosetthetimedelayofseverallinkstothesamevalue,selectthelinks,andchooseModify→DelayLinks,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clicktheselectionandchooseDelay.Youwillthenhavethechancetoenterthedelayyouwouldlikethemalltohave.Ifyoumakethedelay0,theywillbecomeregularlinks.
Anotherwaytosetlinkdelaysisfromanodepropertiesdialog.ChooseDelayfromthemultipurposeselectoratthebottom,andyoucanenteradelayamountforeachlinkenteringthenode.
>>Nextstep
UsingDynamicBayesNets1.CreateDBN2.Generatetimeexpansion3.Compileanduse
GenerateatimeexpandedversionofthenetbychoosingNetwork→ExpandTime.
Thiswillmakeanewwindowwithanewnetinit.Youwillprobablywanttoresizethiswindowtomakeitwider.
ThenewnetisaregularBayesnetwitheachPositionandVelocitynoderepresentingthepositionandvelocityatanewpointintime,withnodestotherightcorrespondingtolatertimes.
Prevstep<<>>Nextstep
UsingDynamicBayesNets1.CreateDBN2.Generatetimeexpansion3.Compileanduse
CompiletheBayesnetforprobabilisticinferencewithNetwork→Compile.Turnonautomaticupdating,ifitisn’talready,bytogglingNetwork→AutomaticUpdating,sothemenuitemischeck-marked.Experimentwithsettingthepositionorvelocity(byclickingonthedesiredinterval)toindicateobservationsatcertaintimes,andseehowthebeliefsforpositionandvelocityatallothertimeschange.
Youcanalsotry=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteringsomenegativefindingsbyholdingdowntheSHIFTkeywhenyouclickontheinterval.
Rememberthatthenumericalresultswillnotbeexact,duetothediscretizationandsamplingerrorinconvertingtheequationstoprobabilitytables.YoumayalsowanttotryafinerdiscretizationbychangingtheDiscretizationoftheoriginalunexpandednet.
Prevstep<<
TestingaNetUsingCasesThissectiondocumentsthemenuchoiceCases→TestNetUsingCases(or"Network→TestUsingCases"onolderversionsofNetica).ThepurposeofthisfeatureistogradeaBayesnetusingasetofrealcasestoseehowwellthepredictionsordiagnosisofthenetmatchtheactualcases.Itisnotfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetworks.
First,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenodesyoudonotwishthenetworktoknowthevalueofduringitsinference.Forexample,ifthenetworkisformedicaldiagnosis,youmightselectthediseasenodesandnodesrepresentingotherunobservableinternalstates.Wewillcallthesenodesthe"unobserved"nodes.ThenchooseNetwork→TestWithCases.Youwillbeaskedwhichfileofcasestouse,andafteryouchooseone,Neticawillstartprocessing.
The=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowwillcometothefrontanddisplaythepercentageofcasesprocessedsofar.HolddownCTRL+ALT+LEFTBUTTONatthesametimeifyouwanttostopprocessingcases(theresultsforthecasesalreadyprocessedwillthenbeprinted).Neticawillpassthroughthecasefile,processingthecasesone-by-one.Neticafirstreadsinthecase,exceptforanyfindingsfortheunobservednodes.Itthendoes=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingtogeneratebeliefsforeachoftheunobservednodes.Itgoesbackandchecksthetruevalueforthosenodesassuppliedbythecasefile(iftheyaresuppliedforthatcase),andcomparesthemwiththebeliefsitgenerated.Itaccumulatesallthecomparisonsintosummarystatistics.
WhenNeticaisdone,itwillprintareportforeachoftheunobservednodes
(exceptconstantnodes).Typicallyyouareonlyinterestedinsomeofthem,soyoucanignoretherest.Thereportforanodenamed"SpkQual"(withnodetitle"Sparkquality"mightlooksomethinglikethis:
ForSpkQual:Sparkquality
Confusion:
.......Predicted......
goodbadvery_bActual
------------------------
25300good
221764bad
1319430very_bad
Errorrate=6.325%
ScoringRuleResults:
Logarithmicloss=0.2144
Quadraticloss=0.1099
Sphericalpayoff=0.9409
Calibration:
good0-0.5:0|0.5-1:0|1-2:0|2-5:
0|
5-80:49|80-95:87.5|95-98:95.7|
bad0-1:0|1-2:1.52|2-5:2.4|5-10:
5.17|
10-50:20|50-85:82.6|85-95:90|95-100:
100|
very_bad0-0.1:0|0.1-0.5:0|0.5-5:6.94|5-10:
9.33|
10-20:16.2|20-95:83.3|95-98:98.9|98-99:
100|
99-100:100|
Total0-0.1:0|0.1-0.5:0|0.5-1:0|1-2:
0.431|
2-5:2.5|5-10:6.28|10-15:10.9|15-20:
13.3|
20-50:30.1|50-80:81.5|80-90:86|90-95:
93.7|
95-98:97.6|98-99:100|99-100:100|
TimesSurprised(percentage):
.................Predicted
Probability...................
State<1%<10%>90%>
99%
----------------------
--
good0.00(0/312)0.00(0/614)6.86(14/204)
0.00(0/0)
bad0.00(0/225)1.98(13/657)0.00(0/69)
0.00(0/0)
very_bad0.00(0/216)3.32(12/361)0.25(1/399)
0.00(0/31)
Total0.00(0/753)1.53(25/1632)2.23(15/672)
0.00(0/31)
SectionsoftheReportConfusionMatrix&ErrorsScoringRuleResultsCalibration&TimesSurprisedTableQualityofTest
NOTES:
IfyouhaveanyfindingsenteredbeforechoosingNetwork→TestWithCasestheywillbetakenintoaccountduringallbeliefupdating(unlessthecasefilehasacolumnforthatnode).Neticawillwarnyouinthisevent,sothatyoudon'tobtainwrongresultsbyinadvertentlyleavingsomefindingsinthenetwork.Asituationinwhichyouwouldwanttoleaveafindinginthenetworkisifthenetworkisdesignedforabroaderclassofcasesthanthecasefile.Forexample,ifyouhaveanetworkdesignedtohandlepeopleofbothgenders(andithasa'gender'node),butthecasefilecontainsfemalesonly,youshouldenterafindingof'female'forthe'gender'nodebeforegradingthenetwork.
Ifthefindingsforthenon-unobservednodesofacaseinthecasefileareimpossibleaccordingtothenetwork,thenaninconsistent-findingserrormessagewillbedisplayed,thatcasewillbeignored,andprocessingwillcontinue.Ifthenetworkmakespredictionsfortheunobservednodesthatareinconsistentwiththecasefile,thenofcoursenoerrormessageswillbegenerated,thenetworkwillsimplybegradedmorepoorly(andhavealogarithmiclossofINFINITY).Dependingonyourapplication,anyofthemeasurescalculatedcouldbethemostvaluabletoyou.However,ifyouwantasinglenumbertogradeanetwork,andaren'tsurewhichonetopick,we
suggestthelogarithmicloss.Thisfunctionwillproperlysupporta'NumCases'columninthecasefile,ifoneispresent.
Aswellasgradinganetwork,thisfeaturecanalsobeusedtodeterminetheusefulnessofparticulartestsorfindingsinarealworldenvironment.Oftengroupsoffindingsortestscanhavequiteadifferentusefulnesswhenconsideredtogether,thanwhenconsideredone-by-one,andthisfeaturealsoallowsyoutoinvestigatesuchgroups.Byselectingextranodesinthefirststep,youcanmakesomepossiblefindingsfromthecasefileunavailabletothenetwork.Thenyoucanseehowmuchtheresultsofthenetworkaredegradedbynothavingaccesstothosefindings.Inthemedicalexamplementionedearlier,youmightadditionallyselectthenodes'BloodTest'and'SmearTest',andthencomparethenewconfusionmatrixgeneratedwiththeoldone,tofindifthenumberoffalsenegativesandfalsepositivesofseriousdiseaseschangedsignificantly.
Thisfeatureisalsoavailabletoprogrammersusing=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPI;=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">contactNorsysformoreinformation.
TheConfusionMatrixConfusionMatrix:ThefirstpartoftheTestNetwithCasesreportisaconfusionmatrixtitled"Confusion:"ThepossiblestatesofSparkQualityaregood,badandvery_bad.Foreachcaseprocessed,Neticageneratedbeliefsforeachofthesestates.Themostlikelystate(i.e.theonewiththehighestbelief)waschosenasitspredictionforthevalueofSparkQuality.
ThiswasthencomparedwiththetruevalueofSparkQualityforthatcase,providingthecasefilecouldsupplyit.Theconfusionmatrixsuppliesthetotalnumberofcasesineachofthe9situations:(Predicted=good,Actual=good),(Predicted=bad,Actual=good),etc.Ifthenetworkisperformingwellthentheentriesalongthemaindiagonalwillbelargecomparedtothoseoffofit.
ErrorRate:Thenextpartofthereportis"Errorrate=6.325%".Thismeansthatin6.325%ofthecasesforwhichthecasefilesuppliedaSparkQualityvalue,thenetworkpredictedthewrongvalue,wherethepredictionwastakenasthestatewithhighestbelief(sameasfortheconfusionmatrix).
OthersectionsoftheTestNetwithCasesReport:ScoringRuleResultsCalibration&TimesSurprisedTableQualityofTest
ScoringRuleResults&LogarithmicLossValuesScoringRuleResults:ThethirdsectionoftheTestNetwithCasesreportistitled"ScoringRuleResults:"Thisdoesn'tjusttakethemostlikelystateasaprediction,butratherconsiderstheactualbelieflevelsofthestatesindetermininghowwelltheyagreewiththevalueinthecasefile.Theseresultsarecalculatedinthestandardwayforscoringrules.
Formoreinformationseeanyreferenceonscoringrules,suchas:
Morgan,M.GrangerandMaxHenrion(1990)Uncertainty:AGuidetoDealingwithUncertaintyinQuantitativeRiskandPolicyAnalysis,CambridgeUniv.Press,NewYork.
Pearl,Judea(1978)"Aneconomicbasisforcertainmethodsofevaluatingprobabilisticforecasts"inInternationalJ.ofMan-MachineStudies,10,175-183.
Logarithmiclossvalueswerecalculatedusingthenaturallog,andarebetween0andinfinityinclusive,withzeroindicatingthebestperformance.Quadraticloss(alsoknownastheBrierscore)isbetween0and2,with0beingbest,andsphericalpayoffisbetween0and1,with1beingbest.
Theequationsare:
Logarithmicloss=MOAC[-log(Pc)]
Quadraticloss=MOAC[1-2*Pc+sum[j=1to
n](Pj^2)]
Sphericalpayoff=MOAC[Pc/sqrt(sum[j=1ton]
(Pj^2))]
wherePcistheprobabilitypredictedforthecorrectstate,Pjistheprobabilitypredictedforstatej,nisthenumberofstates,andMOACstandsforthemean(average)overallcases(i.e.allcasesforwhichthecasefileprovidesavalueforthenodeinquestion).
OthersectionsoftheTestNetwithCasesReport:ConfusionMatrix&ErrorsCalibration&TimesSurprisedTable
QualityofTest
Calibration&TimesSurprisedTablesCalibrationTable:ThenextpartoftheTestNetwithCasesreportisatabletitled"Calibration:".Itindicateswhethertheconfidenceexpressedbythenetworkisappropriate(i.e."wellcalibrated").Forinstance,ifthenetworkwereforecastingtheweather,youmightwanttoknow:Ofallthetimesitsaid30%chanceofrain,whatpercentageoftimesdiditrain?Iftherewerelotsofcases,theanswershouldbecloseto30%.
Foreachstateofthenodethereareanumberofitemsseparatedbyverticalbars(|).EachitemconsistsofaprobabilitypercentagerangeR,followedbyacolon(:)andthenasinglepercentageX.ItmeansthatofallthetimesthebeliefforthatstatewaswithintherangeR,Xpercentofthemthetruevaluewasthatstate.
Forinstance:
rain0-10:8.5|
meansthatofallthetimesthebeliefforrainwasbetween0and10%,8.5%ofthosetimesitrained.Thereasonthattheprobabilityrangesareuneven,anddifferentfromstatetostate,andruntorun,isthattheyarechosensothattheXpercentagesarereasonablyaccurate.Thebinsizeshavetoadapt,ortheremightnotbeenoughcasesfallinginthatbin.Themorecasesyouprocess,themorefinewillbetheprobabilityranges.
Calibrationresultsareoftendrawnasagraph(knownasa"calibrationcurve")whereidealcalibrationisastraightdiagonalline.Formoreinformation,seeatextwhichdiscussesprobability"calibration"forexample,Morgan&Henrion90,p.110.
TimesSurprisedTable:Followingthecalibrationtableofthereportisthe"TimesSuprised"table.Itisusedtodeterminehowoftenthenetworkwasquiteconfidentinitsbeliefs,butwaswrong.Therearecolumnsforbeing90%confidentand99%confident(i.e.beliefsaregreaterthan90%or99%respectively),andalsoforbeing90%and99%confidentthatthevalueofthenodewill_not_beacertainstate(i.e.beliefsarelessthan10%or1%respectively).
Theratiosindicatethenumberoftimesitwaswrongoutofthenumberoftimesitmadesuchaconfidentprediction,andapercentageisalsoprinted.If
thenetworkisperformingwellthesepercentageswillbelow,butkeepinmindthatitisveryreasonabletobewrongwithaparticular10%or90%prediction10%ofthetime,andtobewrongwithaparticular1%or99%prediction1%ofthetime.Ifthenetworkrarelymakesstrongpredictions(i.e.beliefsarerarelycloseto0or1),thenthesemostoftheseratioswillbe0/0.
OthersectionsoftheTestNetwithCasesReport:ConfusionMatrix&ErrorsScoringRuleResultsQualityofTest
QualityofATestQualityofTest:ThefinalsectionoftheTestNetwithCasesreportisthe"QualityofTest"tableforbinarynodes,or"TestSensitivity"tablefornodeswithmorethan2states.Theseareusefulwhentheoutputofthenetworkisgoingtobeusedtodecideanaction,withoneactioncorrespondingtoeachstateofthenode.
Asamedicalexample,thenodemaybe"Disease-A"andhavethetwostates"Present"and"Absent".If,afterupdatingforacase,thenetworkreports"Present",thenaparticulartreatmentwillbestarted,butifitreports"Absent"thenthetreatmentwon'tbestarted.Thequestionis,atwhatprobabilityfor"Present"shouldwesaythatthenetworkisreportingPresent?Theconfusionmatrixanderrorratediscussedaboveweredeterminedusingthemaximumlikelihoodstate(i.e.theonewithhighestbeliefafterupdating).
Forabinaryvariable,thismeanschoosingthefirststateonlyifitsbeliefishigherthan50%.Butifeachstatehasadifferentcostofmisclassification,youmaynotwantthecutoffprobabilitytobe50%.Inthemedicalexample,itmaybedisastroustonottreatapatientwhohasthedisease,butnotthatseriousifheistreatedunnecessarily.Soyouwouldlikethenetworktoreport"Present"iftheprobabilityofthediseaseisabovesomesmallnumber,like2%.Itisamatteroftradingofftherateoffalsepositivesagainsttherateoffalsenegatives.Ideallyyouwouldjustconvertthenetworktoadecisionnetwork,byaddingadecisionnodefortheactiontobetakenandautilitynodeforthecostofmisclassification.However,atthetimethenetworkisconstructedandbeinggradedastoitsusefulness,theutilitiesmaynotbeknown.
TheQualityofTestsectionhasperformanceresultsforaseriesofcutoffthresholdprobabilities(whichrunverticallyinthefirstcolumn).Foreachcase,thebeliefsgivenbythenetworkareconvertedtoa"prediction".Thepredictionis"firststate"ifthebeliefforthefirststateishigherthanthecutoffprobability,and"secondstate"ifit'slower.Youmaywanttochangetheorderofthestates,sothatthefirststateisthe"positive"one,tobettermatchconventionalmeanings.
Themeaningsofthecolumnsare:
Sensitivity=Ofthecaseswhoseactualvaluewas
thefirststate,
thefractionpredictedcorrectly.
Specificity=Ofthecaseswhoseactualvaluewas
thesecondstate,
thefractionpredictedcorrectly.
PredictiveValue=Ofthecasesthenetwork
predictedasfirststate,
thefractionpredictedcorrectly.
PredictiveValueNegative=Ofthecasesthe
networkpredictedas
secondstate,thefractionpredicted
correctly.
OftenthisdataissummarizedwithagraphcalledtheROC(receiveroperatingcharacteristic)curve.TouseExcel(availablefromMicrosoft)tocreatetheROCcurvefromthisdata,selectthewholetable(exceptheadings)andwhileholdingdownthe<CTRL>key,typetcz.ThenopentheExcelfilecalled"Graph_ROC.xls"(availablefromtheNorsysftpsite),pasteintotheindicatedcell,andthegraphwillbedrawn.Ifthenodehasmorethan2states,insteadyouwillgetaTestSensitivitysection.Thefirstnumberofeach"column"isthecutoffthresholdprobability.Thesecondnumberofeachcolumnisthenumberofcaseswhoseactualvaluewasthestategivenatthelefthandsideoftherow,andwhichthenetworkcorrectlypredictedtobeinthatstate(i.e.itsbeliefwasgreaterthancutoffprobability),dividedbythetotalnumberofcaseswhoseactualvaluewasthatstate.
Itmayseemawkwardthatthecutoffprobabilitychangesinstrangesizedjumps.ThereasonisthatNeticaonlyreportsonvaluesforwhichitwasabletogatherenoughdata.Sorunningthetestusingagreaternumberofcasesgenerallyresultsinfinerdivisionsofthecutoffcolumn.
OthersectionsoftheTestNetwithCasesReport:ConfusionMatrix&ErrorsScoringRuleResultsCalibration&TimesSurprisedTable
SensitivityAnalysisNeticacandoextensiveutility-freesingle-findingsensitivityanalysis.Selectanode(calledthe"targetnode")andchooseNetwork→SensitivitytoFindingsfromthemenu.Areportwillbedisplayedinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowdisplayinghowmuchthebeliefs,meanvalue,etc.ofthetargetnodecouldbeinfluencedbyasinglefindingateachoftheothernodesinthenet(eachiscalleda"findingsnodes").
Thefirstpartofthereporthasasectionforeachfindingsnode,showinghowmuchitcaneffectthetargetnodeusingseveraldifferentsensitivitymeasures.Thesecondpartisasummarytablewhichcomparesthesensitivitiesforeachofthefindingsnodes.
Ifyouwanttolimitthereporttoafewfindingsnodes,firstselectthetargetnode,andthenuseCTRL-selecttoaddthedesiredfindingsnodestotheselection.ThenchooseNetwork→SensitivitytoFindings.
CurrentlythissensitivityanalysiswillonlyworkforBayesnetsandnot=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.
Example:Supposeyouareusingthenetfordiagnosis,andyouwanttodeterminewhichtestisgoingtoprovidethebestinformationaboutthepresenceofafaultordisease.SelectthenodeforthefaultordiseaseandchooseSensitivitytoFindings.Usethesummarylistofsensitivitiesattheendofthereportgeneratedtoidentifypossiblefindingsnodeswhichwillprovidethemostinformationaboutthefault/diseasenode.Ifyouwantmoredetailedinformationofhowthesefindingsnodescaneffectthefault/diseasenode,lookupeachoftheminthefirstpartofthereport.
SingleNumber:Ifyouwantasinglenumberwhichbestdescribesthedegreeofsensitivityofonenodetoanother,itisrecommendedthatyouusethefirstcolumnofthesummaryreportattheend.For=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousnodesornodeswith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">statevaluesdefined,thiswillbethevariancereduction,otherwiseitwillbethemutualinformation(i.e.entropyreduction).
Findings:Whenthesensitivitiesarecalculated,thefindingscurrently=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredintothenetwillbetakenintoaccount,whichcaneffectthesensitivitiessignificantly.
Forfulldocumentationonthisfunction,andeachofthesensitivitymeasurescalculated,seeSensitivitytoFindings.
SensitivityToFindingsOfsignificantimportanceinBayesnetworkisameasureoftheindependencebetweenvariousnodesofthenet.Usingjustthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructureand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_d_separation.htm');returnfalse;">d-separationrules,youcandeterminewhichnodesarecompletelyindependentofwhichotherones(seeEdit→SelectNodes→Info(D-)Connected),andhowthatchangesas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsarrive.However,dependenceisamatterofdegree,andusingNetica’ssensitivityfunctionsyoucanefficientlydeterminehowmuchafindingatonenodewilllikelychangethebeliefsatanother.
Duringdiagnosis,youmaywishtoknowwhichnodeswillbethemostinformativeincrystallizingthebeliefsofthemostprobablefaultnodes.Obviously,thatwillchangeasfindingsarrive,soitmayneedtoberecomputedateachstage.Inanetbuiltforclassification,youcandeterminewhichfeaturesarethemostvaluableforperformingtheclassification(i.e.“featureselection”).Inaninformationgatheringenvironment,youcanidentifywhicharethemostimportantquestionstoaskateachpoint(toprovideinformationonthevariablesofinterest),basedontheanswerstoquestionsalreadyreceived,soastoavoidaskingunnecessaryorirrelevantquestions.
Inreal-worldmodeling,suchasenvironmentalmodeling,youcandeterminewhichpartsofthemodelmostaffectthevariablesofinterest;therebyidentifyingwhichpartsshouldbemadethemostcarefullyandaccurately.
Selectanode(calledthe"querynode")andchooseNetwork→SensitivitytoFindingsfromthemenu.Areportwillbedisplayedinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">MessagesWindowdisplayinghowmuchthebeliefs,expectedvalue,etc.ofthequerynodewouldbeinfluencedbyasinglefindingateachoftheothernodes(eachiscalleda"varyingnode").
Thefirstpartofthereporthasasectionforeachvaryingnode,showinghowmuchitcaneffectthequerynodeusingseveraldifferentsensitivitymeasures.Thesecondpartisasummarytablewhichcomparesthesensitivitiesforeachofthevaryingnodes.
Ifyouwanttolimitthereporttoafewvaryingnodes,firstselectthequerynode,andthenuseCTRL-SELECTtoaddthedesiredvaryingnodestotheselection.ThenchooseNetwork→SensitivitytoFindings.CurrentlythissensitivityanalysiswillonlyworkforBayesnetsandnot=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetworks(i.e.networkswithdecisionnodes).
Hereisanexampleuseduringdiagnosis.HereisadescriptionofthemeasuresthatNeticacalculates.
SensitivityEquationsBelowaredescriptionsofeachoftheutility-freesensitivitymeasuresthatNeticacalculates.Firstaresomenotesforinterpretingthedescriptions.
Definition:Inthedefinitions,"belief"meansposteriorprobability(i.e.conditionedonallfindingscurrentlyentered).Inthenamesofthevariousmeasures"real"referstothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueofcontinuousnodes,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretenodeswhichhavearealnumericvalueassociatedwitheachstate"expectedvalue"meanstotaketheexpectationoveraquantity.
Range:Theminimumandmaximumvaluesthatthismeasurecantakeon.
Compare:Aquantitywhichisusefultocomparethevalueofthismeasureagainst(perhapstoexpressthismeasureasapercentage).
Equation:Notethatalltheconditionalsshouldincludeallfindingsalreadyenteredintothenetwork,soP(q)isreallyP(q|E),P(q|f)isreallyP(q|f,E),etc.
Notation:
Qisthequeryvariable
Fisthevaryingvariable
qisastateofthequeryvariable
fisastateofthevaryingvariable
Xqisthenumericrealvaluecorrespondingtostateq
SUM~qmeansthesumoverallstatesqofQ.Itappliesto
thewholeexpressionfollowing.
MIN~q,MAX~qaresimilartoSUM~q
E(Q)istheexpectedrealvalueofQbeforeanynewfindings
E(Q|f)istheexpectedrealvalueofQafternewfindingffornodeF
V(Q)isthevarianceoftherealvalueofQbeforeanynewfindings
H(Q)istheentropyofQbeforeanynewfindings
RMSis"rootmeansquare",whichisthesquareroot
oftheaverageofthevaluessquared.
MinimumBeliefDefinition:MinimumbeliefthateachstateqofQcantakeduetoafindingatF.Thisprovidesavalueforeachstate.
Range:[0,P(q)]P(q)ifQisindependentofF
Compare:P(q)
Equation:Pmin(q)=MIN~fP(q|f)
MaximumBeliefDefinition:MaximumbeliefthateachstateqofQcantakeduetoafindingatF.Thisprovidesavalueforeachstate.
Range:[P(q),1]P(q)ifQisindependentofF
Compare:P(q)
Equation:Pmax(q)=MAX~fP(q|f)
RMSChangeofBeliefDefinition:ThesquarerootoftheexpectedchangesquaredofthebeliefofstateqofQ,duetoafindingatFThisprovidesavalueforeachstate.ThisisthestandarddeviationofP(q|f)aboutP(q)duetoafindingatF,withthefindingatFdistributedbyP(f).
Reference:Spiegelhalter89&Neapolitan90,p394.Theycallthesquareofthisquantitysimply"variance".
Range:[0,1]0ifQisindependentofF
Compare:P(q)
Equation:sp(q)=sqrt(Vp(q))
Vp(q)=SUM~fP(f)[P(q|f)-P(q)]^2
"Variance"ofNodeBelief(named"QuadraticScore"inolderversionsofNetica)Definition:TheexpectedchangesquaredofthebeliefsofQ,takenoverallofitsstates,duetoafindingatF.
Reference:Spiegelhalter89&Neapolitan90,p394.Theycallthis"variance"(forthemitcomesoutthesameasVp(q)becausetheyjustuse2-statenodes).
Range:[0,1]0ifQisindependentofF
Equation:s2=SUM~fSUM~qP(q,f)[P(q|f)-P(q)]^2
MinimumRealDefinition:ThelowestthattheexpectedrealvalueofQcouldgoto,
duetoafindingatF.
Requires:NodeQiscontinuous,orhasrealnumberstatevaluesdefined.
Range:(-infinity,E(Q)]E(Q)ifQisindependentofF
Compare:E(Q)=SUM~qP(q)Xq
Equation:mmin=MIN~fE(Q|f)
MaximumRealDefinition:ThehighestthattheexpectedrealvalueofQcouldgoto,duetoafindingatF.
Requires:NodeQiscontinuous,orhasrealnumberstatevaluesdefined.
Range:[E(Q),infinity)E(Q)ifQisindependentofF
Compare:E(Q)
Equation:mmax=MAX~fE(Q|f)
RMSChangeofRealDefinition:ThesquarerootoftheexpectedchangesquaredintheexpectedrealvalueofQ,duetoafindingatF.Thisturnsouttobethesameasthesquarerootofthevariancereductionofexpectedvalue.
Requires:NodeQiscontinuous,orhasrealnumberstatevaluesdefined.
Range:[0,V(Q)]0ifQisindependentofF
Compare:E(Q)andmaybeV(Q)
Equation:sm=sqrt(Vm)
Vm=SUM~fP(f)[E(Q|f)-E(Q)]^2=Vr
VarianceReductionofRealDefinition:TheexpectedreductioninvarianceoftheexpectedrealvalueofQduetoafindingatF. ThisturnsouttobethesquareofRMSChangeofReal.
Requires:NodeQiscontinuous,orhasrealnumberstatevaluesdefined.
Range:[0,V(Q)]0ifQisindependentofF
Reference:Pearl88,p323.WhathesaysisC(T|X)isactuallyC(T|X)-C(T).
Varmapping:T->Q,X->F,C->V,t->qandXq
Compare:V(Q)
Equation:Vr=V(Q)-V(Q|F)=Vm
V(Q)=SUM~qP(q)[Xq-E(Q)]^2
V(Q|f)=SUM~qP(q|f)[Xq-E(Q|f)]^2
E(Q)=SUM~qP(q)Xq
EntropyReduction(MutualInformation)Definition:ThemutualinformationbetweenQandF(measuredinbits).TheexpectedreductioninentropyofQ(measuredinbits)duetoafindingatF.
Range:[0,H(Q)]0ifQisindependentofF
Reference:Pearl88,p321.HehassignofI(T,X)backwards.
Varmapping:T->Q,X->F,I(T,X)->I
Compare:H(Q)
Equation:I=H(Q)-H(Q|F)
=SUM~qSUM~fP(q,f)log(P(q,f)/[P(q)P(f)])
Notethatthelogisbase2,whichistraditionalforentropyandmutualinformation,sothattheunitsoftheresultswillbe"bits".
Sensitivity-DiagnosisExampleIfyouwanttodeterminewhichtestisgoingtoprovidethebestinformationaboutthepresenceofafaultordisease,selectthenodeforthefaultordiseaseandchooseSensitivitytoFindings.Usethesummarylistofsensitivitiesattheendofthereportgeneratedtoidentifypossiblevaryingnodesforwhichafindingwillprovidethemostinformationaboutthequerynode.Ifyouwantmoredetailedinformationofhowthesevaryingnodescaneffectthequerynode,lookupeachoftheminthefirstpartofthereport.
Ifyouwantasinglenumberwhichbestdescribesthedegreeofsensitivityofonenodetoanother,itisrecommendedthatyouusethenumbersprovidedinthefirstcolumnofthesummaryreportattheend.Forcontinuousnodes,ornodeswithrealnumberstatevaluesdefined,thiswillbethevariancereduction,otherwiseitwillbethemutualinformation(i.e.entropyreduction).
Whenyoudoacompletesensitivityreport(i.e.onlythequerynodeselected),theninthereportNeticaalsoshowsthesensitivityofthequerynodetoafindingatthequerynodeitself.Ofcourse,theminimumandmaximumbeliefsforeachstatewillbe0and1respectively,andthemaximumreductionsinvarianceandentropywillbe100%.Thisnodeisincludedinthereportforcompleteness,andtoquicklyseewhatthemaximumofeachsensitivityvalueis(forexample,whatthefullvarianceandentropyis).
Whenthesensitivitiesarecalculated,allfindingscurrentlyenteredintothenetworkwillbetakenintoaccount,whichcaneffectthesensitivitiessignificantly.
Ifyouaretryingtofindthenextbestobservationtomakeadiagnosis,youwillprobablywanttocombinethecostofeachpossibleobservationwithitsexpectedvalueasindicatedbythesensitivitytothatobservation(finding).
Ifyouwanttoconsiderpairsofobservations,ormultipleobservations,theresultscanbequitedifferentthanifyouconsiderobservationsoneatatime.Todoapairofobservations,youmustentereachpossiblefindingofthefirstobservation,anddoasensitivityanalysisonthesecondobservation,thenaveragetheresults(weightedbytheprobabilityofthefindingforthefirstobservation)tofindanexpectedvalue.
YouwillprobablyneedNeticaAPItoautomatethis.Thesensitivitymeasures
availablefromNeticaAPI,asofversion3.10,aremutualinformation(i.e.entropyreduction),andRMSchangeofreal(i.e.variancereductionofreal).
TransformingaNetTherearecertainwaysthatNeticacantransformanetmodelwhichmodifiesitsrepresentationwithoutmodifyingitsmeaning.Neticacanremovenodesandreversethedirectionoflinksinsuchawaythatanyinferencedonewiththeresultingnetyieldspreciselythesameresultsastheoriginalnet(exceptofcoursefindingscan’tbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredforremovednodes,andtheirresultingbeliefsareunavailable).
Somereasonstodothesetransformsareto:simplifythenet,applythenettomorespecificproblems,gainunderstandingofthenetoroftherealworldrelations,orputthenetinaformforeasierprobabilityorfunction=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probab_assessment.htm');returnfalse;">assessment.
LinkReversalsSupposePandCare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discreteor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizednodeswithinanet,andthatPisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentofC.SincethereisalinkgoingfromPtoC,thetableforthetwonodesisexpressedasprobabilitiesforthestatesofC,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionedonthestatesofP(orafunctionprovidingC’svalueintermsofP’svalueifthenodeisdeterministic).ButsometimesyoumightwanttoknowwhattheprobabilitiesforthestatesofPare,conditionedonthestatesofC.
Youcanachievethatbydoinganettransformknownaslinkreversal,whichreversesthelinkfromPtoC.Whenthatlinkisreversed,theotherlinksandthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofCandPareadjustedinsuchawaythatany=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">probabilisticinferencedoneafterthereversalwillyieldexactlythesameresultsasbeforethereversal.Inotherwords,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_joint_distribution.htm');returnfalse;">fulljointprobabilitydistributionofthenetdoesnotchangewhenalinkisreversed.Theglobalrelationshipbetweenthenodesremainsthesame;justthelocalexpressionsofithavebeenchanged(asisthecasewithnodeabsorption).
Linkreversalistheprobabilisticgeneralizationoffunctioninversion,andisagoodexampleofBayesruleinaction.
AddsLinks:Duringthereversal,NeticamayaddlinkstoCfromtheparentsofP,and/oraddlinkstoPfromtheparentsofC,whichwillincreasethecomplexityofthenet(alllinksaddedwillbeconfinedtoPandits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Markov_boundary.htm');returnfalse;">Markovboundary).Whenlinksareadded,thesizeofCPTsmaygrowsignificantly,andsometimesenormously.Thesizeofthetablesistheproductofthenumberofstatesofalltheparents,sothesizeofeachtablecangrowexponentially.Whenlinkreversalsresultinanodehavingmanyparents,theoperationmaybeslow,orNeticamayreportthatthereisnotenoughmemoryavailable.
RemovesLinks:Occasionally,duringareversal,NeticamayremovelinkstoCfromtheparentsofP,and/orremovelinkstoPfromtheparentsofC,resultinginasimplernet.Forexample,ifreversingalinkaddedotherlinks,thenreversingitagainwillremovethem(assumingallthenodeshavenondegenerateCPTs,andthattherearenomajorroundinginaccuracies).
SimplerNet:Usuallywhenanetissimplerduetothedirectionofitslinks,itprovidesabettermodeloftheworld.Forexample:itusuallyrepresentstruecausalitymoreaccurately,itmaybebetteratgeneralizing,andofcourseitallowsforfastercomputation.Sometimeslinkreversalscanbeusedtosearchformoresimplenets,givenanetthatwasoriginallylearnedfromdata.InthatcaseNeticamightnotalwaysautomaticallyremovelinksthatshouldberemoved,becausealthoughtheselinkswillbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_weak_link.htm');returnfalse;">weak,theywillnotbecompletelyineffectual(perhapsbecausetheprobabilitytableslearnedarenot“exact”).Youwouldhavetoremovetheseweaklinksbyhand.
HowTo:Toreversealinkyou=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_link.htm');returnfalse;">selectitandchooseModify→ReverseLinks,orclickthe toolbarbutton.Ifanodeis=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectedwhenyouclickthebutton,Neticawilldoallthelinkreversalsnecessarytomakealllinksinvolvingthenodepointtoit.Alternately,youcan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonalink,andchooseReversefromthemenu.Right-clickingonan__unselected__nodegivestheoptionsLinks→ReverseSoAllIncomingandLinks→ReverseSoAllOutgoing,whichwilldoallthereversalsnecessarytoachievethestatedeffect.Ifalllinksaremadetopointawayfromthenode,thenmanyextralinksmayhavetobeaddedbetweentheancestorsofthenode(notjustitsMarkovboundary),andNeticamayreportthatthereisnotenoughmemoryavailable.
SeveralLinks:Ifyouhaveseverallinkstoreverse,youcanselectthemall(e.g.byCTRL-clickingonthem),andthenclickthe button.Theamountoftimeandmemoryrequiredtoreverseasetoflinksdependsgreatlyontheorderinwhichtheyarereversed.Unlessyouknowagoodordertodothereversals,youshouldreversethemallatonceratherthanone-by-onesothatNeticacanchooseagoodordertodothem.
SeealsoDisconnectingandReconnectingLinks
NodeAbsorptionNodeabsorptionisanettransformwhichremovesnodesfromaBayesnetordecisionnet,andmakesanynecessaryadjustmentstotheresultingnet,sothatanyinferencedonewithityieldsthesameresultsasbeforethenodeswereremoved(exceptofcourseyoucan’tinteractwiththeremovednodes).Thelocalrepresentationischanged,buttheglobalrelationshipsarenotchanged(asisthecasewithlinkreversal).Inprobabilitytheorythisissometimeslooselycalled“summingoutavariable”.Itleavesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_joint_distribution.htm');returnfalse;">fulljointprobabilitydistributionoftheremainingnodesunchanged.
Asanexample,supposeyouhavealargenetthathasbeenconstructedovertimebyacombinationofexpertassistanceandprobabilitylearning.Itshowstherelationshipsbetweenhundredsofvariables,andcontainsmuchvaluableinformationthatcouldbeusedinanumberofdifferentapplications.
Nowyouwanttouseitinanapplicationwhereonly10ofthevariableswillbeofinterest.Ineveryqueryofthenewapplication,aparticular4ofthese10willalwayshavethesamefindings.Forexample,oneofthenodesintheoriginalnetmightbyGender,andintherestrictedapplicationthenetwillonlybeusedforfemales,soyouwouldliketo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enterapermanentfindingof‘female’fortheGendernode.Thesenodesarecalledcontextnodes.Ineachofthequeries,youwillbereceivingnewfindingsfor4othernodes,andthenyouwanttheresultingbeliefsoftheremaining2outof10.Thenodesthatwillalwayshavenewfindingsarecalledfindingsnodes,andthosewhosebeliefsyoumaywantarecalledquerynodes.Thehundredsofothernodesinthenetmightbeinvolvedinintermediatecalculations,butyoudon’tcareabouttheirvaluesexplicitly.
Youcansimplifythelargenetdowntoonewithjust6nodesusingnodeabsorption.Firstenterthepermanentfindingsforthecontextnodes.Thenselectallthenodestobeabsorbed(i.e.allthenodesexceptthefindingsand
querynodes),andchooseModify→AbsorbNodesorclickthe toolbarbutton.Theselectednodeswillberemoved,andsomelinksmaybeaddedand/orreversed.
Order:Ifyouwant,youcanabsorbthenodesafewatatime,byselectingeachgroupandclickingthe toolbarbutton.Thefinalresultofabsorbingasetofnodesisnotdependentontheorderinwhichtheywereabsorbed,butthetimeandmemoryrequiredmaybegreatlyaffected.Ifyouhaveasetofnodestoabsorbandyoudon’tknowagoodordertouse,thenitisbesttoabsorbthemallatonce,sothatNeticacanpickagoodorder.
Returningtotheexample,theresulting6nodenetwillgivethesameinferenceresultsastheoriginallargeone,fortherestrictedqueriesyouwillbemaking.Ifyouareguaranteedthattherewillalwaysbefindingsforeveryfindingsnode,thenyoucanfurthersimplifythingsbyremovinganylinksthatgofromfindingsnodePtofindingsnodeC,providingCdoesnothaveaquerynodeasaparent.Thismeansthatifyoucanreverselinkstomakealltheevidencenodesancestorsofallthequerynodes,thenyoucanremoveallthelinksbetweentheevidencenodes.Anyfindingsnodethatisleftcompletelydisconnectedbythisoperationisirrelevanttothequery,andcanbedeleted.Andnowyoucanexaminethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofthequerynodestoseedirectlyhowtheydependonthefindings.Youmayjustbeabletolookupthedesiredprobabilitieswithoutdoing=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingatall!
ComplexityDanger:Eventhoughareducednethasfewernodesthantheoriginal,internallyitmayactuallybemorecomplex,sometimesmuchmorecomplex,ifmanylinkswereaddedduringnodeabsorbingorlinkreversing(rememberthatthesizeofanode’sCPTcanbeexponentialinitsnumberofparents).Generallyspeaking,absorbingoutcontextnodes(i.e.nodeswithfindingsentered)whichhavemanyancestornodesresultsintheworstincreaseincomplexity.Thenextworstisabsorbingoutnon-contextnodes(i.e.nodeswithnofindings)whichhavemanydescendantnodes.Absorbingoutcontextnodeswithnoancestors,ornon-contextnodeswithnodescendants,willnot
addanylinks.Ofcourse,ifthenumberofqueryandfindingsnodesisverysmallandtheyhavefewstates,theresultingnetmustbeverysimple,althoughthetransformationstogenerateitmighttemporarilyrequirealotofmemory.
NetFragmentLibrariesOftentheprobabilistic=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationbetweenanodeandits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsrepresentsasmallpieceoflocalknowledgewhichmaybeapplicableinanumberofdifferentnetstobeusedindifferentsituations.Thatrelationmayhavebeenlearnedfromdata,orenteredbyanexpert.Eachnewnetthatitisplacedincapturestheglobalrelationsbetweensuchlocalpiecesofknowledge,andbeliefupdatingcombinesthelocalandglobalknowledgewiththedetailsofsomeparticularcase.
Youcankeeppiecesoflocalknowledgeasnetfragmentsinanetlibrary,andlaterpastethemintonetsyoudesigntosolveaparticularproblem.Hereisanexampleofafewnetfragmentsinalibrary:
Example:Forexample,supposethatyoumadeasimplenetconsistingofanodecalledForecastconnectedtoanodecalledWeather(whattheweatherturnedouttobeaftertheforecast).Youcouldputthelinkbetweenthemeitherway,sinceinthissituationyoucan’treallycapturecausation(theyarebothcausedbyothervariables,suchastheweatheratearliertimes),butsayyouputthelinkfromWeathertoForecastbecauseoftenitsbettertoputlinksfrommoreimmutabletolessimmutablevariables.Youcouldlearnitsprobabilitiesfromasetofcasesconsistingoftheforecastandwhattheweatherturnedouttobe.Thenyoucouldputitinalibrarywhereitmightlookliketheleftmostfragmentinthediagramabove.Later,yougraftitintonetsforinferenceinvolvingtheweatheranditsforecast,suchasthedecisionproblemexample:
Example:Asanotherexample,supposeyouhaveadeviceformeasuringtheflowrateinapipe.Itproducesbiasedreadingsdependingontheambienttemperature,anditcanmalfunctioninafewdifferentways,eachofthemproducingwrongorinaccuratereadings.Youcanmodelthedevicewitha4nodenet,consistingofonenodeforthereadingonthedevice,and3parentnodescorrespondingto:actualflowrate,ambienttemperature,anddevicestatus(okay,broken1,broken2,etc.).Youentertheprobabilitytable,andthenyoudisconnectthenodefromitsparentsandplaceitinalibrary.Therightmostnodeinthefirstdiagramonthispageshowshowitwillappear.
Later,ifyouhaveanettomodelasituationinwhichyouusetheinstrumenttomaketwomeasurementsoftheflowsintwoconnectedpipeslocatedinthesameroom,youjustduplicatethedevicecharacteristicsnodefromthelibrarytwiceintothenewnet,andgraftittotheappropriatenodesinthatnet,asshowninthediagrambelow.Notethatiftheambienttemperaturecouldbedifferentbetweenthetwomeasurements,thentheroom_tempnodewouldappearastwoconnectednodes,similartotheflownodes,andthesamegoesfortheinstrument_statusnodeifthedevicemayhavebrokenbetweenmeasurements.
DisconnectingandReconnectingLinksPurpose:Alinkmaybedisconnectedfromitsparentnode,withoutthelinkactuallybeingremoved.Thatmeansthatthechildnodecanmaintaintheinformationontheconditionalprobabilitytableithadwithitsparent,withoutactuallybeingconnectedtotheparent.Theintentionisthatlateritwillbereconnectedtotheparent,ormorelikelytosomeothernode,beforeitisusedforinference.Itmaybereconnectedsoonafterwards,orthenode(s)maybeplacedinalibraryofnetfragmentsandonlyreconnectedwhenthelibraryisusedtobuildanewBayesnet.
HowTo:Todisconnectsomelinks,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_link.htm');returnfalse;">selectthemandthenchooseModify→DisconnectLinksorclickthe toolbarbutton.Eachlinkwillturnintoashortstubconnectedtoitschildnode,andlabeledwiththenameofthelink.Ifyouhavenotpreviouslynamedthelinks,thenNeticawillnamethemwiththenamesoftheparentnodes.Ifyouwanttodisconnectallthelinksenteringsomenode(s),selectthenode(s)andchooseModify→DisconnectLinks.Youcanalsohiliteindividuallinks,right-clickandchooseDisconnect.
ByDragging:Ifyouwanttodisconnectalinkwhilemostlymaintainingitsshape,firstclickonthelinktoselectit.Thenclickdownonthehilitedboxattheendofthelink(theendwithoutthearrow),anddragitawayfromtheparentnode.Whenyoureleasethemousebuttonyouwillknowthatyouhavedraggedtheboxfarenoughifthenameofthelinkappearsbesideit.Allofthebendsofthelinkwillbemaintained.
ChildEnd:Alinkcannotbedisconnectedfromitschildnode.Thatwouldnotmakesense,sinceadisconnectedlinkisreallyjusta“parentplace-holder”tomaintainthenode’srelation(e.g.CPT)untilitisconnecteduptoanewparent.Toachievetheaffectofdisconnectingalinkatthechildend,itsometimesmakessensetodoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_reversal.htm');returnfalse;">linkreversal,andthendisconnectthelinkattheparentend.
Reconnection:Toreconnectadisconnectedlinktoanewnode,firstclickonthelinktoselectit.Itwillbeoutlinedwiththehilitecolor,andtherewillbeaboxofhilitecoloratthedisconnectedendofthelink.ChooseModify→ReconnectLinks.
Youmaydisconnectalinkfromoneparentandconnectittoanewparentinonemotionifyouwish.
SeealsoLinkReversals
SeealsoDeletingNodesandLinks
CreatingandUsingNetLibrariesCreating:Neticamakesiteasytomaintainlibrariesofdisconnectednodesandsubnets.Tomakeanewlibrary,justchooseFile→New→Networkorclickthe toolbarbutton.Librariesarehandledinternallyinthesamewayasregularnets.Nodesandsubnetscanbecopiedtoitby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingnodes(thereisnoneedtoselectlinks),andusingEdit→CopyandEdit→Paste,whichcantransfermaterial(nodes,linksand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTs)fromonenettoanother.Whenanodeisbeingduplicated,butoneofitsparentsisn’t,thentheduplicatednodewillhaveadisconnectedlinkwherethatparentwas.
Using:Tousenodesinthelibrary,youuseEdit→CopyandEdit→Pasteagain,thistimetoduplicatefromthelibraryintothenewnet.Thenyouconnectupanydisconnectedlinks,beforecompilingthenetorusingitforinference.
Example:Forexample,tocreatealibrarywithjustthe“instrument”nodeoffigure6.1,firstyouwouldmakeanetwiththe4nodes:flow_rate,temperature,instrument_statusandinstrument.Putlinksfromnodesflow,temperatureandinstrument_statustoinstrument.Enteraprobabilitytableforthenode“instrument”.NowmakeanewnetwithFile→New→Network,selectthe“instrument”nodeintheoriginalnet,doanEdit→Copy,clickinthenewnet,doanEdit→Paste,thenaFile→Save.Younowhavefilewhichisalibrarywithasinglenodeinit.
Atalatersession,youcanusethelibrarytoconstructanetinwhichtheinstrumentisusedtomeasuretheflowsasdescribedatthebeginningofthischapter.MakeanewnetwithFile→New→Network,addthenodesflow1,flow2,instrument_statusandroom_temp,linkthemtogetherasshowninfigure6.2,andentertheprobabilitytablebetweenthem.ThenuseFile→Opentoopenthelibraryfilewiththeinstrumentnode.Selectthatnode,doan
Edit→Copy,thenclickintheapplicationnetwhereyouwanttheinstrumentnodetoappear.DoanEdit→Paste,clickagainwheretheothercopyofitshouldbeanddoanotherEdit→Paste.Finally,hookupeachofinstrument’sdisconnectedlinkstotheirappropriatenodesusingthemethoddescribedintheprevioussection.
Nowtheapplicationnetisreadyforprobabilisticinference(youcandoaNetwork→Compilemenucommand).Perhapsyouhavepositivefindingsforthe“instrument”node(i.e.whatyoureadfromitsdial),andyouusethemtodetermineflowsandtheiruncertaintiesinawaythatproperlyaccountsforrandom(uncorrelated)andsystematic(correlated)errors,aswellasallthebackgroundknowledgeaboutthesituation.
NeticaAPI:Asasisterproduct,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaProgrammer’sLibrary(API)canbeusefulforautomatingtheprocessofconstructingnetsthatarecomposedofnodesorsubnetsfromalibrary,perhapsbyusingtemplatesorrules.
COMInterface–C#andVisualBasicProgrammingNeticahasAPIsforseveraldifferentcomputerlanguages(suchasJava,C/C++,etc.),whichallowittobeusedaspartofacomputerprograminoneofthoselanguages.Formoreinformation,seeNeticaAPI.
OnesuchNeticaAPIiscalledNetica-COM.YoucanprogramNeticathroughitsCOMinterface(alsoknownasActiveXorAutomation)usinganycomputerlanguagethatcanaccessaCOMinterface.ForexampleC#,VisualBasic(VB),COMenabledJava,orC++.ThebelowiswrittenasthoughVBisbeingused,butitpertainstoprogrammingintheotherlanguagesaswell.
AgreatbenefitofprogrammingNeticathroughitsCOMinterfaceisthatpeoplecaninteractwiththeGUIatthesametimeasyourVBprogramisrunning.Thatcanbeusefulfordebugging,demos,anddistributingproductsthattakeadvantageoftheNeticauserinterfacebyallowingtheend-usertointeractdirectlywiththeBayesnet.
IfyouhaveprogrammedanMSOfficeproductusingVisualBasic,youwillfindsomesimilaritiesinstylewiththeNeticaCOMinterface.
TouseNeticaCOMinitsfullyenabledform,youmusthaveaNeticalicensepasswordthatisforbothNeticaApplicationandNeticaAPI.First,runthelatestversion(mustbeversion3.10orgreater)ofNeticaApplication,soitcanregisteritselfintheregistry.IfyouhaveseveralversionsofNeticaonyourcomputer,theversionofNeticathatVBwillusewillalwaysbetheonethatwaslastrun(forexample,bydouble-clickingit).Youcanleaveitrunningorexitit.ThentogetaccesstoitfromVisualStudio,chooseProject→AddReferencefromVisualStudio,clicktheCOMtabifnecessary,andcheck-marktheentrycalled"Netica1.0ObjectLibrary"(withperhapssomeotherversionnumber).
YoucanthenusetheobjectbrowsertoseetheNeticaobjectsandfunctionsavailable.ChooseView→ObjectBrowserorView→OtherWindows→ObjectBrowser,andthen:
•InVisualStudio6,setthelibrarytoNeticaintheupperleftchoicebox.•InVisualStudio.NET,oneofthetoplevelentriesintheobjectbrowserwillbe"Interop.Netica".Youcanbrowsethat,butitwon'tbeasgoodasbrowsing
theNeticalibrarydirectly,becauseyouwon'thaveadescriptionforeachfunction.Ifthereisnoentryatthetoplevelforthelibrarynamedsimply"Netica"(withthebooksicon),clickontheCustomizebuttonatthetopofthewindow,andthentheAddbuttonofthedialogboxthatappears.ChoosetheCOMtab,selecttheNeticalibraryfromthelist,clickSelectandthenOkay.NowtheNeticalibraryshouldappear,andyoucanbrowseit.
Intheobjectbrowser,whenyouclickonanyfunctionorenum,thenashortdescriptionwillappear,whichisgoodenoughformostprogrammingwork.Ifyouneedmoredetail,thenyouwillnoticethatwithinthedescriptionisthenameoftheequivalentfunctionintheNetica-CAPI.YoucanlookupthatfunctionintheNetica-Cdocumentation.
•Toviewthatdocumentation,see:http://www.norsys.com/onLineAPIManual/index.html•Todownloadit,goto:http://www.norsys.com/download_api.html
ExampleCode:HereisexamplecodetoprogramNeticainC#,VisualBasicandManagedC++(C++/CLI)usingtheCOMinterface.ThereisalsoanexampleVisualStudioprojectforeach,called"NeticaDemoforxx"withinthe"Netica\Neticaxxx\ProgrammingExamples"folderoftheNeticadownloadpackage.
Password/Distribution:IfyourlicensepasswordenablesonlyNeticaAPI,thentheGUIwilloperateinalimitedmode,andifyourlicensepasswordenablesonlyNeticaApplication,thenyourVBcallstoNeticawilloperateinalimitedmode.IfyouwanttodistributeyourVBprogramthatusesNetica,youneedtoonlysendNetica.exe(andperhapsNetica.hlp),butnotNetica.dll.Makesureyouhavetherequiredlicensefrom=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsysbeforeyoudoso.
TostartupNeticasothatitoperateswithapasswordthatisnotputintheRegistry,startitfromyourVBprogramwiththecommandlineargument-passwordfollowedbythepasswordyouwantNeticatouse.Thatpasswordwillnotbeenteredintotheregistry,anditssecuritypartwillnotbevisibletotheuser.
GUIControl:YoucanusetheVisiblepropertyoftheNetica.Applicationobjecttodeterminewhetherornotthegraphicaluserinterface(GUI)ispresentornot(bysettingittotrueorfalse,seetheexamplebelow).Ifitisnotvisible,thenitwillbeaminimizedwindowappearingonlyasanicononthetaskbar.Ifyouwishtopreventtheuserfromun-minimizingit,therebypreventingthemfromhavingaccesstotheNeticaGUI,settheUserAllowedpropertyofNetica.Applicationtofalse.
Example:Todotheabove,yourprogrammighthaveapartlookingsomethinglikethis:
Shell("C:\\Netica\\Netica312\\Netica.exe–password+Me/MyOrg...")
DimappAsNewNetica.Application
app.Visible=False
app.UserAllowed=False
...
app.Quit
Continuous/DiscreteNodes:Tomakeacontinuousnode,useBNet.NewNodeandpass0forthenumberofstates.Tolaterdiscretizeit,orsetthelevelsofanalready=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenode,simplychangeitsLevelproperty.YoujustsetNode.Level(0),thenNode.Level(1),etc.Itwilladjustthenumberofstatesofthenodeeachtime.Ifyouhaveverymanystates,youmaywanttostartwiththehighestfirst,sincethatissomewhatmoreefficient.
C#ExampleCodeBelowisanexampleC#programthatdoesthesamethingasthe"Demo"programthatshipswithNeticaC-API.ThereisaVisualStudioprojectforit,called"NeticaDemoforC#"withinthe"Netica\Neticaxxx\ProgrammingExamples"folderoftheNeticadownloadpackage.(moreinfoonprogrammingNeticainC#)
usingSystem;
usingNetica;
namespaceNeticaDemo
{
classProgram
{
staticvoidMain(string[]args)
{
Console.WriteLine("WelcometoNeticaAPIforC#!");
Netica.ApplicationClassapp=newNetica.ApplicationClass();
app.Visible=true;
stringnet_file_name=AppDomain.CurrentDomain.BaseDirectory+"..\\..\\..\\ChestClinic.dne";
Streamerfile=app.NewStream(net_file_name,null);
BNetnet=app.ReadBNet(file,"");
net.Compile();
BNodeTB=net.Nodes.get_Item("Tuberculosis");
doublebel=TB.GetBelief("present");
Console.WriteLine("Theprobabilityoftuberculosisis"+bel.ToString("G4"));
BNodeXRay=net.Nodes.get_Item("XRay");
XRay.EnterFinding("abnormal");
bel=TB.GetBelief("present");
Console.WriteLine("GivenanabnormalX-Ray,theprobabilityoftuberculosisis"+bel.ToString("G4"));
net.Nodes.get_Item("VisitAsia").EnterFinding("visit");
bel=TB.GetBelief("present");
Console.WriteLine("GivenabnormalX-RayandvisittoAsia,theprobabilityofTBis"+
bel.ToString("G4"));
net.Nodes.get_Item("Cancer").EnterFinding("present");
bel=TB.GetBelief("present");
Console.WriteLine("GivenabnormalX-Ray,Asiavisit,andlungcancer,theprobabilityofTBis
"+bel.ToString("G4"));
net.Delete();
if(!app.UserControl)app.Quit();
Console.WriteLine("Press<enter>toquit.");
Console.ReadLine();
}
}
}
VisualBasicExampleCodeBelowisanexampleVBprogramthatdoesthesamethingasthe"Demo"programthatshipswithNeticaC-API.ThereisaVisualStudioprojectforit,called"NeticaDemoforVB"withinthe"Netica\Neticaxxx\ProgrammingExamples"folderoftheNeticadownloadpackage.(moreinfoonprogrammingNeticainVB)
SubMain()OnErrorGoToFailed
DimappAsNetica.Application
app=NewNetica.Application
app.Visible=True
Dimnet_file_nameAsString
net_file_name=System.AppDomain.CurrentDomain.BaseDirectory()&"..\..\..\ChestClinic.dne"
DimnetAsNetica.Bnet
net=app.ReadBNet(app.NewStream(net_file_name))
net.Compile()
DimTBAsNetica.BNode
TB=net.Nodes.Item("Tuberculosis")
DimbeliefAsDouble
belief=TB.GetBelief("present")
MsgBox("Theprobabilityoftuberculosisis"&belief)
net.Nodes.Item("XRay").EnterFinding("abnormal")
belief=TB.GetBelief("present")
MsgBox("GivenanabnormalX-Ray,theprobabilityoftuberculosisis"&belief)
net.Nodes.Item("VisitAsia").EnterFinding("visit")
belief=TB.GetBelief("present")
MsgBox("GivenabnormalX-RayandvisittoAsia,theprobabilityoftuberculosisis"&belief)
net.Nodes.Item("Cancer").EnterFinding("present")
belief=TB.GetBelief("present")
MsgBox("GivenabnormalX-Ray,Asiavisit,andlungcancer,theprobabilityoftuberculosisis"&belief)
net.Delete()
IfNotapp.UserControlThen
app.Quit()
EndIf
ExitSub
Failed:
MsgBox("NeticaDemo:Error"&(Err.NumberAnd&H7FFFS)&":"&Err.Description)
EndSub
Belowisanexamplethatreadsinanetfromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_examples_folder.htm');returnfalse;">Examplesfolder(youmayhavetochangethepath),thenreadsincasesanddoesbeliefupdating.------------------------------SubMain()OnErrorGoToFailed
DimappAsNetica.Application
app=NewNetica.Application
DimcasefileAsStreamer
DimnetAsBnet
Setnetfile=app.NewStream("C:\NeticaData\BNs\Car_Diagnosis_0_Learned.dne")
Setcasefile=app.NewStream("C:\NeticaData\Cases\GoodCases\CarCases10.cas")
Setnet=app.ReadBNet(netfile)
net.AutoUpdate=1
net.Compile
Dimlights_nodeAsBnode
Setlights_node=net.Node("Lights")
Dimlights_dimAsLong
lights_dim=lights_node.GetStateIndex("dim")
DimidAsLong
DimfrAsDouble
DimcaseposnAsLong
DimdoneAsBoolean
done=False
caseposn=FirstCase
Do
net.RetractFindings
net.ReadFindingscase_posn:=caseposn,stream:=casefile,IDNum:=id,freq:=fr
net.ReadFindingscase_posn:=caseposn,stream:=casefile,nodes:=net.Nodes,IDNum:=id,freq:=fr
Ifcaseposn=NoMoreCasesThen
done=True
Else
MsgBox"BeliefinLightsdim="&lights_node.GetBelief(lights_dim)
EndIf
caseposn=NextCase
LoopUntildone
net.Delete
ExitSub
Failed:
MsgBox"Error"&((err.NumberAnd&H7FFF)-10000)&":"&err.Description
EndSub
===============================================================================EXAMPLESONHOWTOSETCPTTABLEENTRIES:-----------------------------------------HereishowyoucouldsettheCPTsofthe"ChestClinic"examplefromthemanual:
DimVisitAsiaAsBNode,TuberculosisAsBNode,SmokingAsBNode
DimCancerAsBNode,XRayAsBNode,TbOrCaAsBNode
SetVisitAsia=net.Node("VisitAsia")
...
SetTbOrCa=net.Node("TbOrCa")
Dimp(0To1)AsSingle
p(0)=0.01:p(1)=0.99:VisitAsia.CPTable("")=p
p(0)=0.05:p(1)=0.95:Tuberculosis.CPTable(Array(0))=p
p(0)=0.01:p(1)=0.99:Tuberculosis.CPTable(Array(1))=p
p(0)=0.5:p(1)=0.5:Smoking.CPTable("")=p
p(0)=0.1:p(1)=0.9:Cancer.CPTable(Array(0))=p:
p(0)=0.01:p(1)=0.99:Cancer.CPTable(Array(1))=p
p(0)=0.98:p(1)=0.02:XRay.CPTable(Array(0))=p
p(0)=0.05:p(1)=0.95:XRay.CPTable(Array(1))=p
p(0)=1:p(1)=0:TbOrCa.CPTable(Array(0,0))=p:
p(0)=1:p(1)=0:TbOrCa.CPTable(Array(0,1))=p:
p(0)=1:p(1)=0:TbOrCa.CPTable(Array(1,0))=p:
p(0)=0:p(1)=1:TbOrCa.CPTable(Array(1,1))=p:
Hereare6alternatewaystosettheCPToftheTbOrCanode.Dimp(0To1)AsSingle
Dims(0To1)AsInteger
s(1)=0:s(0)=0:p(0)=1:p(1)=0:TbOrCa.CPTable(s)=p:
s(0)=1:TbOrCa.CPTable(s)=p:
s(1)=1:s(0)=0:TbOrCa.CPTable(s)=p:
s(0)=1:p(0)=0:p(1)=1:TbOrCa.CPTable(s)=p:
Dimp(0To1)AsSingle
p(0)=1:p(1)=0:TbOrCa.CPTable("present,present")=p:
p(0)=1:p(1)=0:TbOrCa.CPTable("present,absent")=p:
p(0)=1:p(1)=0:TbOrCa.CPTable("absent,present")=p:
p(0)=0:p(1)=1:TbOrCa.CPTable("absent,absent")=p:
TbOrCa.StateFuncTable("present,present")="true":
TbOrCa.StateFuncTable("present,absent")="true":
TbOrCa.StateFuncTable("absent,present")="true":
TbOrCa.StateFuncTable("absent,absent")="false":
TbOrCa.CPTable("*,*")=Array(1,0)
TbOrCa.CPTable("absent,absent")=Array(0,1)
TbOrCa.StateFuncTable("*,*")="true"
TbOrCa.StateFuncTable("absent,absent")="false"
TbOrCa.Equation="TbOrCa(Tuberculosis,Cancer)=(Tuberculosis||Cancer)"
TbOrCa.EquationToTablenum_samples:=1,samp_unc:=False,add_exist:=False
ManagedC++ExampleCodeBelowisanexampleManagedC++(i.e.,"C++/CLI")programthatdoesthesamethingasthe"Demo"programthatshipswithNeticaC-API.ThereisaVisualStudioprojectforit,called"NeticaDemoforCLRC++"withinthe"Netica\Neticaxxx\ProgrammingExamples"folderoftheNeticadownloadpackage.(moreinfoonprogrammingNeticainManagedC++)
usingnamespaceSystem;usingnamespaceNetica;intmain(array<String^>^args){
Console::WriteLine("WelcometoNeticaAPIforManagedC++!");
Netica::Application^app=gcnewNetica::Application;
app->Visible=true;
String^net_file_name=AppDomain::CurrentDomain->BaseDirectory+"..\\ChestClinic.dne";
Streamer^file=app->NewStream(net_file_name,nullptr);
BNet^net=app->ReadBNet(file,"");
net->Compile();
BNode^TB=net->Nodes->Item["Tuberculosis"];
doublebel=TB->GetBelief("present");
Console::WriteLine("Theprobabilityoftuberculosisis"+bel);
BNode^XRay=net->Nodes->Item["XRay"];
XRay->EnterFinding("abnormal");
bel=TB->GetBelief("present");
Console::WriteLine("GivenanabnormalX-Ray,theprobabilityoftuberculosisis"+bel);
net->Nodes->Item["Cancer"]->EnterFinding("present");
bel=TB->GetBelief("present");
Console::WriteLine("GivenabnormalX-Ray,Asiavisit,andlungcancer,theprobabilityofTBis"+bel);
net->Delete();
if(!app->UserControl)app->Quit();
Console::WriteLine("Press<enter>toquit.");
Console::ReadLine();
return0;
}
Non-EnglishBayesNetsAlthoughNeticaApplicationisinEnglish,itcanbeusedtobuildBayesnetsinanylanguage.Neticacanworkwithnon-Latinandinternationalcharactersets(suchasChinese,Japanese,Arabic,Hebrew,orUnicode),includinggeneratingSVGgraphicswiththosecharacters.
ThefollowingaretheplaceswhereNeticawillaccepttextinanycharacterset:
•Titleofeachnode(notitsname).•Titlesofallthestatesofeachnode(nottheirnames).•Comment(description)ofeachnode.•Commentsforeachstateofeachnode.•Titleofthenet(notitsname).•Overallcomment(description)ofthenet.•User-definedfieldsofnodesandthenet.
ThesearesufficientfortheBayesnetdevelopertoprovidetheend-userwithaBayesnetintheirnativelanguage.
HowTo:Inanyoftheaboveplaces,youcanpasteintextfromanotherprogramwhichusesacharactersetbasedon=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Unicode.htm');returnfalse;">Unicode.OryoucanchangethecharactersetfromtheWindowstaskbar,andthentypeinthecharacters.Oryoucanuse=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPItoset/getthemwithUnicodestrings.
Font:Makesureyouchoosenodefonts,whicharecapableofdisplayingthecharactersyoudesire.AUnicodecapablefont,suchasArialUnicodeMS,isusuallyasafechoice.
BlackRectangles:Youmayjustseejustblackrectangleswherethereshouldbenon-Englishtext.Iftheyappearonthenetdiagram,theproblemisthatthefontthatyouhavegiventhenodesisnotcapableofdisplayingthecharacters(asdescribedintheparagraphabove).Iftheyappearwithindialogboxes,
yourcomputerneedstobeconfiguredtodisplaythecharacters(asdescribedintheparagraphbelow).Ifthedialogboxcontainsarowofquestionmarksinstead,thatindicatesaninvalidplacetobeenteringnon-Englishtext.
ConfiguringComputer:TomakeinternationalcharactersetsavailablefromtheWindowsXPtaskbar,chooseStart→Settings→ControlPanel→RegionalandLanguageOptions→Languages.Ifyoudesireoneofthelanguagesmentionedatthebottomcheck-boxes,andtheboxisnotcheck-marked,firstcheck-markthebox,clickOK,restartyourcomputer,andreturntothisdialogbox.
ThenclickDetails→Settings→Add,chooseaninputlanguage,keyboardlayoutandclickOK.YoucannowswitchbetweendifferentinputlanguagesusingtheLanguageBar,whichwillappear(usuallyontherightsideoftheWindowstaskbar).
WebsitesforCharacters:Forsomecharactersetsitismoreconvenienttogeneratethecharacterswithaspecialprogramorwebsite.
Forexample,see:http://code.cside.com/Inparticular:http://code.cside.com/3rdpage/utf-8/and
http://people.w3.org/rishida/scripts/pickers/
CommandLineOptionsIfNeticaisrunfromthecommandlineitcanacceptaNeticapassword,whichisusedforthatsession,butnotenteredintotheregistry.
IfNeticaisrunwithcommandlineparameters,thenonstart-up,Neticawillputinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowalineshowingwhatcommandlineparameterswereused.
SetPath:TorunNeticafromthecommandline,youmuststartitfromthedirectorythatcontainstheNeticaApplicationexecutable(i.e.theNetica=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_NeticaHomeFolder.htm');returnfalse;">homedirectory).Alternately,youcanincludethehomedirectorywiththeNeticafilename(suchastypingsomethinglikeC:\ProgramFiles\Netica\Netica317\Netica.exeallenclosedindoublequoteswherenecessary).Athird,morepermanent,choiceistoputtheNeticahomedirectoryintheMSWindowspathenvironmentvariable.
YoucanfindthehomedirectoryfromNeticabychoosingHelp→AboutNetica,andthenlookingintheMessageswindow.
Youcanaddtotheenvironmentpathvariablebyfollowing:
Start→Settings→ControlPanel→System→Advanced→EnvironmentVariables→Path→Edit.
ThenaddasemicolonandtheNetica=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_NeticaHomeFolder.htm');returnfalse;">homedirectorytotheend.
Running:Bringupthecommandlinedialogboxbyfollowing:Start→Run...ThentypeinthefilenameofNetica(e.g.Neticaor"Netica325").Or,youcanusetheshellinterpreter,availablebychoosingStart→Programs→
Accessories→CommandPrompt.
Notethatyouneedthequotesifthereisaspaceinthefilename.Whenyoupressokay,Neticashouldcomeup.
Options:YoucanputcommandlineargumentsaftertheNeticafilenametoachievecertainresults.Thefollowingaretheoptions:
<file-name>WhenNeticastartsup,itwillopentheBayesnetwiththegivenfilename.Youwillneedtoputthefullpath,anddon'tforgetquotesarounditiftherearespacesinthename.IfthenetwascompiledandAutoUpdatingwasturnedonwhenitwaslastsaved,thenwhenitcomesupinNetica,itwillbeallreadytogo.Example:"Netica305""C:\NeticaData\MyBN.neta"
-print<file-name>PrintstheindicatedBayesnetfileonthedefaultprinteringraphicalformat.-case<file-name>Readsthefirstcasefromtheindicatedfile,intotheBayesnetithasopened.ThisoptionmustfollowanoptiontoreadinaBayesnet.Example:Netica"C:\Data\MyBN.neta"/case"C:\Data\MyCase.cas"
-password<pw>RunsNeticawiththegivenlicensepassword.Ignoresanyinstalled=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_CY_password.htm');returnfalse;">password.ItusesthepasswordforthissessionofNeticaonly(i.e.itdoesn'tinstallthepasswordonthecomputerforthenexttimeNeticaisrun).-EmbeddingThisisonlyforthoseusingtheCOMinterface(ithastheusualmeaningunderCOM).
Example:IfthefollowingisrunfromthedirectorycontainingBayesnetfile"ChestClinic.dne"andcasefile"NoAsia.cas"(andthehomedirectoryisonthesystempath):
>NeticaChestClinic.dne-caseNoAsia.cas
ItwillbringupNetica,openthechestclinicnet,andreadtheNoAsiacaseintothatnet.
Underprogramcontrol:YoumaywanttolaunchNeticadirectlyfromanotherprogram.Mostdevelopmentsystemshaveafunctiontosendacommandtotheoperatingsystem(e.g.ashellcommand).
Forexample,ifyouareprogramminginC/C++,youcouldcalltheWin32functionCreateProcess,orthefunctionWinExec,asfollows:
WinExec("Netica.exe",SW_SHOWNORMAL);
Allthecommandlineoptionswork,soyoucouldcall:
WinExec("\"C:\\Netica\\Netica307.exe\"C:\\Data\\MyBN.neta",SW_SHOWNORMAL);
ObfuscatingaNetIftheprotectionofintellectualproperty,orproprietaryorclassifiedinformationisaconcernforyou,NeticahastheabilitytoobfuscateyournetandtoworkwithencryptedBayesnets.Thesemanticcontentofthenetisretained,soinferenceresultswillnotbeaffected.
HowTo:Ifyouaregoingtosendthenettosomeoneelse,butithasproprietaryinformationthatyoudon'twanttorevealtootherusers,chooseModify→Obfuscatenet.Anewwindowwillopenwiththeobfuscatednet.Ifyouselectnodesbeforeyouobfuscate,itwillonlyapplytothosenodes.Ifnonodesareselected,itwillapplytotheentirenet.
Action:Allidentifyinginformationassociatedwiththenet(includingnodename,nodetitle,nodecomment,statename,statetitle,statecomment,nettitle,netcomment,netfilename,linknames,node-setnames)willberemovedorconvertedintonon-identifyinglabels.
XRefReport:Thesechangesareloggedintothe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindowforfuturereference,calledacrossreferencereport.IfyouwishtopastetheseresultsintoanExcelspreadsheet,selectthetextinthecrossreferencereport(excludingthereportheading)andchooseModify→TabifySelection,thenpressCTRL+Ctocopythetable.InanExcelworkbook,pressCTRL+Vtopastethetable.
Youcanusethecrossreferencereportasakeytotranslatebetweenthefullnetandtheobfuscatednet.Forinstance,iftheobfuscatednetistobepartofapackagecontainingsoftwarethatusesNeticaAPItoreadinthenet,entersomefindingsandperformsomequeries,thenthekeywillcontaintheinformationneededtoconvertthefamiliarnamestotheonesneededbyNeticaAPI.
Encryption:AnotherwaytoprotectorhidetheinformationinaBayesnet,istouseNetica'sencryptioncapability.Infact,anetcanbebothobfuscatedandencrypted.
EncryptingaNetNeticaoffersstrong(64bit)encryptionofBayesnets.ItmaybeusedforsecurityduringthedevelopmentofclassifiedBayesnets,ortoprotectyourIPwhendistributingBayesnets.
HowTo:Makethenetthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_active_window.htm');returnfalse;">activewindow,chooseFile→EncryptionPassword,andenterthepasswordyouwishtouse.Fromthenon,eachtimeyousavethenet,itwillbeinencryptedform.
Onceanetissavedinencryptedform,theonlywaytoreaditisusingNetica,andtosupplyNeticawiththesamepasswordusedtoencryptit.
ForNeticaAPI:EncryptionisoftenusedtoprotectIPwhendistributingaBayesnetinapackagewhichalsocontainsNeticaAPIandaspecializedprogramthatisgoingtousethenetviaNeticaAPI.Thespecializedprogramhasthepasswordbuiltintoit(possiblyinmutatedordistributedformtoevadedetection),anditusesthatpasswordwhenitcallsNeticaAPItoreadintheBayesnet.
Obfuscation:WhenyouwanttohidetheidentifyinginformationinaBayesnet,butyoucan'tuseencryptionbecauseyouhavetomakethenetavailable,thenobfuscatingthenetmaybeabetterchoice.
CustomizingtheToolbarTochangeNetica’stoolbar,simplydouble-clickonablankareaofthetoolbar,orchooseWindow→CustomizeToolbar,andusetheresultingdialogboxtomakedesiredchanges.Thedialogboxwilllooksomethinglikethis:
Toaddbuttonstothetoolbar,dragthemfromtheleftlisttotherightlist(orhighlightitandclickAdd).Dothereversetoremovebuttonsfromthetoolbar.Toaddaseparator,dragitfromthetopoftheleftlisttowhereveryouwouldlikeoneontherightlist.Buttonsintherightlistcanalsobedraggedupanddowntocreateanidealorder.Pressingthe"Reset"buttonsetsthetoolbartoNetica'soriginalbuttons.Whenyouaresatisfiedwithyourchanges,clickClosetosavethem.
Oncetheyareonthetoolbar,buttonscanberearrangedorremovedmanuallybyholdingdowntheALTkeywhiledraggingthem.YourchangeswillbesavedwhenyouexitNetica,sothattheyareavailableforthenextsession.
Manyofthesetoolbarbuttonsareassociatedwithacceleratorkeys.Foralistofshortcutkeysandtheirfunctions,clickhere.
GroupingNodeStatesSometimesitisusefultoorganizethestatesofanodeintogroups,whicheffectivelygivesitacoarserresolution.BoththefinerresolutionandthecoarseronecanbeusedinthesameBayesnet.Sincethecoarsernodeislessprecise,usingitinsteadofthefineonewillresultinlesspreciseresults,butthedifferencemightbeinsignificant.
Youhavetojudgewhatisappropriateforyourparticularapplication.
ForExample:Youmaywanttogroupthestatesofacountryintoregions.ForexamplethefinernodewouldhavestatesCA,FL,TX,VA,etc.whilethecoarseonewouldhavestatesWest,Midwest,South,etc.
Anotherexampleisacontinuousnodethatis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizedwithdifferentresolutions.Forexampleacoarsetemperaturenodemayhavethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_threshold.htm');returnfalse;">thresholds0,10,20,etc.whilethefineonehasthresholds0,5,10,15,etc.
Reasonsforgroupingstates:
•Becauseyouhaveprobabilitiesforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTsofothernodesgiventhecoarsenode,butnotgiventhefinenode.Orperhapsyoujustwanttoelicittheprobabilitiesrelatingtothecoarsenodebecausethetablesaresmaller,anditiseasier.
•YouwanttheBayesnettolearnfrommultipledatasources(e.g.twodifferentdatabases),andtheydescribevariablesindifferentways(perhapsoneismoredetailed,andprovidesmorepossiblestatesforavariable).
•Toeasethecomputationalburden(e.g.usingthecoarsenodeinsteadofthefineoneastheparenttothosenodesthathavealotofotherparents).
•Youwanttodisplayresultsinsummarizedform.Perhapstheend-userviewingthebelief-bardisplaywantstoseetheprobabilitiesforawholegroupofstates,insteadofadetailedbreakdown.
•Youmaywanttoallowfortheentryoffindingsthataren'tspecifiedprecisely.Forexample,allowinganentryof"car"foraVehicle_Typenode,ratherthan"sedan","stationwagon",etc.sincethatinformationmightnotbeknown.Essentially,thisresultsinenteringalogicaldisjunctionoverthefinerstates.
•Youareonlyinterestedinoneparticularstate,andyougrouptherestofthemtogetheras"other".
HowTo:Maketwonodesandgivethemnamesthatarealmostthesame,toindicatetheyareforthesamevariable.Perhapsthecoarseronecouldbesuffixedwith"_Approx".Sometimesitisbesttoappendawordwhichdescribesthelevelofresolution,suchas"Country","Region"or"Province".
Onenodeshouldbegiventhesetoffinestates,theothergiventhesetofcoarsestates.
Inthecaseofacontinuousvariable,thefinernodewouldhavethesamethresholdlevelsasthecoarseone,butwithsomeextrathresholdsadded.Ifthefinenodeismissingsomeofthethresholdsthecoarseonehas,themethodwillstillwork,butwillintroduceextrauncertainty,sinceNeticamustturnthecoarsenodeintoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_chance_node.htm');returnfalse;">chancenodewhenitbuildsthetable.
Drawalinkfromthefinenodetothecoarsenode.Thatmustbetheonlylinkenteringthecoarsenode(ifyouneedtohaveotherlinksenteringit,usethe"equalityconstraintlink"methodinstead).
Enteratabletoshowthefunctionalrelationshipbetweenthefineandcoarsenodes.Bringupthetableeditorforthecoarsenode,changeitfromChancetoDeterministic,andthengothroughalltherows(theycorrespondtothestatesofthefinenode),enteringintherighthandcolumntheequivalentstateforthecoarsenode(byclickingonitandchoosingfromthemenu).
Insteadyoumaywanttoshowthefunctionalrelationshipwithanequation.
Bringupthenodepropertiesboxforthecoarsenode,usethemulti-purposeselectoratthebottomtochooseEquation,andthenenteranequationlike:
VoterRegion(VoterState)=
(VoterState==CA)?West:
(VoterState==OR)?West:
(VoterState==FL)?South:
...
(VoterState==VA)?East:Other
oryoucouldusethestyle:
VoterRegion(VoterState)=
(VoterState==CA||VoterState==OR||VoterState==WA)?West:
(VoterState==FL||VoterState==TX)?South:
...
(VoterState==VA||VoterState==NY||VoterState==MA)?East:Other
Fordiscretizedcontinuousnodes,yousimpleputanequality,suchas:
Temperature_Approx(Temperature)=Temperature
Afterenteringtheequation,clickOKonthedialog,andconverttheequationtoatable.
Thenlinkthetwonodesintothenetworkthewayyouwant.Eachcanbeaparentorchildtoanyothernodeyouwant,exceptthecoarsenodecannotbeachild.Ifthatisrequired,usean"equalityconstraintlink".
Remember,ifyouareusingNeticatolearnfromdata,givinganodethestate"other"willcatchanystateyouhaven'texplicitlygiventhenode.
CombiningNetsThepurposeofthisfeatureistocombinetheknowledgeoftwoormoreBayesnetsintoasinglenet.Thenetsmayhavebeenlearnedfromdata,orcreatedbyexperts.
Youstartwithonenet(theoriginalnet),andthenaddonanother(theadditionalnet),toformtheresultantnet.Thisprocessmayberepeatedtocombineanynumberofnets.
Ifnodesineachofthenetshavethesamename(regardlessofstates),theywillbeinterpretedasstandingforthesamevariable,andwillresultinasinglenodeintheresultantnet.Amongnodeshavingthesamename,theresultantnodewillhaveallthestatesoftheoriginalnodeandthestatesoftheadditionalnode.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTswillbecombinedaccordingly.
Howto:Openyouroriginalnet,orcreateanewone.ChooseModify→CombineNets,andfromthestandardfile-opendialogbox,picktheBayesnetfiletobeaddedon.Ifyouwishtocombineseveralnets,thenafteraddingthefirstone,successivelyaddtheothersinthesameway.
Neticawillnextaskyoutoenteradegreefortheadditionalnet.Itisanamounttoweighttheknowledgeinthatnetrelativetothefirstnet.Youwillalmostalwaysacceptthedefaultof1.0,sincetheexperienceamountsalreadyweightthenetsrelativetoeachother,andthedegreeisjustanextra"experiencemultiplier"toprovideaddedflexibility(seebelow).
Experience:Ifthenetswerelearnedfromdata,thentheywillhave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_experience.htm');returnfalse;">experiencetablesaswellas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTtables,whichwillweightthenetsaccordingtohowmuchdatawasusedtolearneachone.Ifthenetswerecreatedbyexpertsratherthanlearnedfromdata,theymay
haveCPTtableswithnoexperiencetables.Inthatcaseyouwillbepromptedforasingleexperiencenumbertobeappliedtothewholenet.Theeffectofthenumberyouenterisjusttoweightthenetsproducedbyeachexpert,buttheideaistoenteranumberthatisanestimateoftheequivalentnumberofcasesseenbythatexpert.Ifyouwishtohavemorecontrolovertheexperienceamounts(forinstance,differentnumbersforeachnode,orevenatableofdifferentnumbersforeachnode),thenentertheexperiencetablesbeforedoingthecombiningoperation.
Structure:Thestructureoftheoriginalnetandtheadditionalnetdonothavetobethesame,buttheymustbecompatible.Ifindoubt,trycombiningthemandobservingtheresultsobtained.Youmaywanttoadjustthestructureofoneorbothnetsbefore-handtomakethemcompatible.Forthatpurposeyoucanuselinkreversals,orevenbetter,youcanconstructtheCPTableswithBuildFromOtherNet.
Degree:ThewaythatNeticausesthedegreeasanexperiencemultiplieris:Ifthedegreeislessthanoneitmultipliesallexperiencenumbersoftheadditionalnetbythedegree,andifitismorethanone,itmultipliesalltheexperiencenumbersoftheoriginalnetby1/degree.Soexperiencenumbersareneverincreased,andthemagnitudeofthedegreeindicateshowmuchmorereliabletheadditionalnetiscomparedtotheoriginalnet.
Alternative:Anotherwaytocombinenetsistocopynodesfromtheadditionalnet,andthenpastethemintotheoriginalnet.Youmighthavetohookupsomedisconnectedlinks.ThatmethodwillnotcombineCPTtables.
ShortcutKeysforNetica
F1 HelpINFO
F3 FindNextINFO
SHIFT F4 TileWindowsINFO
CTRL F4 CloseWindowINFO
ALT F4 ExitNeticaINFO
SHIFT F5 CascadeWindowsINFO
F6 RandomCaseINFO
F7 PasteINFO
F8 GetNextCaseINFO
SHIFT F8 GetPreviousCaseINFO
F9 AddNode(single)INFO
F9-F9 AddNode(multiple)INFO
F10 AddLink,(single)INFO
F10-F10 AddLink(multiple)INFO
CTRL A SelectAllINFO
CTRL+SHIFT A InvertSelectionINFO
CTRL B ReportBeliefsINFO
CTRL C CopyINFO
CTRL E ReportCase(Evidence)INFO
CTRL F FindINFO
CTRL G MakeSVGGraphicINFO
CTRL+SHIFT G GoBackINFO
CTRL L LearnFromCaseINFO
CTRL N NewBayesNetWindowINFO
CTRL+SHIFT N NewNode-SetINFO
CTRL O OpenFileINFO
CTRL P PrintINFO
CTRL R RemoveFindingsINFO
CTRL S SaveINFO
CTRL+SHIFT S SelectNode-SetINFO
CTRL T EditTable(CPT)INFO
CTRL U UpdatebySamplingINFO
CTRL V PasteINFO
CTRL W CloseWindowINFO
x Fillwithimpossiblecharacter,CPTTable
INFO
CTRL X CutINFO
CTRL Y RedoINFO
CTRL+SHIFT Z RedoINFO
CTRL Z UndoINFO
0 Fillwith0,CPTTableINFO
CTRL 0 FillinMissingCPTEntriesINFO
CTRL 1 NormalizeCPTRoworTableINFO
CTRL 8 SelectIncompleteCPTTableINFO
CTRL SelectIncompleteCPTTableINFO
= MakeuniformCTPTableINFO
CTRL Insert CopyINFO
SHIFT Insert PasteINFO
CTRL Tab CyclesAmongOpenWindows
ALT Tab CyclesThroughRunningApplications
ALT Enter DisplaysPropertiesofSelectedItem
CTRL > ZoomOutINFO
CTRL < ZoomInINFO
CTRL+SHIFT > ZoomToFitINFO
CTRL+SHIFT < ZoomToNormalINFO
CTRL+ALT > ZoomToPercentageINFO
CTRL+ALT < ZoomBackINFO
SpaceBar ZoomGlobalINFO
ALT Back UndoINFO
SHIFT Delete CutINFO
Delete DeleteINFO
Pause NormalModeINFO
GeneralMSWindowsshortcuts:ALT+UNDERLINEDLETTERSinthemenudoesthecorrespondingmenucommandWINDOW+LlockscomputerCTRL+DRAGduplicateswhatisbeingdragged
Youmaywanttoprintouttheabovetable,tokeepasahandyreferenceguide.
FileFormatsBayesNetFiles.dne R/W NeticaBayesnetfileintextformINFO
.neta R/W NeticaBayesnetfileinbinaryform(possiblyencrypted)INFO
.net R HugintextfileforBayesnets.NeticacanreadfilescreatedbyHugin4.*,5.*and6.*INFO
.dxp R KnowledgeIndustriesfileforDXpress
.dsc R BNIFfile
.ergo R NoeticSystemsfileforErgoINFO
CaseFilesorDataFiles.cas R/W NeticacasefileINFO
.uvf R/W NeticacasefileinUVF(uncertainvalueformat)INFO
.csv R/W Commaseparatedvalue(mayhaveotherextensions)INFO
.txt R/W Tabdelimitedtext(mayhaveotherextensions)INFO
GraphicsFiles.svg W XMLscalablevectorgraphicsfileINFO
.svgz W CompressedSVGfileINFO
TextFiles.txt R/W Asciitextfile(mayhaveotherextensions)INFO
.dne R/W INFO
.cas R/W INFO
.xml R INFO
.svg W INFO
"R"meansNeticacanreadthefileand"W"meansitcanwritethefile.
BibliographyForabriefdescriptionofsomeofthese,seeIntroductoryReferences.Eachbibliographyreferenceisalsolistedintheindex,soyoucanfindwhereinthisdocumentitismentioned.
Boerlage,Brent(1994)LinkStrengthinBayesianNetworks,UBC,BritishColumbia,Canada.See:TechReport
Cain,Jeremy(2001)PlanningImprovementsinNaturalResourceManagement,CentreforEcology&Hydrology,WallingfordUK.
Charniak,Eugene(1991)“Bayesiannetworkswithouttears”inAIMagazine(Winter1991),12(4),50-63.
Clemen,RobertandTerenceReilly(2001)MakingHardDecisionswithDecisionTools,Brooks/Cole,PacificGrove,CA.
Cowell,Robert,A.PhilipDawid,SteffenL.LauritzenandDavidJ.Spiegelhalter(1999)ProbabilisticNetworksandExpertSystems,Springer,NewYork.
Darwiche,Adnan(2009)ModelingandReasoningwithBayesianNetworks,CambridgeUniversityPress.
Friedman,Nir,DanGeiger,andMoisesGoldszmidt(1997)"Bayesiannetworkclassifiers"inMachineLearning,Vol29,131-163.
Glymour,Clark(2001)TheMind’sArrows:BayesNetsandGraphicalCausalModelsinPsychology,TheMITPress,Cambridge,MA.
Heckerman,DavidandJackBreese(1994)“Anewlookatcausalindependence”inUncertaintyinArtificialIntelligence:Proc.oftheTenthConf.(July,Seattle,WA),RamonLopezdeMantarasandDavidPoole(eds.),MorganKaufmann,SanMateo,CA.
Heckerman,David,AbeMamdaniandMichaelP.Wellman(1995)“Real-worldapplicationsofBayesiannetworks”inCommunicationsoftheACM,38(3),24-26.IntroductiontothisspecialissueofCACMonBayesnets.
Henrion,Max,JohnS.BreeseandEricJ.Horvitz(1991)“Decisionanalysisandexpertsystems”inAIMagazine(Winter1991),12(4),64-91.
Jensen,FinnV.(1996)AnIntroductiontoBayesianNetworks,Springer-Verlag,NewYork.
Jensen,FinnV.andThomasD.Nielsen(2007)BayesianNetworksandDecisionGraphs,2ndEdition,Springer,NewYork.
Jensen,Frank,FinnV.JensenandSorenL.Dittmer(1994)"Frominfluencediagramstojunctiontrees"inUncertaintyinArtificialIntelligence:Proc.oftheTenthConf.(July,Seattle,WA),RamonLopezdeMantarasandDavidPoole(eds.),MorganKaufmann,SanMateo,CA.
King,JackL.(2001)OperationalRisk:MeasurementandModelling,Wiley.
Kjaerulff,UffeB.andAndersL.Madsen(2008)BayesianNetworksandInfluenceDiagrams,Springer,NewYork.
Koller,DaphneandNirFriedman(2009)ProbabilisticGraphicalModels:PrinciplesandTechniques,TheMITPress,Cambridge,MA.
Korb,KevinandAnnE.Nicholson(2004)BayesianArtificialIntelligence,Chapman&Hall,London,UK.
Lauritzen,SteffenL.(1995)"TheEMalgorithmforgraphicalassociationmodelswithmissingdata"inComputationalStatisticsandDataAnalysis,19(2),191-201.
Lauritzen,SteffenL.andDavidJ.Spiegelhalter(1988)“Localcomputationswithprobabilitiesongraphicalstructuresandtheirapplicationtoexpertsystems”inJ.RoyalStatisticsSocietyB,50(2),157-194.
Matheson,JamesE.(1990)“UsingInfluencediagramstovalueinformationandcontrol”inInfluenceDiagrams,BeliefNetsandDecisionAnalysis,RobertM.OliverandJ.Q.Smith(eds.),JohnWiley&Sons,Chichester.
Neapolitan,RichardE.(1990)ProbabilisticReasoninginExpertSystems:TheoryandAlgorithms,JohnWiley&Sons,NewYork.Currentlyoutofprint.
Neapolitan,RichardE.(2004)LearningBayesianNetworks,PearsonPrenticeHall,UpperSaddleRiver,NJ.
Neapolitan,Richard(2007)ProbabilisticMethodsforFinancialandMarketingInformatics,MorganKaufmannPublishers.
Neapolitan,Richard(2009)ProbabilisticMethodsforBioinformatics:WithanIntroductiontoBayesianNetworks,MorganKaufmannPublishers.
NRC-CNRC(2006)CanadianJournalofForestResearch,Vol36,Number12,December2006.
Pearl,Judea(1988)ProbabilisticReasoninginIntelligentSystems:NetworksofPlausibleInference,MorganKaufmann,SanMateo,CA.2ndedition1991.
Pearl,Judea(2009)Causality-Models,Reasoning,andInference,2ndedition,CambridgeUniversityPress,Cambridge,UK.
Pourret,Olivier,PatrickNaimandBruceMarcot(2008)BayesianNetworks:APracticalGuidetoApplications,Wiley.
Russell,StuartandPeterNorvig(2009)ArtificialIntelligence:AModernApproach(3rdedition),PrenticeHall,EnglewoodCliffs,NJ.
Shachter,RossD.(1986)“Evaluatinginfluencediagrams”inOperationsResearch,34(6),871-882.
Shachter,RossD.(1988)“Probabilisticinferenceandinfluencediagrams”inOperationsResearch,36(4),589-604.
Shachter,RossD.(1989)“Evidenceabsorptionandpropagationthroughevidencereversals”inProc.oftheFifthWorkshoponUncertaintyinArtificialIntelligence(Windsor,Ont.),303-308.Laterrepublishedin:Henrion,Max(ed.)(1991)UncertaintyinArtificialIntelligence5,North-Holland,Amsterdam.
Shafer,Glenn(1996)TheArtofCausalConjecture,MIT,MA,USA.
Sloman,StevenA.(2005)CausalModels:HowPeopleThinkabouttheWorldandItsAlternatives,OxfordUniversityPress,NY,USA.
Smith,JamesE.,SamuelHoltzmanandJamesE.Matheson(1993)“Structuringconditionalrelationshipsininfluencediagrams”inOperationsResearch,41(2),280-297.
Spiegelhalter,DavidJ.,A.PhilipDawid,SteffenL.LauritzenandRobertG.Cowell(1993)“Bayesiananalysisinexpertsystems”inStatisticalScience,8(3),219-283.
Spirtes,Peter,ClarkGlymourandRichardScheines(2000)Causation,Prediction,andSearchSecondEdition,TheMITPress,Cambridge,MA.
Zhang,Lianwen(Nevin),RunpingQiandDavidPoole(1994)“Acomputationaltheoryofdecisionnetworks”inInternationalJournalofApproximateReasoning,11(2),83-158.
GlossaryA-EAbsorption:NodeabsorptionistheprocessofremovinganodefromaBayesnetordecisionnet,andadjustingtheremaininglinksandnodetablessothatsubsequentinferencedoneontheremainingnodeswillyieldthesameresults.UsuallyNeticahastoaddsomenewlinkstomaintaintheglobalrelationshipsbetweenthenodes.MoreInfo
ActiveWindow:Menuandkeycommandsgenerallyapplytotheactivewindow,whichisthewindowwiththenon-dimtitlebar,andisthefrontmostwindow(exceptpossiblyforsomedialogboxesandhelpwindows).Youcanmakeawindowactivebyclickingonanexposedpartofit,orbychoosingitstitlefromtheWindowmenu.
ASCII:ASCIIisatextcharacterencodingbasedontheEnglishalphabet,andwasfirstreleasedasastandardin1967.Itrepresentseachcharacterwith7bits,althoughtherearemany8-bitextensionsofit.ASCIIanditsextensionshavebeenbyfarthedominantwaytorepresenttextinacomputer,butarenowbeingovertakenby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Unicode.htm');returnfalse;">Unicode,whichcanrepresentmanymorecharacters.InNetica,identifiers(i.e.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_IDname.htm');returnfalse;">IDnames)arealwayscomposedonlyofASCIIcharacters,whiletitlesanddescriptionsmaybeinUnicode.
Assessment:Probabilityassessmentistheprocessofhumansdeterminingtheprobabilisticordeterministicrelationshipsbetweennodesandtheirparents(usuallyintheformof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobabilitytables)afterallthenodesandthelinkstructurehavebeencreated.Alternatively,theycanbedeterminedautomaticallybysomelearningprocedure.
Auto-updating:IfaBayesnetisauto-updating,thenwheneverits=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsbecomeinvalid,perhapsdueto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteringnewfindings,theyareautomatically=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">recalculated(providedthenetis=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compiled).Sinceupdatingmaybetimeconsuming,youmayprefertoonlyhavethenetupdatedwhenyoumanuallyrequestit.Thedefaultfornewnetsisthattheyareauto-updating.MoreInfo
Background:ThebackgroundofaBayesnetordecisionnetisthearea(withinitswindow)whichisnotcoveredbyanodeoralink.
Barrennode:Abarrennodeisanodewithno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">children,andthatisnota=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_findings_node.htm');returnfalse;">findingsnodeora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_query_node.htm');returnfalse;">targetnode.During=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingandfinding=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_optimal_policy.htm');returnfalse;">optimaldecisions,nodesthatarebarrendon’tinfluencetheresults,andmaysimplyberemoved.
Bayesnet:ABayesnet(alsoknownasabeliefnet)iscomposedofasetofnodesrepresentingvariablesofinterest,connectedbylinkstoindicatedependencies,andcontaininginformationabouttherelationshipsbetweenthenodes(oftenintheformofconditionalprobabilities).Usagesincludeprediction,diagnosis,probabilisticmodeling,learningfromdataandformingabasisforbuilding=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.MoreInfo
Belief:Thebeliefofanodeisthesetofprobabilities(oneforeachofitspossiblestates),takingintoaccountthecurrentlyenteredfindingsbyusingtheknowledgeencodedintheBayesnet.Technicallyspeaking,itisthemarginalposteriorprobabilitydistributionofthenode,giventhefindingsandtheBayesnetmodel.Sometimesthepluralform“beliefs”isusedtomeaneachoftheprobabilitiesintheset.
Beliefupdating:Beliefupdatingistheprocessoffindingnew=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsforthenodesofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnettoaccountforthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsthatarecurrentlyknown.Itisaformofprobabilisticinference.DuringbeliefupdatingtheBayesnetmodel(inparticular,the=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobabilitytablesbetweenthenodes)isnotmodifiedatall;forthat=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probability_revision.htm');returnfalse;">probabilityrevisionisused.MoreInfo
Bernoulliprocess:ABernoulliprocessconsistsofaseriesofindependent
trials,eachwithtwopossibleoutcomes(oftenlabeled"success"and"failure"),withaconstantprobability,p,ofsuccess(suchasasetofcointosses).Iftherearentrials,itisalsocalledabinomialexperiment,andthetotalnumberofsuccesses,k,isgivenbythebinomialdistribution.Thenumberoftrialsneededbeforegettingafixednumberofsuccessesisgivenbyanegativebinomialdistribution,andthenumberoftrialsneededtogetonesuccessisgivenbyageometricdistribution.Iftherearemorethantwopossibleoutcomes,itisamultinomialexperiment,anditsresultsaregivenbyamultinomialdistribution.
Binarynode:Abinarynodeisanodewithexactlytwo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">states.Ifthosestatescorrespondto‘true’and‘false’,thenitisalsocalleda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleannode.
Binomialcoefficient:Thebinomialcoefficient,denotedbinomial(n,k),isthenumberofdifferentk-sizedgroupsthatcanbedrawnfromasetofndistinctelements.Itsvalueisgivenby:binomial(n,k)=n!/(k!*(n-k)!)WithinaNeticaequation,youcanrepresentitwiththebinomialfunction.
Booleannode:Abooleannodeisanodewithtwostates,andwhosestatenamesare(true,false),(yes,no),(present,absent)or(on,off).Thesestatenamescanbeineitherorder,andinloweroruppercase(suchasTrueorTRUE).Somepeoplerefertothemas“propositionalnodes”.Theyareexamplesof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_binary_node.htm');returnfalse;">binarynodes.
Cartesianproduct:Thecartesianproductoftwosetsisthesetofallpossiblepairsofelements,wherethefirstelementofeachpairistakenfromthefirstset,andthesecondelementistakenfromthesecondset.Forexample,thecartesianproductof{low,medium,high}with{true,false}is{(low,true),(low,false),(medium,true),(medium,false),(high,true),(high,false)}MoreInfo
Case:Acaseisasetof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingsthatgotogethertoprovideinformationononeobject,event,history,person,orotherthing.MoreInfo
Casesymbol:Thecasesymbolisatinyyellowpagewithwritingtodepictalistofattributesandvalues.Itlookslikethis: Itisusedontoolbarbuttonstoindicatea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">case.
Forexample,the buttonremovesthecurrentcase,the buttonsavesthecasetoafile,andthe buttonreadsacasefromfile.
Centrallimittheorem:Thecentrallimittheoremstatesthatthedistributionofthesumofasetofrandomvariablesapproachesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_normal_distribution.htm');returnfalse;">normaldistributionasthenumberofvariablesincreases,providedtheyareindependentandsomeotherweakconditions(suchasLiapounov'sconditions)aremet.Theseconditionswillalwaysbemetiftheyareidenticallydistributedandtheirmeansandstandarddeviationsexist.
Chancenode:Achancenodeisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenodewhose=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationshipwithits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsisprobabilistic(i.e.notdeterministic).Ifitsparentsvaluesareallknown,andthereisnofurtherinformation,thenitsvaluecanonlybeinferredasaprobabilitydistributionoverpossiblevalues.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicnode.
ChangedIndicator:Achanged-indicator(sometimesknownasa"dirtyindicator")isa*or+afterthetitleofthenetinthenetwindow'stitlebar,andmeansthatthenetcurrentlydisplayedhasbeenchangedfromtheversionsavedtofile.*meansameaningful(i.e."semantic")change,while+meansjustachangetothevisualdisplay.Enteringfindingswillnottriggerthechanged-indicator,unlesstheyareforaconstantnode.Thechanged-indicatorproperlyrespondstoundoandredo.(moreinfo)
A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogcanalsohavea*changed-indicator.Oritcanhavea(*)indicator,whichmeansthatsomethingelsehaschangedthetarget,whichmakesitdifferentfromtheversioninthedialogbox.MoreInfo
Childnode:Ifthereisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">linkgoingfrom=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodeAtonodeB,thenBissaidtobeachildnodeofA.Somepeoplerefertoitasadirectsuccessor.
Clipboard:Wheneveryoudoacopyoperation(forexamplebychoosingEdit→Copy,orpressingCTRL+C),thematerialyoucopygoestotheclipboard,fromwhichyoucanpasteitwhereyoulike.
Clique:Acliqueisasetofnodesinwhicheachnodeisconnectedtoalltheothernodesoftheset,andthereisn’tanyothernodeinthenetwhichisconnectedtoallthenodesintheset.Somepeoplecallthisa“maximalclique”.WhenNeticacompilesaBayesnet,onestepistofindthecliquesofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_triangulated.htm');returnfalse;">triangulated=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_Markov_network.htm');returnfalse;">Markovnetwork.
Compile:WhenNeticacompilesaBayesnetittakesarepresentationofthenetsimilartowhatyouseeonthescreen,andfromitbuildsanewrepresentationcalleda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontree,whichitcanusetodofast=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">probabilisticinference.MoreInfo
Conditionalprobability:Theconditionalprobabilityofaneventistheprobabilityoftheeventoccurringundercertaingivenconditions.MoreInfo
Conditionallyindependent:AvariableXissaidtobeconditionallyindependentofanothervariableYgivenknowledgeZ,ifobtainingknowledgeaboutthevalueofXdoesnotchangeyourbeliefsaboutthevalueofYwhenyoualreadyknowZ.
Conjugatedistributions:Conjugatedistributionsareprobabilitydistributionsfromafamilyofdistributions,suchthatifthepriordistributionbelongstothefamily,thenforanysamplesizeandanyobservations,theposteriordistributionalsobelongstothefamily.Usuallyeachdistributioninthefamilycanbespecifiedbyoneortwoparameters,soonlytheseparametersneedtobekepttrackofduringprobabilisticinference,whichisparticularlyconvenient.
Constantnode:Sometimesitisusefultohavesomethingthatnormallyactsasafixedconstant,butwhichyoucanchangefromtimetotime.Thatisthepurposeofaconstantnode.MoreInfo
Contingencytable:Acontingencytableprovidesavalue(orsetofvalues)foreachpossibleconfigurationofvaluesforsomegivenvariables.Inotherwords,itspecifiesafunctionofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_cartesian_product.htm',400,145);returnfalse;">cartesianproductofthevariables.Netica’s=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogboxcanbeusedtovieworeditcontingencytables.
Continuousvariable:Acontinuousvariableisonewhichcantakeonavaluebetweenanyothertwovalues,suchas:indoortemperature,timespentwaiting,waterconsumed,colorwavelength,anddirectionoftravel.A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariablecorrespondstoadigitalquantity,whileacontinuousvariablecorrespondstoananalogquantity.MoreInfo
CPT:CPTisanabbreviationforconditionalprobabilitytable(alsoknownas“linkmatrix”),whichisthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_contingency_table.htm');returnfalse;">contingencytableof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobabilitiesstoredateachnode,containingtheprobabilitiesofthenodegiveneachconfigurationof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentvalues.SometimesCPTisusedtorefertothedeterministic=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontableofanode,sincethenode'sconditionalprobabilitiescaneasilybefoundfromthat.Itisaformofnode=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relation,soyouusethetabledialogboxtochangeorviewit.
CSVfile:CSVfileisacommonlyusedtermforaformofcasefileinwhichthenamesofthevariablesappearonthefirstline,andthenbelowareallthecases(i.e.records),witheachcaseonasinglelineandhavingavalueforeach
ofthevariables,andwithallthevaluesandvariablesin=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_file.htm');returnfalse;">textformandseparatedbycommas(i.e."CommaSeparatedValues").Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_tab_delimited_file.htm');returnfalse;">tabdelimitedtext.
Cutset:AcutsetfortwosetsofnodesAandBisathirdsetC,suchthatifallthenodesinCareremovedfromthenet(alongwithalllinksinvolvingthem),thenthereisnopathfromanodeinAtoanodeinB.Seealsoloopcutset.
d-separation:Thed-separationruleenablesyoutoquicklydeterminewhethera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingatonenodecanpossiblychangethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsatanothernodebyonlyconsideringthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructureofaBayesnet.MoreInfo
Dag:Adagisanetwithno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_cycle.htm');returnfalse;">directedcycles(althoughitmayhave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_loop.htm');returnfalse;">undirectedloops).Thewordisashortenedformof“directedacyclicgraph”.
Decisionnet:If=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodes(representingvariablesthatcanbecontrolled)and=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynodes(representingvariablestobeoptimized)areaddedtoa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnet,thenadecisionnet(alsoknownasan“influencediagram”)isformed.MoreInfo
Decisionnode:Adecisionnodeisanodeina=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetwhichrepresentsavariable(orchoice)underthecontrolofthedecisionmaker.Whenthenetissolved,a=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_rule.htm');returnfalse;">decisionruleisfoundforthenodewhichoptimizesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedutility.Decisionnodesarenormallydrawnasrectangles(withoutroundedcorners).
Decisionrule:Adecisionruleindicateswhichoptiontochooseinmakingacertaindecision,foreachpossibleconditionthatmaybeknownwhenthedecisionistobemade.Inotherwords,fora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnode,itisafunctionwhichprovidesavalueforeachmemberofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_cartesian_product.htm');returnfalse;">cartesianproductoftheparentsofthedecisionnode.
Decisiontheory:Decisiontheoryisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_normative.htm');returnfalse;">normative
theorywhichindicateshowasingleagentshouldbestmakedecisionstomaximizehisexpectedutility.Itconsiderssequencesofdecisions,whatinformationtheagentwillhavewhenhemakesthedecisions,uncertaintiesinthebeliefsoftheagent,andcomplexprobabilisticinteractionsintheenvironmentinwhichtheagentisoperating.
Defaultnodestyle:Thereisonedefaultnodestyleforthewholenet,whichisthestyletodisplayanynodewhichdoesn’thaveanoverridingstyle.ItissetbychoosingitfromtheStylemenuwhennonodesareselected.MoreInfo
Deselect:Todeselectallthenodesofanet,clickonitsbackground(i.e.withinthewindow,butnotonanodeorlink).MoreInfo
Deterministicnode:Adeterministicnodeisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenodewhoserelationshipwithits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsisgivenasafunctionoftheparentvalues(i.e.deterministicratherthanprobabilistic).Iftheparentvaluesareallknown,itsvaluecanbedeterminedwithcertainty.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_chance_node.htm');returnfalse;">chancenode.
Deterministicupdating:Beforedoing=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating,Neticadoesdeterministicupdatingwhenitcan,forgreaterspeedandaccuracy.Ifalltheparentsofanodehave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings,andthenodehasa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontableoradeterministicequation,thenitsvaluecanbefoundexactly(the
equationisusedwithout=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretization)veryquickly.
Directedcycle:Adirectedcycle(sometimesjustcalleda“cycle”)isa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_path.htm');returnfalse;">paththroughanet,followingthedirectionofthearrows,whichreturnstoitsbeginning(i.e.thefirstnodeofthepathisthesameasthelast).Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_loop.htm');returnfalse;">undirectedloop.
Neticacanfindanddisplaydirectedcycles.
Directednetwork:Adirectednetworkisonewherethelinkshavedirection(i.e.arrows).Bayesnetsanddecisionnetsareexamples.Comparewithan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_network.htm');returnfalse;">undirectednetwork.
Directedpath:Adirectedpathisasequenceofnodesfroma=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_net.htm');returnfalse;">net,suchthatyoucangetfromonenodeofthesequencetothenextnodebytraversingalinkbetweentheminthedirectionofitsarrow.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_path.htm');returnfalse;">path.
Dirtyindicator:seechangedindicator.
Disconnectedlink:Adisconnectedlinkisonethathasbeendisconnectedfromtheparentnodeitoriginallycamefrom,and=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingcannotproceeduntilthelinkisreconnectedtoitsparent,ortoanothersimilarnode.MoreInfo
Discretenode:Adiscretenodeisanoderepresentinga=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariable.Thestatesofanodeconstitutethedomainofthecategoricalvariable.
Discretevariable:Adiscretevariableisonewithawelldefinedfinitesetofpossiblevalues,called=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">states.Examplesare:thenumberofdimesinapurse,the‘true’or‘false’valueofastatement,whichpartywillwintheelection,thecountryoforigin,andtheplacearoulettewheelstops.Adiscretevariablecorrespondstoadigitalquantity,whilea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousvariablecorrespondstoananalogquantity.MoreInfo
Discretize:Oftenitisusefultohavea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">continuousvariablebehavelikea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discreteone.Todothis,selectthenode(s)andchooseModify→DiscretizeNode.Youcanbreakupthetotalrangeofthecontinuousvariableintoanumberofintervalsbysupplyingnumbersshowingwhereoneintervalendsandthenextbegins(called=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_threshold.htm');returnfalse;">thresholds).Thisisknownasdiscretizingthevariable.Eachintervalresultsinonestateofthediscreteversionofthevariable.MoreInfo
Eliminationorder:Theeliminationorderissimplyanorderedlistofallthenodesinthenet,whichspecifieshowto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_triangulated.htm');returnfalse;">triangulatethenetduring=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compiling(seeSpiegelhalter&DLC93).Triangulationisthemostcriticalstepinproducinganefficientcompilation,sotheorderisincludedwhenthenetisnextsavedtofileifan“OptimizedCompile”command(whichfindsaverygoodeliminationorder)hasbeendone.Theeliminationorderisindicatedbythenumbersfollowingthenodenameswhenyouviewthenetin“triangulatedstyle”.
Ellipsis:Anellipsisisthreecloselyspaceddots,usedtoindicatethatthereismoretofollow,butthatithasbeenleftouttosavespace.Forexample:LongNameFor…
E-mail:The=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">NorsysteamverymuchwelcomesquestionsandcommentsaboutNeticaorthisonscreenhelpdocument.Allinquiresshouldbesentto:[email protected],chooseHelp→EmailNorsys.
Enteringfindings:WhenaBayesnetisappliedtoaparticularsituation,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">case,thentheknowninformationaboutthatcaseisenteredintotheBayesnetbyassigningvalues(called"=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings",or"evidence")totheknownvariables(i.e.nodes),andthatprocessisknownasenteringfindingsintothenodes.Enteringafindingintoaparticularnodedoesnot=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_retract_finding.htm');returnfalse;">retractexistingfindingsatthatnodeorothernodes(butforconvenience,inNetica
Application,ifthenewfindingforanodeflat-outcontradictsapreviouslyenteredfindingforthatnode,thepreviousfindingwillberetractedfirst).MoreInfo
Equation:WithinNetica,theprobabilisticordeterministicrelationshipbetweennodesmaybeexpressedusinganequation,asanalternativeto=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontables.Theequationfollowsasyntaxcommoninmathematicsandcomputerprogramming,andmayuseanyofalargesetofspecialfunctionsbuilt-intoNetica.MoreInfo
Ergo:AprogramavailablefromNoeticSystemsIncorporatedwhichworkswithBayesnets.IfyouhaveBayesnetfilesintheoldErgoformat(i.e.not.entfiles)whichyouwishtousewithNetica,thengivethemafileextensionof".ergo"andNeticawillbeabletoreadthem.
Errorrate:Ifaclassifieristestedonanumberofcases,eachofknownclass,onecandeterminehowmanytimesitmisclassifiedacase(i.e.saidthecasebelongedtosomeclasswheninfactitbelongedtoadifferentone).That,dividedbythenumberofclassificationsmade,istheerrorrate(usuallyexpressedasapercentage).Theerrorrateisonlywithrespecttotheprobabilitydistributionofthetestcases.
Examples:AfteryouinstallNeticaonyourcomputer,withinthe"Netica"folderwillbeafoldercalled"Examples".ItcontainsseveralBayesnetssuitableforanintroductiontothefieldofBayesnets,andforuseinlearningaboutNetica.Withinitisafoldercalled"Tutorial-Viewthesefirst"containingonorderedsetofBayesnetsthatcontainsometutorialinformationandexercisesintheirnetdescriptionwindow;ifyouareworkingthroughthem,youmightbeinterestedinreadingtheQuickTourofthisonscreenhelp(ifitmentionssomefileyoudon'tseeintheExamplefolder,don'tforgettolookinitsTutorialsubfolder).Formanymoreexamples,besuretoseeourgreatonlineBayesnetlibrary,availablebychoosingHelp→NetLibraryWebsite.
Expectedvalue:Theexpectedvalue(alsoknownas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_mean_value.htm');returnfalse;">meanvalue)isnotthevalueyou“expect”tosee,andusuallyitisn’teventhevaluemostlikelytooccur.Thisterm,fromprobabilitytheory,meanstheaveragevaluethatwilloccur,wheretheaverageisweightedbytheprobabilityofoccurrence.Forexampleifthevaluewillbe3withprobability0.2and9withprobability0.8,thentheexpectedvalueis:(0.2x3)+(0.8x9)=7.8.
Experience:ForlearningandcommunicatingtheknowledgecontainedwithinaBayesnet,itisusefultoindicatea“confidence”intheconditionalprobabilitiesitcontains,sothatoneknowshowmuchtochangethemwhennewinformationaboutthembecomesknown.Thatconfidenceiscalledtheexperience,anditiscalibratedtobeequivalenttoseeingacertainnumberofrelevantcases.Sometimesthisiscalledthe“equivalentsamplesize”.MoreInfo
Explaining-Away:IfAandBarebothpossiblecausesofE,thenwhenwefindthatEoccurred,providingtherearenocomplicatingfactors,ourbeliefsthatAoccurredandBoccurredwillbothincrease.ButifwefurtherdiscoverthatAoccurred,thenourbeliefthatBoccurredwillgobackdownalittle.Thisiscalledexplaining-away,becauseAprovidestheexplanationforE,andthereisnoneedforBtohaveoccurredtoexplainE.Bayesnetsautomaticallyhandleexplainingawayinthecorrectmanner,whileevidence-basedandrule-basedsystemsaregenerallypooratit.
GlossaryF-MFading:WhenaBayesnetisusedinanenvironmentthatischanging,itmaybedesirabletohaveitadapttoitsenvironmentbyconstantlylearning,inaprocessthatweightscasesithasseenrecentlymorestronglythanthoseseeninthefarpast.Theprocessofdiscountingknowledgelearnedfromthepastiscalledfading.MoreInfoFinding:Afinding(alsoknownas“evidence”)isavalueforoneofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodes(i.e.variables)ofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetwhenitisappliedtoaparticularsituation.MoreInfoFindingsmenu:A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretenode’sfindingsmenuisobtainedby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickingonthenode.Itliststhestatesofthenode,andmaybeusedtoentera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">finding.MoreInfoFindingsnode:Afindingsnodeisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodewhichhasa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">finding,orwhich
weknowwillreceiveafindingbeforedoing=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_query_node.htm');returnfalse;">targetnode.Functiontable:Whentherelationshipbetweenanodeanditsparentsisdeterministic,ratherthanprobabilistic,theninsteadofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTanodemayhavefunctiontable,inwhicheachrowcorrespondstoaconfigurationofparentvalues,andtherowprovidesasingleoutputvalueforthechildnode(i.e.thetableisafunctionmappingparentnodetuplestochildnodevalues).IfafunctiontableisconvertedtoaCPT,theneachrowoftheresultingCPTwillconsistonlyofzeroes,withasingle1(or100%)positionedatthestatethatwasthefunctiontable'svalueforthatrow.MoreInfoHomefolder:TheNeticahomefolderisthefolderthattheNeticaexecutable"Netica.exe"appearsin,asdescribedinInstallation.NormallyeachversionofNeticaonyoursystemhasitsownhomefolder.WhenNeticaisrunning,youcandiscoverwhichfolderisthehomefolderbychoosingHelp→Aboutandthenlookingatthelastlineofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Messages_window.htm');returnfalse;">Messageswindow.AlsosometimescalledtheNeticahomedirectory.Hugin:AqualityprogramavailablefromHuginExpertA/SwhichworkswithBayesnetsmuchthesameway=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica.htm');returnfalse;">Neticadoes.Neticacanread.netfilesproducedbyHuginversions4,5or6.
IDname:AnIDnameisanywordthatstartswithasimpleletter(a-zorA-Z),iscomposedonlyofsimpleletters,digitsandunderscores(_),andis30orfewercharacterslong.Itmustnotcontainanyspacesorpunctuation.iff:iffmeans“ifandonlyif”.Sotheexpression“AiffB”canbeinterpretedtomean“ifAthenB,andifBthenA”.Ineffectuallink:Anineffectuallinkisoneinwhichthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTtableofitschildnodecontainthesameprobabilitiesindependentofthestateofthatlink'sparentnode.Inotherwords,thetablecontainsreplicatedchunks,withanidenticalchunkforeachstateoftheparentnode.Ineffectuallinksmayberemovedwithouteffecting=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">inferenceresultsatall.Whenalinkisfirstadded,itisaddedasanineffectuallink,andremainsthatwayuntiltheCPTtablesofitschildnodearemodified.Neticacanfindanddisplayalltheineffectuallinksinanet.Informationallyindependent:AvariableXissaidtobe(informationally)independentofanothervariableYifobtainingknowledgeaboutthevalueofXdoesnotchangeyourbeliefsaboutthevalueofY.IfXisinformationallyindependentofY,thenYisinformationallyindependentofX.Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditionally_independent.htm');returnfalse;">conditionallyindependent.Informationallink:Anylinkenteringa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodeisknownasaninformationallink,andindicatesthatthedecisionmakerwillknowthevalueofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentnodewhenhemustmakethatdecision.Invertiblenode:Aninvertiblenodeisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicnodewhoserelationshipwithitsparentsisinvertible.Thatis,thevalueofanyoneofitsparentsmaybeexpressedasafunctionofitandtherestofitsparents.Jointdistribution:Thejointdistributionprovidesaprobabilityforeverypossibleoutcome(i.e.everyelementofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_cartesian_product.htm');returnfalse;">cartesianproductofallthegivenvariables).Sinceone,andonlyone,oftheseoutcomeswilleventuallyoccur,thejointdistributionprobabilitiesaddto1.Jointprobability:Ajointprobabilityisaprobabilityfromthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_joint_distribution.htm');returnfalse;">jointdistribution.Junctiontree:Ajunctiontree(alsoknownasa“jointree”)istheinternalstructurethatNeticausesfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating.Neticacompilesa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetor=4
&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetintoajunctiontreeforefficiency.MoreInfoLatentnode:Alatentnode(alsoknownasa“hiddennode”)isanodeinalearnedBayesnetwhichdoesnotcorrespondtoanyvariableintheinputdata.Thatis,thevariablewascreatedtomoreeasilyexpresstherelationshipsbetweenobservedvariables.Leafnode:Aleafnodeisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodewithno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_child_node.htm');returnfalse;">children.Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_barren_node.htm');returnfalse;">barrennodeand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_root_node.htm');returnfalse;">rootnode.Likelihoodfinding:Alikelihoodfinding(alsoknownas“virtualevidence”)isa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingwithsomeuncertaintyattached.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativefindingand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positivefinding.MoreInfo
Link:Alink(alsoknownasan“arc”oran“edge”)isaconnectionbetweentwo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodesindicatingdependence,andisusuallydrawnasalinewithanarrowatoneend.MoreInfoLinkreversal:Linkreversalistheprocessofchangingthedirectionofalink,andthenmakingnecessarychangestotherestofthenetsothatanysubsequentinferenceresultswillnotbeaffected.However,itmayresultinlessefficientinference(oroccasionallymoreefficient),sinceextralinksmayhavetobeadded(removed)tomaintaintheglobalrelationshipsbetweenthenodes.MoreInfoLinkstructure:Thelinkstructure(alsoknownasthe“topologicalstructure”or“dependencygraph”)ofaBayesnetordecisionnetisjustthegraphstructureofthenet.Inotherwords,itconsistsonlyofthenodenamesandlinks,butnotofanyotherinformationaboutthenodesortheparticular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationshipsthenodeshavewiththeirparents.Loopcutset:Aloopcutsetforanetisasetofnodessuchthatiftheyareallremovedfromthenet(alongwithalllinksinvolvingthem)therewillbenoloopsinthenet.Seealsocutset.Markovblanket:AsetofnodesBisaMarkovblanketofnodeX,ifgivenfindingsforallthenodesofB,Xisindependentofallothernodesinthenet.Ifitistheminimalsuchset,thenitiscalledtheMarkovboundary(seebelow).Markovboundary:TheMarkovboundaryofanodeXistheminimalsetofnodesforwhichanysetof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_positive_finding.htm');returnfalse;">positive
findingscanbesuppliedandXwillbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditionally_independent.htm');returnfalse;">conditionallyindependentofallothernodesinthenet.ForaBayesnet,thisisX'sparents,X'schildrenandX'schildrens'otherparents.AsetofnodesYcanalsohaveaMarkovboundary.IfpositivefindingsareobtainedfortheMarkovboundarynodes,thenfindingsfortheYnodeswillnotprovideanyadditionalinformationaboutanyothernodeinthenetandvice-versa.NeticacanfindanddisplaytheMarkovboundaryofanodeorsetofnodes.Markovnetwork:AMarkovnetworkisan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_network.htm');returnfalse;">undirectednetworkinwhichthenodesrepresentvariablesofinterestandtheconnectionsbetweenthemrepresentprobabilisticdependence.NeticaconvertsaBayesnetintoaMarkovnetworkasanintermediatestepinproducinga=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontree.MoreInfoMeanvalue:Incalculus,themeanvaluetheoremstates,roughly,thatgivenasectionofasmoothcurve,thereisapointonthatsectionatwhichthederivative(slope)ofthecurveisequal(parallel)tothe"average"derivativeofthesection.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_mean_value.htm');returnfalse;">MoreInfoMessageswindow:TheMessageswindowisawindowthatNeticausestocommunicatetextualinformationtoyou.YoucanopenitanytimeusingWindow→Messages,andyoucancopyandpasteinformationbetweenthe
Messageswindowandanytextfile.Sometimesifyoumakeaminormistake,Neticajustbeepsandplacesamessagethere.MoreInfoMissingdata:Ifsomecaseshavevaluesforacertainvariable,andothersdonot,thatisknownasmissingdata.MoreInfoMoralgraph:Anetinwhicheachnodehasallitsparentsconnectedtoeveryotherofitsparents(i.e.thereareno“illegitimate”children).Moralizinganetconsistsofaddingtherequiredconnectionsbetweenparentsofanodeforallthenodes(i.e.“marrying”them).MostProbableExplanation(MPE):Themostprobableexplanation,orMPE(alsoknownas“maximuma-posterioriprobability”or“MAP”)isasetofvalues(oneforeachnode)thatisthemostprobableconfiguration,giventhenet’scurrentfindings.Sincetheremaybeseveralconfigurationswiththesameprobability,theMPEmaynotbeunique.MoreInfoMultiply-connected:Amultiply-connectednetworkisadirectedorundirectednetworkwhichhasmorethanone=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_path.htm');returnfalse;">undirectedpathbetweensomepairsofnodes.Inotherwords,ithas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_loop.htm');returnfalse;">loops.MoreInfoMultipurposeselector:Whenyouclickonthemultipurposeselector,
,ofanodedialogbox,youwillbepresentedwithamenuofnodepropertiesthatcanbeeditedintheboxbelowtheselector.(MoreInfo)
GlossaryN-RNaturenode:AnaturenodeinaBayesnetrepresentssomevariableofinterest.Itmayalsoappearinadecisionnetinwhichcaseitisavariablethatcannotbedirectlycontrolledbythedecisionmaker(i.e.itisdeterminedbynature).Ifanaturenodehasafunctionalrelationshipwithitsparents,itiscalledadeterministicnode,whereasiftherelationshipisprobabilistic,itiscalledachancenode.Thecharacteristicshapeforanaturenodeisanellipse,orarectanglewithroundedcorners.Negativefinding:Anegativefindingisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingthatsomenodeisdefinitelynotinsomeparticularstate.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">positivefindingand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">likelihoodfinding.MoreInfoNet:InNeticadocumentation,thewordnetisusedtomeana=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnet.Netica:Neticaisaprogramcreatedby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsysforworking
with=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetsand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.MoreInfoNeticaAPI:NeticaAPI(alsoknownas“NeticaProgrammer’sLibrary”)issoftwarethatyoucanlinkwithyourownprogramstoachievemuchofthefunctionalityof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_Application.htm');returnfalse;">NeticaApplication.Itiscreatedby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Norsys.htm');returnfalse;">Norsysandisdesignedforworkingwith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetsand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.MoreInfoNeticaApplication:NeticaApplicationisthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica.htm');returnfalse;">Neticaproductwithaneasy-to-usegraphicalinterfaceforbuildingandworkingwithBayesnetsand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.ToprogramNetica,useNeticaAPIinstead.Netica-Web:Netica-WebisasystemtodeployyourBayesnetsovertheinternetasaquestion-answersystem.Suchasystemaskstheuserquestions,or
providesadashboardtoenterrelevantinformation,andpresentstheuserwithconclusions.MoreinfoNo-forgettinglinks:Ifadecisionmakerremembersthedecisionshemadeatanearliertime,andalsotheknowledgehehadavailabletohimatthattime,theninhisdecisionnettherewillbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_informational_link.htm');returnfalse;">informationallinksgoingfromearlierdecisionnodesandtheirparents,tolaterdecisionnodes.Thesearecalledno-forgettinglinks.MoreInfoNode:AnodeisacomponentofaBayesnetordecisionnetusedtorepresentavariable(i.e.scalarquantity)ofinterest,andinNeticaisusuallydrawnasarectangle,roundedrectangle,circleorflattenedhexagon.MoreInfoNodedialogbox:Tochangeorviewthepropertiesofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">node,suchasitsnameorthestatesithas,youuseanodedialogbox,whichyouobtainbydouble-clickingonthenode,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectingitandthenpressingtheENTERkey.Tochangeitsrelationwithitsparentnodes,youusea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogbox.MoreInfo
Currentstate:Thecurrentstateofa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogbox,isthestatedisplayednexttothelabel“State:”Itmaybechangedbyusingthepopupmenunexttothe“States:”label.
Thestateintervalthresholdsor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_value.htm');returnfalse;">statevaluedisplayedisforthecurrentstate.MoreInfo
nodename:Thenodenametexteditboxinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogboxlookslike=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_node_name.htm');returnfalse;">this.
nodetitle:Thenodetitletextboxinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogboxlookslike=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_node_title.htm');returnfalse;">this..
stateslabel:Thestateslabelinthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogboxlookslike=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_graphic_states.htm');returnfalse;">this.
Noderelationship:Anoderelationship,ornoderelationforshort,isthe
relationshipbetweenanodeandits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parents.Itmayprovidethevalueofthenodeasafunctionofitsparents’values,oritmayprovideaprobabilitydistributionforthenodedependingonitsparents’values.Itisoftenexpressedasa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTinwhichcaseitcanbeviewedoreditedusingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogbox.Alternately,itmaybeexpressedasaprobabilisticordeterministic=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equation.Non-extremeprobability:Anon-extremeprobabilitydistribution(alsoknownas“strictlypositive”)isonewheretheprobabilityisnever0.Thatmeansthatitisalsonever1,andthatithasnopointsofcomplete“certainty”.Normaldistribution:Thenormaldistribution(alsoknownas“Gaussiandistribution),isthemostcommonlyusedcontinuousdistributionwithinfinite=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_support.htm');returnfalse;">support.MoreInfoNormativetheory:Anormativetheorydoesnotindicatewhatagentsusuallydo(whichisadescriptivetheory)orwhatagentsoughttodo(whichisaprescriptivetheory),butwhatagentsmustdoiftheywishtoactoptimallyinagivensituation,whereoptimallyisdefinedinaparticularwaywithrespecttothesituation.Norsys:NorsysSoftwareCorp.isthecompanywhichdevelops=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_Netica_Application.htm');returnfalse;">NeticaApplicationand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPI.YoucangetmoreinformationaboutNorsysfromtheirwebsiteat:www.norsys.com.Questionsandcommentsareverywelcome,andmaybesentbyemail.Optimalpolicy:Theoptimalpolicy(alsoknownasthesetofoptimaldecisions)isthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_policy.htm');returnfalse;">policywhichresultsinthegreatest=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueforthesumofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynodes(oroneofthosepoliciesiftherearemorethanonewhichresultinthesameexpectedutility).Findingtheoptimalpolicyissometimescalled“solving”adecisionnet.Outcome:Theoutcomeistheresultofanevent,orseriesofevents,thatcouldhaveturnedoutinoneofseveralways.Parameterlearning:Parameterlearningistheautomaticlearningofthespecificrelationshipsnodeshavewiththeir=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsusingcasedata,onceithasalreadybeendeterminedwhichnodesaretheparentsofeachnode.Theserelationshipsareusuallyintheformof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobabilities,ortheparametersofaconditionalprobability
equation.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_structure_learning.htm');returnfalse;">structurelearning.MoreInfoParentnode:Ifthereisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">linkgoingfrom=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodeAtonodeB,thenAissaidtobeaparentnodeofB.Somepeoplerefertoitasa“directpredecessor”.Path:Apathisasequenceofnodesfroma=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_net.htm');returnfalse;">net,suchthatyoucangetfromonenodeofthesequencetothenextnodebytraversingalinkbetweenthem(butnotnecessarilyinthedirectionofthearrow).Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_path.htm');returnfalse;">directedpath.Poissonprocess:APoissonprocessisoneinwhicheventsoccurrandomlyandindependentofeachother.ThenumberofeventsthatoccurinafixedtimeperiodisgivenbythePoissondistribution,thetimebetweensuccessiveeventsisgivenbytheexponentialdistribution,andthetimerequiredfortheoccurrenceofafixednumberofeventsisgivenbythegammadistribution.Policy:Apolicy(alsoknownasa“controllaw”)isasetof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_rule.htm');returnfalse;">decisionrules,withoneforeach=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodeofadecisionnet.WhenNetica“optimizesdecisions”itfindsthepolicywhichmaximizesthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueofutility.Positivefinding:Apositivefindingisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingthatsomenodeisdefinitelyinsomeparticularstate.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_negative_finding.htm');returnfalse;">negativefindingand=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_likelihood_finding.htm');returnfalse;">likelihoodfinding.MoreInfoProbabilisticinference:Probabilisticinferenceistheprocessofcalculatingnew=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsforasetofvariables,givensome=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings.Technicallyspeaking,itistheprocessoffindingaposteriordistribution,givenapriordistribution,amodelandsomeobservations.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetsdoprobabilisticinferenceby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating.
Probabilitydensityfunction:Theprobabilitydensityfunction(alsoknownas“pdf”),isafunctionthatprovidestheprobabilityofacontinuousprobabilitydistributionateachpointwithinthedistribution.Itmaybeintegratedoveraregiontodeterminetheprobabilityofthatregion.Itisnowherenegativeanditsintegraloverthewholedistributionisalways1.Theintegralofthepdffromnegativeinfinitytoxisknownasthecumulativedensityfunction(cdf).Probabilityrevision:Probabilityrevisionistheprocessofadjustingthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">conditionalprobabilitytablesofaBayesnettoaccountforanew=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">case(i.e.setoffindings),ormoreoften,foranewsetofcases.Itisaformof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parameter_learning.htm');returnfalse;">parameterlearning,whichgenerallyinvolveslearningfromcases.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating.Prospect:Aprospectistheprobabilitydistributionoverpossible=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_outcome.htm');returnfalse;">outcomes,givena=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_policy.htm');returnfalse;">policyandsome=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings.
Querynode:SeeTargetNode.Relationsymbol:Therelationsymbolisagreentreestructurewhichlookslikethis: Itisusedontoolbarbuttonstoindicatethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationanodehaswithitsparents.Forexample,the buttonistovieworeditatable,the buttonremovesanode’stable,andthe buttonwithadicerandomizesatable.
Reports:Neticacangenerateamultitudeoftextreports,usefulinunderstandingtheinformationinyournet.Thesereportsinclude:
Report→Beliefs,whichliststhecurrentbeliefs(i.e.posteriorprobabilities)fornaturenodes,andexpectedutilitiesfordecisionnodes.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_beliefs.htm');returnfalse;">EXAMPLE
Report→CPTTables,whichliststhenoderelationasaconditionalprobabilitytable(=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPT)or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontable.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_CPT.htm');returnfalse;">EXAMPLE
Report→Elimination,whichliststheorderusedduringcompiling.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_elimination.htm');returnfalse;">EXAMPLE
Report→Equations,whichlistsall=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_equation.htm');returnfalse;">equationsofnodes.ChoosingtheHorizontalFormatoptionprintsthemininternalform.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_equations.htm');returnfalse;">EXAMPLE
Report→Excel,whichhot-linkstothenodebeliefs.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_excel.htm');returnfalse;">EXAMPLE
Report→Findings,whichliststhe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findings(i.e."case"or"evidence")currentlyentered,includinglikelihood("virtual")findings.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_findings.htm');returnfalse;">EXAMPLE
Report→JunctionTree,givesdetailsofthenetcompilationprocess.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_junctiontree.htm');returnfalse;">EXAMPLE
Report→ListSelected,generatesalistofthenamesofthenodescurrentlyselected.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_listselected.htm');returnfalse;">EXAMPLE
Report→NodeSets,whichliststhenodeswithintherequestedset.=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_nodesets.htm');returnfalse;">EXAMPLE
Report→Network,whichgivesasummaryinformationonthewholenet.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_report_whole.htm');returnfalse;">EXAMPLE
Retracted:Anytimeaftera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findinghasbeen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteredintoanode,thatfindingmayberemoved,orretracted.Afterdoingbeliefupdatingforthenet,itwillbeasifthefindinghadneverbeenentered.MoreInfoRight-click:Toright-clickonsomething,placethemousepointer("cursor")overit,thenpresstherightmousebuttonandchooseanitemfromthemenuthatcomesup.MoreInfoRootnode:Arootnodeisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodewithno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parents.Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_leaf_node.htm');returnfalse;">leafnode.
GlossaryS-ZSelectlink:Inordertodosomeoperationsona=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">link,youfirstselectitbyclickingonceonit,anditwillthenbedrawnusingnegativecolorstohiliteit.Toselectmorethanonelink,orremovelinksfromyourselection,holddowntheCTRLkeywhileclickingonthem.MoreInfoSelectnode:Inordertodosomeoperationsona=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">node,youfirstselectitbyclickingonceonit,anditwillthenbedrawnusingnegativecolorstohiliteit.Youcanselectseveralnodesatatimebyclickingonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_background.htm');returnfalse;">backgroundanddraggingtheselectionrectangletoincludethem.Toaddorremovenodesfromyourselection,holddowntheCTRLkeywhileyoudotheselectionoperation,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_right_click.htm');returnfalse;">right-clickonthenodeandchooseSelect/Deselect.MoreInfoSingly-connected:Asingly-connectednetworkisadirectedorundirectednetworkthathasatmostone=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_path.htm');returnfalse;">undirectedpathbetweenanytwonodes.Inotherwords,ithasno=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_loop.htm');returnfalse;">loops.MoreInfo
Standarddeviation:Thestandarddeviationisthesquarerootofthevariance.ItsunitsarethesameasthoseofX,anditisameasureofhow“spreadout”or“imprecise”thedistributionis.MoreInfoStatelevel:When=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretizingacontinuousvariable(i.e.node),asetofnumericbordersisusedtopartitiontherangeofthevariableintointervalscalledstates.Thosebordersarecalledthresholds.Eachstateofthediscretizedvariablehasalowerthresholdandanupperthreshold,withtheupperthresholdbeingthesameasthelowerthresholdofthenextstate.Ifreferenceismadetoastate'sthresholdwithoutspecifyinglowerorupper,thenlowerisimplied,anditisalsosometimesreferredtoasthestate'slevel.Statevalue:Any=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete_node.htm');returnfalse;">discretenodemayhaveassociatedwitheachofits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">statesanumber(integerorreal)calleditsstatevalue,whichmaybeusedtoidentifythatstateindatabasesorcasefiles,ormaybeusedtoprovidean"outputvalue"forthatstateinequations.=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_continuous.htm');returnfalse;">Continuousnodesdon'thavestatevalues,butiftheyhavebeen=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discretize.htm');returnfalse;">discretized,theyhavestate=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state_threshold.htm');returnfalse;">thresholdsinstead,andsometimesthetermstatelevelisusedtorefertonumbersthatare
statevaluesorthresholds.MoreInfoStates:A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretevariablecantakeononeofseveralvalues,andthesevaluesarecalledstates.Forexamplethestatesmaybe“female,male”,ortheymightbe“US,Europe,Japan,China”,or“True,False”.WithNeticayoucanjustletthestatesofanodebenumbered,butusuallyyougivethemmeaningfulnames.Structurelearning:Structurelearningistheautomaticdiscoveryofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructureofaBayesnetfromcasedata.Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parameter_learning.htm');returnfalse;">parameterlearning.Support:Thesupportofaprobabilitydistributionistherangeofitsvariable(s)overwhichthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_pdf.htm');returnfalse;">pdfisnonzero.Inotherwords,thosevaluesofthevariablewhicharepossible.Tabdelimitedtextfile:Tabdelimitedtextfileisacommonlyusedtermforaformofcasefileinwhichthenamesofthevariablesappearonthefirstline,andthenbelowareallthecases(i.e.records),witheachcaseonasinglelineandhavingavalueforeachofthevariables,andwithallthevaluesandvariablesintextformandseparatedbytabcharacters.Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CSV_file.htm');returnfalse;">CSVfile.Tabledialogbox:Tochangeorviewtherelationshipofa=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node.htm');returnfalse;">nodewithits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentsthatis,edititsconditionalprobabilitytable(CPT)or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_function_table.htm');returnfalse;">functiontable,youuseatabledialogbox.Toobtain=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_select_node.htm');returnfalse;">selectthenode,andthenchooseTable→View/Editorclickthe toolbarbutton.Itisnottochangethenode'sbasicproperties;forthat,usea=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_dialog_box.htm');returnfalse;">nodedialogboxinstead.MoreInfo
Tableselector:Withinthetabledialogbox,youwillfindatableselector,whichlookslike=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_selector.htm');returnfalse;">this,andwhichprovidesamenuforyoutoselectthetypeoftablethatyouview.
TargetNode:Atargetnodeisanodewhosebeliefswewanttoknowafterbeliefupdating.Alsoknownasa"querynode".Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_findings_node.htm');returnfalse;">findingsnode.
Testsensitivity:Thetestsensitivityofanimperfecttestisthepercentageofcasestestingpositiveoutofthosethatshouldtestpositive.Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"
onclick="BSSCPopup('X_PU_test_specificity.htm');returnfalse;">testspecificity.Testspecificity:Thetestspecificityofanimperfecttestisthepercentageofcasestestingnegativeoutofthosethatshouldtestnegative.Seealso=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_test_sensitivity.htm');returnfalse;">testsensitivity.Texteditor:AtexteditorisaprogramthatallowsyoutomodifyplainASCII=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_file.htm');returnfalse;">text.ForsmallfilesyoucanuseNetica’sFile→New→TextEditorFile→OpenasText.ForlargerfilesyoucanuseawordprocessingprogramsuchasMSWordorWordPad(saveas“TextOnly”ifyouwishtomakeafile).Textfile:Atextfileconsistsonlyof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_ASCII.htm');returnfalse;">ASCIIcharacters.Ithasnospecialsymbols,noformatting(bold,italics,fontsorsizes),nostructure(paragraphsections,chaptersections,margins,etc.),andnospecialinserts(pictures,tables,etc.).Youcancreateormodifyatextfileusinga=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_text_editor.htm');returnfalse;">texteditor.Time-delaylink:Atime-delaylinkisalinkwhichindicatesthatthechildnodeisforavariable'svalueatapointintimelaterthanthevalueofthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_parent_node.htm');returnfalse;">parentnodeonwhichitdepends.Thetimedifferenceissomethingthatyoucansetforthelink.Anetthatcontainstime-delaylinksisnotanormalBayesnet,butrather
ameta-levelrepresentation,butitcanbeexpandedtoproduceanormalBayesnet.Timedelaylinkscanbeusedtomodelfeedback.MoreInfoToggled:Amenuitemthatcanbetoggledislikeaswitchthatcanbeturnedonandoff.Whenyouchooseit,acheckmarkwillappearbesideit,indicatingitison.Choosingitagainwillremovethecheckmark,indicatingitisoff.Triangulated:An=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_network.htm');returnfalse;">undirectednetworkistriangulatedifeveryloopoflength4ormorehasachord,i.e.alinkjoiningtwononconsecutivenodes.Triangulatinganetistheprocessofaddinglinksuntilitistriangulated(whichmaybedoneindifferentways,dependingonwherethelinksareadded).Theresultingnetiscomposedonlyoftriangles(eachsidebeingalink)fusedtogetheralongtheirsides.Undirectedloop:Anundirectedloop(sometimesjustcalleda“loop”)isa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_path.htm');returnfalse;">paththroughanet,notnecessarilyfollowingthedirectionofthearrows,whichreturnstoitsbeginning(i.e.thefirstnodeofthepathisthesameasthelast).Comparewith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_cycle.htm');returnfalse;">directedcycle.Undirectednetwork:Anundirectednetworkisonewherethelinkshavenodirection(i.e.noarrows).A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Markov_network.htm');returnfalse;">Markovnetworkisanexample.Comparewitha=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_directed_network.htm');returnfalse;">directed
network.Unicode:Unicodeisatextcharactersetthatwasdesignedwiththegoalofbeingabletorepresentallthecharactersofalltheworld'slanguages.Itisbyfarthedominantinternationalcharacterset,andwasdevelopedbyaconsortiumwithmostofthelargestcomputercompaniesasmembers.Thefirstversionwasreleasedin1991,andabouteveryyearanewversionisreleasedhavingmorecharacters.Itnormallyrepresentseachcharacterwith2bytes,althoughthereareanumberofcomplexitiesandalternateencodings.NeticaallowssomeaspectsofBayesnetstoberepresentedinUnicode,whileothersarerequiredtobein=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_ASCII.htm');returnfalse;">ASCII.Userreports:aNeticamechanismwhichdisplayscustomizedinformationpertainingtoanode,groupofnodes,ortoanentirenet.Theuserreportcouldbeassimpleasatextmessagegivingamoredetaileddescriptionofwhatanodemeans.Oritcouldbemorecomplex,suchasthecurrentbeliefprobabilitiesofthenodes,orasensitivityanalysisofthenet.UserreportscanalsobegeneratedthroughtheHEDsystem.Utilitynode:Autilitynode(alsoknownasa“valuenode”)isanodeina=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetwhose=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_expected_value.htm');returnfalse;">expectedvalueistobemaximizedwhilesearchingforthebest=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_rule.htm');returnfalse;">decisionruleforeachofthedecisionnodes.Itisusuallydrawnasaflattenedhexagonoradiamond.Weaklink:Theabsenceofalinkalwaysindicatessome=4&&
typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_info_indep.htm');returnfalse;">independence,butevenifalinkispresenttheremaynearlybeindependenceifthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_node_relation.htm');returnfalse;">relationshipthatthechildnodehaswithitsparentsindicatesthat.Thenitiscalledaweaklink.Removingaweaklinkhaslittleeffectonthefulljointprobabilitydistribution,andthereforelittleeffectoninferenceresults.Whitespace:Whitespaceistextwhichiscomposedsolelyofspaces,tabs,newlines,carriagereturnsorotherasciicontrolcharacters.
EncyclopediaAxiomsofProbabilityTheory
BayesTheorem
CartesianProduct
ConditionalProbability
Connectivity
d-separation
Discretevs.Continuous
FundamentalTheoremsofProbability
GameTheory
JunctionTree
Link
MarkovNetwork
MessagesWindow
Node
Password
ProbabilisticInferencebyNodeAbsorption
StandardDeviation
AxiomsofProbabilityTheoryHereisasetofaxiomsforprobabilitytheoryequivalenttothosederivedbyCox(andalsocompatiblewithotheraxiomatizationsofprobability,suchastheKolmogorovaxioms):
whereP(x,y|z)meanstheprobabilitythatpropositionsxandyarebothtrue,giventhatpropositionzistrue.
BayesTheoremForanytwopropositions,AandB,P(B|A)=P(A|B)xp(B)/p(A),whereyouread'PP(A)'as"theprobabilityofA",and'P(A|B)'as"theprobabilityofAgiventhatBhasoccurred".
Asshown,Bayesrulefollowsdirectlyfromthedefinitionofconditionalprobability.Thistheoremisawaytotranslatebetweentheprobabilityofcauses,giveneffectsandtheprobabilityofeffectsgivencauses.
CartesianProductThecartesianproductoftwosetsisthesetofallpossiblepairsofelements,wherethefirstelementofeachpairistakenfromthefirstset,andthesecondelementistakenfromthesecondset.Forexample,thecartesianproductof{low,medium,high}with{true,false}is{(low,true),(low,false),(medium,true),(medium,false),(high,true),(high,false)}
Thecartesianproductisdenotedusing‘x’.Itmaybeextendedtomorethantwosets,asshowninthissecondexample:
{s1,s2}x{s,h}x{wtg,mhc}={(s1,s,wtg),(s1,s,mhc),(s1,h,wtg),(s1,h,mhc),(s2,s,wtg),(s2,s,mhc),(s2,h,wtg),(s2,h,mhc)}
Thenumberofelementsinthecartesianproductisthemultiplicativeproductofthesizesofthesetsinvolved.Inthefirstexampleitis3*2=6,andinthesecondexampleitis2*2*2=8.
SomepeoplespellitwithacapitalC(“Cartesianproduct”),sinceitisnamedafterDescartes.
ConditionalProbabilityTheprobabilitythatsomespecifiedvariables(calledthehypothesisvariables)takespecifiedvalues,giventhatsomeotherspecifiedvariables(calledthegivenvariables)havespecifiedvalues.Theremaybeanynumberofgivenvariables,includingnone(inwhichcaseitsalsocalledapriorprobability).Ifthevaluesofthegivenvariablesareinconsistent(i.e.theirprobabilityofoccurringtogetheris0),thentheconditionalprobabilityisundefined.
ConnectivityThe“connectivity”ofanetreferstoanet’s=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructure.Highconnectivitymeansthattherearealotoflinks.
Youcanusethelinkstructureofanettodetermineindependencebetweennodes,byusingthed-separationalgorithm.
AMultiply-Connectednetisanetwhichhasmorethanone=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_path.htm');returnfalse;">undirectedpathbetweensomepairsofnodes.Inotherwords,ithas=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_loop.htm');returnfalse;">loops.
ASingly-Connectednetisanetthathasatmostonepathbetweenanytwonodes.Inotherwords,ithasnoloops.Ifthelinkdirectionsareignored,itisalwayspossibletoconsideritasatree.Ifthelinkdirectionsarenotignored,thensomepeoplecallita“polytree”(becauseitcanbeconsideredtobeseveraldirectedtrees,witharrowsfromroottoleaves,fusedtogetheratleafnodes).
ThetimeittakesforNeticatodo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdatingisverydependentontheconnectivityofthenet.Addingalinkalwaysresultsinlongerupdatingtimes,butwherethatlinkisaddedcanmakeabigdifference.Ifanodehasmanyparents,thenits=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditional_probability.htm');returnfalse;">conditionalprobabilitytablewillbeverylarge,whichresultsinsloweroverallupdatingtimes.Thenumberofloopsanethasisalsoverysignificant.Ifanethasnoloops,thenNeticacandoupdatingextremelyfast,andeach
addedloopwillincreasetheupdatingtime.
Neticaimplementsanumberofgraphalgorithmstomakevariousconnectivityresultsavailabletoyou,suchasfindingallparents,children,ancestors,descendents,connected,d-separated,Markovboundary,interconnectinglinks,cycles,etc.MoreInfo
d-separationThed-separationruleenablesyoutoquicklydeterminewhethera=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingatonenodecanpossiblychangethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief.htm');returnfalse;">beliefsatanotherbyonlylookingatthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructureofaBayesnet.
Neticausesd-separationinternally,andcanalsofindanddisplayd-separatednodes.
Discretevs.ContinuousAdiscretevariableisonewithawelldefinedfinitesetofpossiblevalues,called=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_state.htm');returnfalse;">states.Examplesare:thenumberofdimesinapurse,astatementwhichiseither“true”or“false”,whichpartywillwintheelection,thecountryoforigin,voltageoutputofadigitaldevice,andtheplacearoulettewheelstops.
Acontinuousvariableisonewhichcantakeonavaluebetweenanyothertwovalues,suchas:indoortemperature,timespentwaiting,waterconsumed,colorwavelength,anddirectionoftravel.Adiscretevariablecorrespondstoadigitalquantity,whileacontinuousvariablecorrespondstoananalogquantity.
WithNeticayoucanchoosewhetheryouwantanodetorepresentadiscreteorcontinuousvariable.
Oftenavariablewillbecontinuousatonescale,butdiscreteonanother.Forinstancetheamountofwaterconsumedmightbediscreteifyoucountindividualwatermolecules,butitiscontinuousatthescaleyouareconcernedwith.Likewise,thevoltageoutputofadigitaldevicemightbediscreteatthescaleyouareconcernedwith(“high”&“low”),butcontinuousonafinerscale(0.7-3.5V),andthendiscreteonaveryfinescale(correspondingtothenumberofelectronsonacapacitor).Youonlyneedconsiderthescaleofinterestwhensettingwhetheranodeiscontinuousordiscrete.
Sometimesyouwantacontinuousvariabletobehavelikeadiscreteone.Todothis,youbreakupthetotalrangeofthecontinuousvariableintoanumberofintervalsbysupplyingnumbersshowingwhereoneintervalendsandthenextbegins.Thisisknownasdiscretizingthevariable,andthenumbersarecalledthresholds.Eachintervalcorrespondstoonestateofthediscreteversionofthevariable.Adiscretizedvariableissometimesknownasanintervalvariable,sinceitsdomainiscomposedofintervals.InNetica,asinglenoderepresentsboththecontinuousanddiscreteversionsofthevariable,andNeticawillconvertavalueofthecontinuousvariableintoadiscretestatewhenappropriate.Neticaallowsyoutodiscretizeanycontinuousnode,bychoosingModify→DiscretizeNodes.(Ifthevariableis=4&&typeof(BSPSPopupOnMouseOver)=='function')
BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_discrete.htm');returnfalse;">discretethenthemenuwon'thavea"Discretization"choice).
Conversely,adiscretenodemayhavenumericquantitiesattachedtoeachstate,sothateachstatecanrepresentanumber,butthevariableisincapableofrepresentingnumbersbetweenthoseofeachstate(moreinfo).
SeeAlso:NodeDiscretization-Multi-PurposeBox
SeeAlso:NodeStateInterval
FundamentalTheoremsofProbability
BayesTheorem:
Reasoningbycasestheorem:
Independencetheorem:
Whereindependenceisdefinedas:
Ineachoftheabovetheorems,alltheprobabilitiesareconditionedontheproposition.Sinceitcouldbeequivalenttoanylogicalformula,theyallholdwithcreplacedbyanyvectoroftruthvalues,c.
GameTheoryGametheoryusuallyattemptstodeterminewhatwillhappenwhentwoormoreagentscooperate/competeintryingtomaximizetheirownexpectedutility.
Decisiontheoryprescribeshowoneagentshouldbestmakedecisionstomaximizehisexpectedutility,givenhisbeliefsabouttheenvironmentandhowotheragentswillact.
Ifyouspecifythebehavior(asaprobabilisticpolicy)oftheotherplayersinvolvedinagame,thenyoucanusedecisiontheorytodeterminehowoneplayershouldbestact.Butitwon’tdeterminethepoliciesforallplayerssimultaneouslylikegametheorysometimeswill.CurrentlyNeticaonlysolvesdecisiontheoryproblems.Itcanstillbeavaluabletoolforinvestigatinggametheoryproblems,butonlyfromoneplayer'spointofview(ratherthanaglobalpointofview).
IfyouwanttouseNeticatoformulateagame,thenmakeadecisionnodeforasingleplayeranda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenodeforeachoftheotherplayers.Usethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_table_dialog_box.htm');returnfalse;">tabledialogboxtoenterapolicyforeachoftheotherplayers.Therewillbe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link.htm');returnfalse;">linksbetweenthesenodesonlyifsomeplayerswillknowwhatsomeotherplayersactionsarebeforemakingtheirowndecision.
Thenadda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynode,withlinksfromeachoftheothernodestoit.Youcanfilltheutilitynodetablequiteeasilyfromthegametheorypayoffmatrix(itwillhaveonerowforeachcellofthematrix)bykeepinginmindthatyouareonlyenteringthepayofffor
thesingleplayeryouareanalyzing.Supposedlytheotherpayoffswereusedtodeterminethepoliciesfortheotherplayers,perhapsusinganotherdecisionnet.
Youmayfindthatyouwanttoiteratesolutions,sincedevelopingeachplayer'sdecisionnetdependsonthepoliciesofotherplayers,whichyoudon'tknowuntilyouhavesolvedtheirdecisionnets,whichrequirethepolicy(solution)ofthefirstnet.Youmayfind=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Netica_API.htm');returnfalse;">NeticaAPIusefultowriteaprogramforsuchiterations(ortoexplorehowstrategiesandpoliciesofapopulationevolveovertime).
JunctionTreeAlsoknownasa“jointree”.
AjunctiontreeistheinternalstructurethatNeticausesfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating.Neticacompilesa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bayes_net.htm');returnfalse;">Bayesnetor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnetintoajunctiontreeforefficiency.
ThejunctiontreeTof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_triangulated.htm');returnfalse;">triangulatednetGisatreewiththe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_clique.htm');returnfalse;">cliquesofGasnodes,suchthatforeverynodeNofG,ifweremovefromTallcliquesnotcontainingN,theremainingsubtreeremainsconnected.Inotherwords,anytwocliquescontainingNareeitheradjacentinTorconnectedbyapathmadeentirelyofcliquesthatcontainN.
YoucanexaminethejunctiontreethatNeticacreatesforaBayesnetbymakingatextreportusingReport→JunctionTreeaftercompiling.
LinkThelinksofaBayesnetindicatewhichnodes(i.e.variables)aredirectlydependentonothers.Moreaccurately,theyindicatewhichnodesare=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_conditionally_independent.htm');returnfalse;">independentofwhichothers.Ifthereisnolinkfromonenodetoanother,thentheircorrespondingvariablesareconditionallyindependentgivenvaluesfortheirparents.Usingthed-separationrule,youcandeterminewhichnodeseffectwhichothersduringprobabilisticinference,basedonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_link_structure.htm');returnfalse;">linkstructurelinkofthenet.
Alinkbetweentwonodesisindicatedasalinebetweenthemwithanarrowatoneend,thereareseveralwaystoaddlinksbetweennodes.
Alinkintoadecisionnodeisknownasan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_informational_link.htm');returnfalse;">informationallink,andindicatesthatthedecisionmakerwillknowthevaluesoftheparentnodeswhenadecisionmustbemade.
Somepeoplerefertolinksas“arcs”or“edges”.
MarkovNetworkAMarkovnetworkisan=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_undirected_network.htm');returnfalse;">undirectednetinwhichthenodesrepresentvariablesofinterestandtheconnectionsbetweenthemrepresentprobabilisticdependence.NeticaconvertsaBayesnetintoaMarkovnetworkasanintermediatestepinproducinga=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontree.
MessageswindowWhenyoufirststartNetica,inthelowerleftcorneroftheworkspacewhichopenstherewillbeaniconforaminimizedwindowcalled“NeticaMessages”.YoucandoubleclickittoviewitscontentsoryoucanchooseWindow→Messages.Toreturnittoitsminimizedstateclickonthe buttoninitstitlebar.
Note:ifyouareusingNeticaonaMac,theMessageswindowmayappearaseitherablankwhitesquareinthebottomleftoftheNeticawindow,orasjustawordintheupperleftofthescreen.SimplyclickonthesquareorwordtolaunchtheMessageswindow.
Neticareportstextualinformationtoyouthroughthiswindow.IfyoudoReport→Network,thenthereportwillbeplacedintheMessageswindow,andaftercompilinganet,informationonthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_junction_tree.htm');returnfalse;">junctiontreewillbeintheMessageswindow.ProgressduringlengthyoperationsissometimesdisplayedintheMessageswindow,althoughithastobevisiblebeforetheoperationisstarted.
UsuallywhenyoutrytodoanoperationthatNeticacan’tperform,itwilldisplayadialogboxtellingyou.However,forsomeminoroperations,likeclickinginthewrongplace,Neticawilljustbeep.Inthatcase,youcanlookintheNeticaMessageswindowandtherewillbeanexplanation.
YoucancopyandpasteinformationbetweentheMessageswindowandanytextfile.Inaddition,allinformationgoingtothemessageswindowcanalsobesenttoatextfilebychoosingFile→LogMessages.
NodeTherearethreekindofnodesindicatingwhatourintentionisforavariable:=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_nature_node.htm');returnfalse;">naturenodes,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_node.htm');returnfalse;">decisionnodes,and=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_utility_node.htm');returnfalse;">utilitynodes.Anaturenodeissometimescalleda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_chance_node.htm');returnfalse;">chancenodewhenitsrelationshipwithitsparentsisprobabilistic,anda=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_deterministic_node.htm');returnfalse;">deterministicnodewhenitisn’t.Naturenodesmayalsobecalled=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_query_node.htm');returnfalse;">targetnodesifweareinterestedintheirbeliefsafterbeliefupdating,or=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_findings_node.htm');returnfalse;">findingsnodesifwehave,orwillhave,afindingforthem.
PasswordThepasswordyouwereissuedafterpurchasingaNeticaproductcontains5components:yourname,organization,productnumber,versionnumberandasecuritynumber,inthefollowingform:
+Name/Organization/Product-Version-License/Security
TheproductwillbeeitherNeticaApplication(120),NeticaAPI(310),orboth(120,310).Theversionnumberwillbeaninteger,andyourlicensewillbeoneormoreof:commercial(noentry),academic(A),site(S),etc.
HerearesomesampleNeticalicensepasswords:
+MyName/ABCCorp/120,310-2/12345
^theversionnumberis2.
+MyName/DEFUniv/120-1-AS/54321
^theversionnumberis1.
Youwillneedtoenterapasswordaspartoftheinstallationprocess.
StandardDeviationThevarianceofavariableXwithprobabilitydistributionp(x)isgivenby:
where isthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_mean_value.htm');returnfalse;">meanvalue.Thevarianceofaprobabilitydistributionisn’texactlythesameas“samplevariance”,whichisthevarianceofasetofmeasurements.Thestandarddeviationisthesquarerootofthevariance.ItsunitsarethesameasthoseofX,anditisameasureofhow“spreadout”or“imprecise”thedistributionis.Foranydistribution,themean(i.e.,theexpectedvalue)andthemediancanneverdifferfromeachotherbymorethanonestandarddeviation.Fora=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_normal_distribution.htm');returnfalse;">normaldistribution,31.8%oftheprobabilityisoutsideof1standarddeviationfromthemean,4.6%isoutsideof2standarddeviations,and0.26%isoutsideof3standarddeviations.Foranydistribution,lessthan1/(k^2)oftheprobabilityisoutsideofkstandarddeviations(Chebyshev’stheorem).
NeticaAPITheNeticaAPIisacompletelibraryoffunctionsforworkingwithBayesnetsandinfluencediagramsthatyoucancallfromyourownprogram.Itcontainsfunctionstobuild,learn,modify,transform,saveandreadnets,aswellasapowerfulinferenceengine.ThereareversionsofNeticaAPIavailableformanydifferentprogramminglanguages,suchasJava,C,C++,C#,VisualBasic,etc.FormoreinformationontheCOMversionofNeticaAPI(mostlyforC#andVisualBasic),seeNeticaCOMInterface,andforotherversionsseewww.norsys.com/netica_api.html
AnexcitingnewadditiontoNeticaAPIallowsittotakeadvantageoftheNeticaApplicationuserinterfacefordisplayingnets,enteringfindings,showingbeliefs,etc.MoreInfo.
ProgramsthatusetheNeticaAPIcompletelycontrolit.Forexample,Neticafunctionswillnottakeanyactionuntilcalled,NeticawillnotdoanyI/Ounlessrequestedto,anditsfunctionswillnottakeanunpredictableamountoftimebeforereturning.
ItmaybeusedinconjunctionwithotherCorC++libraries(anditwon'tinterferewiththem),butitdoesn'trequireanyotherlibraryexcepttheStandardClibrary.VersionsoftheNeticaAPIareavailableforMSWindows,Linux,SunSparc,SiliconGraphics,MacintoshandDOS,andeachofthesehasanidenticalinterface,soyoucanmoveyourcodebetweentheseplatformswithoutchanginganythingtodowiththeNeticaAPI.
BeforereleasinganynewversionofNeticaAPI,itisputthrougharigoroustestingprogramtomakesureitoperatesasdesigned.Everyfunctionisexercisedinmultipleways,anditsbehaviorcarefullychecked.Thousandsofrandomnetsaregeneratedandsolvedinmultiplewaystochecktheinferenceresults,andhundredsofrealnetsaretested.MemCheck™andPurify™areusedtomakesuretherearenomemoryleaksorothermemoryfaults.Incombinationwithacarefulinitialdesign,andbasesoftwarehavingtenyearsofextensivecustomerusage,thisresultsinarocksolidproduct.
TheNeticaAPIhasbeendesignedtobeeasilyextendedinthefuturewithoutchangingwhatalreadyexists.Manynewfeaturesarecurrentlyunderdevelopment,anditwillcontinuetobeextendedforyearstocome.
Features:•DynamicConstruction:Canbuildandmodifynets"onthefly"inmemory(tosupportworkingwithdynamicBayesnets),andcansave/readthemtofile.
•Equations:Probabilitytablesmaybeconvenientlyexpressedbyequations,usingaJava/Ctypesyntaxandtakingadvantageofanextensivelibraryofbuilt-infunctions,includingallthestandardmathfunctionsandcommonprobabilitydistributions,aswellassomefunctionsanddistributionsspeciallysuitedtoBayesnets,suchasnoisy-or,noisy-max,noisy-sum,etc.
•LearningfromData:Probabilitytablescanbelearnedfromcasedata,evenwhilethenetisbeingusedforprobabilisticinference.Learningfromdatacanbecombinedwithmanualconstructionoftablesandrepresentationbyequations.Itcanhandlemissingdataandlatentvariablesorhiddennodes.Learningalgorithmsinclude:counting,sequentialupdating,fractionalupdating,EM(expectationmaximization),andgradientdescent.
•DatabaseConnectivity:Allowsdirectconnectiontomostdatabasesoftware.
•Threadsafe:Canbeusedsafelyinmulti-threadedenvironments.•Encryption:Cansaveandreadnetstofileinencryptedform,whichallowsdeployingsolutionsrelyingonBayesnetskeptprivatetoanorganization.
•Sensitivity:Neticacanefficientlymeasurethedegreetowhichfindingsatanynodecaninfluencethebeliefsatanothernode,giventhefindingscurrentlyentered.Themeasurescanbeintheformofmutualinformation(entropyreduction),ortheexpectedreductionofrealvariance.
•AdvancedDecisionNets:Cansolveinfluencediagramswhichhavemultipleutilityanddecisionnodestofindoptimaldecisionsandconditionalplans,usingajunctiontreealgorithmforspeed.Handlesmulti-stagedecisionproblems,wherelaterdecisionsdependontheoutcomesofearlierones,andonobservationsnotinitiallyknown.No-forgettinglinksneednotbeexplicitlyspecified.
•JunctionTreeAlgorithm:CancompileBayesnetsandinfluencediagramsintoajunctiontreeofcliquesforfastprobabilisticinference.AneliminationordercanbespecifiedorNeticacandetermineoneautomatically,andNeticacanreportontheresultingjunctiontree.
•SoftEvidence:Acceptslikelihoodfindings(i.e.,“virtualevidence”),and
findingsoftheformthatsomevariableisnotissomestate.•LinkReversal:Canreversespecifiedlinksor"sumout"(absorb)nodesofaBayesnetorinfluencediagramwhilemaintainingthesameoveralljointprobabilitydistribution,properlyaccountingforanyfindingsintheremovednodesorothernodes.
•DisconnectedLinks:Linksmaybeindividuallynamedanddisconnectedfromparentorchildnodes,thusmakingpossiblelibrariesofnetfragments,whichyoumaythencopyandconnecttoothernetsornodeconfigurations.
•CaseSupport:Cansaveindividualcases(i.e.setsoffindings)tofile,andmanipulatefilesofcases.Casesmaybeincomplete,andmayhaveanassociatedIDnumberandmultiplicity.
•Simulation:Candosampling(i.e.simulation)togeneraterandomcaseswithaprobabilitydistributionmatchingtheBayesnet.Canuseajunctiontreealgorithmforspeed,ordirectsamplingfornetstoolargetogenerateCPTsorajunctiontree.
•UserData:Everynodeandnetcanstorebynamearbitrarydatafieldsdefinedbyyou.Thesearesavedtofilewhentheobjectinquestionisbeingsaved.Aswell,therearefieldsnotsavedtofile,whichcancontainapointertoanythingyouwish.
•ErrorHandling:Hasasimplebutpowerfulmethodforhandlingusageerrors,whichcangenerateverydetailederrormessagesifdesired.Itwon’tthrowexceptions(C++versiondoes).
•ArgumentChecking:AllowsprogrammerstocontrolhowcarefullyAPIfunctionschecktheirargumentswhentheyarecalled,includinga"developmentmode"toextensivelycheckeverythingpassedtoanAPIfunction.
•Compatibility:Canworkhand-in-handwithNeticaApplicationstandaloneproduct(forexample,sharingthesamefiles),andwithNeticaAPIversionsforotherlanguages.
•Efficient:Isoptimizedforspeed,andisnottoolarge(about500KBto3MBdependingonplatform/usage,1MBtypical)
•LanguageInterface:Usablebyprogramswritteninmanylanguages,suchas:C,C++,Java,Python,Perl,VisualBasic,DelphiPascal,Lisp,CLisp,Fortran,Cobol,andMatlab.
•ManyPlatforms:IsavailableforawiderangeofplatformsincludingMS
Windows(95/NTtoXP),Linux,Macintosh(OSXandClassic),SunSparc,SiliconGraphicsandDOSamongothers.
•MemoryLimiting:YoucansetaboundonhowmuchtotalheapspaceNeticaAPIisallowedtoallocateforlargetables,therebypreventingvirtualmemorythrashingorthememory-starvingofotherpartsofyourapplication.
•MoreFeatures:Amoreextensivelistoffeaturesisavailablefrom:http://www.norsys.com/netica_api.htmlandforthosefeaturesspecifictotheCversion:http://www.norsys.com/netica_c_api.htm
LegalitiesBeforeinstallingorusingNetica,besurethatyouaccepttheLicenseAgreement,whichisprovidedwiththesoftwareonaseparatedocument(entitledLicenseAgreement.pdf).
Thisentiredocument(consistingofallscreensinNetica'shelpfile)is:
Copyright©1996-2011byNorsysSoftwareCorp.
Thisfilemaybecopiedandstoredfreely,provideditisduplicatedinitsentirety,withoutmodification,andincludingthecopyrightnotice.
NorsysSoftwareCorp.3512West23rdAve.Vancouver,BC,CanadaV6S1K5www.norsys.com
Whileeveryprecautionhasbeentakeninthepreparationofthisdocument,weassumenoresponsibilityforerrorsoromissions.Neitherisanyliabilityassumedfordamagesresultingfromtheuseoftheinformationcontainedherein.
NeticaandNorsysareregisteredtrademarksofNorsysSoftwareCorp.
MicrosoftandWindowsareregisteredtrademarksofMicrosoft,Inc.
iOSisatrademarklicensedtoAppleComputer,Inc.andMacintoshandMacOSareregisteredtrademarkofAppleComputer,Inc.
UNIXisaregisteredtrademarkofTheOpenGroup.
LinuxisaregisteredtrademarkofLinusTorvalds.
UnicodeisatrademarkofUnicode,Inc.
Intelisaregisteredtrademark,andPentiumisatrademarkofIntelCorporation.
Otherbrandsandproductnamesaretrademarksoftheirrespectiveholders.
NeticaApplicationHelpTofindoutmoreaboutanyofthesubjectsbelow,clickonitandthenusetheNext/Previousbuttonsinthenavigationpaneabovetoreadsubsequentpages.Foratableofcontents,index,orfulltextsearchclickontheappropriatebuttonabove.
•GettingStarted•QuickTour•UsingBayesNets•CreatingBayesNetsandDecisionNets•ChangingNodeProperties•Changing/ViewingNodeTables•CasesandCaseFiles•LearningFromCases•TestNetwithCases•Sensitivity•Decision-MakingNets•DisplayStyleandPrinting•EquationstoGenerateTables•ReportsandDataLinking•CustomReports•Node-SetsandColoring•DynamicBayesNets•NetFragmentLibraries•TransformingaNet•ProcessCases•COMInterface–ProgrammingNetica•Bibliography•Netica-Web
InstallingNeticaonyourMac1.DownloadthetrialversionofCrossoverMac,andsaveittoyourharddrive.
HavingtroublefindingyourMacharddrive?SeeNavigatingFoldersbelow.2.AddtheCrossovericontoyourApplicationdirectory.IntheApplicationsdirectory,chooseNewFolderandnameit"Crossover".ThisiswhereyouwillsaveallWindows-basedprogramsmovingforward.3.DownloadtheNeticasoftwareapplication.YoumayobtainitbydownloadingfromtheNorsyswebsite,orotherwisefromNorsys.Double-clickthefileiconandextractittotheCrossoverfolderthatyoucreatedinStep2above.4.Double-clickontheNeticaicon ofNetica.exeinthedirectoryyouindicatedabove.5.Thereareafewminorbugswithright-clickingandonscreenhelp,formoreinformationseetheMacFAQpage.NavigatingFoldersinCrossoverMacDuetothenatureofrunningtwooperatingsystemsonyourmachine,thereareanumberofdrivesandfolderstonavigate,including(Z:),(Y:),(C:),(Desktop)and(MyComputer).Thus,itcanbeconfusingtonavigatethroughthefolderswhenyoufirstinstall,saveoropenNeticafilesonyourMac.HereisabreakdownofthevariousdrivesandfoldersunderCrossoverMac:1.Desktop:ThisisaWindowsreference.ThisisNOTyourMacdesktop.
Thereshouldbeaseparatefolderinthatsamelistofdirectoriescalled"MyMacDesktop".YouneedtoinstallNeticaonyourMacthroughthe(Z:)drive.Choose‘MyMacDesktop’ifyouwanttoaccessnon-applicationfilesonyourMac.2.MyComputer:Ifyouopen‘MyComputer’,youwillfind3drives:drive_c(C:)
/Users/yourcomputername(Y:)
/(Z:)–thisalsoshowsupasaniconofaharddrivewithablank(/)Drive_c:IfyouareusedtoworkingonaPC,theusualwaytosaveafileistheCdrive.ThisisnotthecasewhenyouareworkingwithCrossoverMac.TheCdrivehasafoldernamed"ProgramFiles".Donotbefooled,thesearenottheProgramFilesofyourMac!(Y:)takesyoudirectlytothemainaccountdirectoryofyourMac,whereyouwillseeafolderforyourDesktop,Downloads,Documents,etc./(Z:)isbasicallytheequivalenttothec:driveinWindows.ThepathtoyourMacApplicationsis:Z/Applications/CrossoverSaveNeticainthetopdirectoryoftheCrossoverfolder.Remember:YoucansaveyourBNfilesanywhereonyourMac.IfyouaretryingtoopenaBNfilefromsomewhereonyourMac,thepathtoyourDesktopis:Z/Users/YourUserName/Desktop.Orfrom“MyMacDesktop”.
Un-InstallingCrossover1.DropyourCrossOverbundleintothetrashandemptyit.ThismayfirstrequireyoutostoptheCrossOverCDHelper.Tostopitmanually,runtheActivityMonitor(usuallyfoundinyourApplications/Utilitiesfolder).SelectCrossOverCDHelperinActivityMonitorandclickQuitProcesstostopit.2.User-specificCrossOverfilesarelocatedinyourhomefolder,underthe:Library/ApplicationSupport/CrossOverhierarchy.TrashthatfolderanditscontentsforeachuserofCrossOveronyoursystem.3.Then,tobetrulycomprehensive,removethepreferencesfileslocatedin:Library/Preferences/calledcom.codeweavers.CrossOver.plist.4.IfyouhaveanypublishedbottlesorCrossOverhasbeenrunusingyoursystem'sadministratoraccount,youmayhavefilesin/Library/ApplicationSupport/CrossOveronyourstartupdrive.Thesemayalsobedeleted.
BuildingTablesfromOtherNetsTherearemanywaysthatNeticacanlearntheCPTsofnodes.Itlearnfromcasedata,learnfromacasefile,learnfromanExcelfileorlearnfromothernets(calledsourcenets).Inthelattercase,youwouldbebuildingadestinationnetthatrepresentsthesameworldasasourcenet.Inotherwords,NeticawilllearntheCPTtablesofasub-netwithinasourcenet.Alltheinferenceresultswillbethesameinbothnets.Thedifferenceisthatitisusingadifferentrepresentation,sothelinkstructurecanbedifferent.Inparticular,nodesthathavelinksinonenet,maynothavelinksintheotherandthelinkdirectionsmightbedifferent.
Howto:openanexistingnet,orcreateanewone.Ifitisanewnet,youmaywanttocopyandpastenodesfromthesourcenetintothedestinationnettoensurethenodeandstatenamesarethesame.Youcanthenselectasinglenode,ornonodes(inwhichcaseallnodeswillbelearned).NextchooseTable→BuildFromOtherNet.Neticawillautomaticallylearnthesub-setofCPTsfromthesourcenet.
Notes:
Nodesinthedestinationnetmusthavethesamenameandsamestatenamesasthesourcenet,buttheycanhavedifferenttitles.Youmaywanttocopy&pastenodesbetweennets(anddeletetheresultantinputlinks)toachievethis.
Neticacan'tlearnCPTsfromthesourcenetifthereisaparentnodeinthedestinationnetthatisnotinthesourcenet.Toresolvethis,firstlearnthetablesfromthesourcenet,thenaddthenewparent(s)tothedestinationnet.Thisisnottrueforchildrennodes.
Inbothcases,Neticawilllearnasmanyofthenodesaspossible.
Applications:whenyouarelearninganetfromdata,thelinkstructureusedcansignificantlyaffectthequalityoflearning.Forexample,ifyouhaveatargetnode,NeticacandetermineaveryeffectiveTANstructure.However,tocombinewithothersub-nets,youmaywantadifferentlinkstructure.
So,youcancreateanetwiththelinkstructureyouwantandthenbuildit's
CPTsusingthelearnednetasthesourcenet.
Noisy-OrDistribution (DMprob.dist.forequations)
Usage: NoisyOrDist(e,leak,b1,p1,...bn,pn)
Definition: P(e)=1–[(1-leak)producti=1ton(bi?(1-pi):1)]
Required: 0 leak 1e,biBoolean0 pi 1
Usethisdistributionwhenthereareseveralpossiblecausesforanevent,anyofwhichcancausetheeventbyitself,butonlywithacertainprobability.Also,theeventcanoccurspontaneously(withoutanyoftheknowncausesbeingtrue),withprobabilityleak(makethiszeroifitcan’toccurspontaneously).
Eachbiisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleanvariable,whichmaycausetheeventwhenitsTRUE.eisalsoaboolean,whichindicateswhethertheeventoccurs.EachofthepiaretheprobabilitythatewilloccurifbiisTRUEinisolation.
Ifleakiszero,andonlyonepossiblecauseisTRUE,saybk,thentheprobabilityforeispk.IfmorepossiblecausesareTRUE,P(e)willbegreater.Andifleakisnonzero,P(e)willbegreater.ReducingapialwaysresultsinthesameorlowerP(e).
picanbeconsideredthe“strength”oftherelationbetweeneandbi,withzeroindicatingindependence(linkcouldberemoved),and1indicatingmaximumeffect.
SeePearl88,page184formoreinformation(hisqi=1–pi).
Example: P(Effect|Cause1,Cause2)=
NoisyOrDist(Effect,0.1,Cause1,0.2,Cause2,0.4)
AnotherExample
SeealsoNoisyAndDist,NoisyMaxDist(fornodeswithmorethanjust2
states),NoisySumDist.
OtherSmallerImprovementsInadditiontoitsmajornewfeatures,Neticahasthefollowingimprovements.
Fromversion5.00toversion5.03
•Whenprintinganet,youcanenterthenumberofpagesyouwantittoappearon,insteadofjustthemagnification.Defaultis1.Butifyouwanttoenteramagnification,justmakethoseentriesblank.
•Keepstrackofstartingexperienceusedforlearning(normally1foreachstate).SavesinNETAfileforeachnode,andadjustswhendoingtablehardeningorsoftening.
•Fixed:WhenselectmultiplenodesanddoSensitivitytoFindings,gavea#2516error.
•Fixed:Sometimesconstantnodesweren'tregisteredtobeavailabletoequationsuntilaftersavingtofileandre-reading.
•WhileEMlearningfromacasefilehavingacaseinconsistentwiththeBayesnet,nowputstheIDnumofthecaseintheerrormessage,andallowshaltingorcontinuingwithoutit.
•Equationsnowrecognizediscreteconstantnodeswithastatesetting.•Namesofbuilt-innode-setsarenowprecededbycolon(:)insteadofdash(-)
•Fixed:Process-casesdidn'tworkwhentherewasafindingenteredinthenet(gavea2592C0000005error).
Fromversion4.00toversion4.16
•GreatlyimprovedtheCPTableeditor,bothcosmeticallyandfunctionally.•Texteditor:Handleslargertextfiles(upto2GB)fortextediting,insteadofjust30K.HelpsavoidMessagesWindowoverflow.Textentryindialogboxes(suchasuserfields)canalsotakelargertextamounts.
•Disconnecting/connectinglinksnowworksbetter.Thetoolbuttoncanreconnectaswellasdisconnect.Whenright-clickonadisconnectedlink,menunowhas"Reconnect",whichreconnectslinktooriginalnode(evenacrossfilesave/read).
•Cannowread.xlsxand.accdbdatabasecasefiles(aswellastheold.xlsand.mdb).
•Whenreadingacasefile,missingdatasymbols(empty,'',?,*,N/A)willnowinsteadbeinterpretedasastate,ifthenodehasastatewithanexactlymatchingstatetitle.
•Newonscreenhelpsystem.•Within.dnefiles,itnowusesasuperiorflatformatfortables(whichmeanstheBayesnetfilesitcreatescannotbecompletelyreadbyveryoldversionsofNetica(previousto2.27of2003-05-02)).But,ofcourse,newversionsofNeticacanstillreadalltheold.dnefiles,createdbyanypreviousversionofNetica.
•Fixed:WhenreadingUVFfiles,uncertainfindingsforstateswithan_intheirnamecausederror#2878.
•Fixed:WhenreadingUVFfiles,extraspacescouldcauseerrors.•Fixed:WhenleftandrightmousebuttonsinWindowswereconfiguredasleft-handed,Neticacouldn'tselectnodes.
•Fixed:ReadingHuginfilesdidn'tworkaswellasearlierversionsofNetica.•CannowreadXMLBIF0.3files,asdescribedin1998FabioCozmandocument:http://www.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/
•Mousewheelnowscrollsinsteadofzooms.•Nodedialog:Fixedupthenodepropertiesdialogboxmultipurposeboxdisplayandentryofstateinfo(statenames,statetitles,statecomments,statenumbers)significantly(eg,allowsingleentryor"All"atonceforeach).
Fromversion3.18toversion3.25:
•Fixedbug:Sometimesafteraddingautilitynode(oranyundiscretizedcontinuousnode),andthentryingtoaccessitstable,aninternalerrorwouldresult.•ImprovedUnicodesupport(LabelBoxdisplay,docnnodes,settingbyright-clicking,etc.)•Fixed"ProcessCases"toworkwithUVFfiles.•Undo/redofornodesetoperationsnowworksproperly.
•Obfuscatenetdeletesdocumentationnodes.•ImprovedthesupportforoldversionsofMicrosoftWindows(Windows95,98,Me).
Fromversion3.16toversion3.18:
•Tableeditornowhasa*indicatorinitstitlebartoshowwhenchangeshavebeenmadethatarenotyetappliedtothenode.•Commentsthatyoucreatetoappearwhenthemousehoversoveranodeorstatecannowbemulti-line.•Linksarenowalwaysdrawnunderneaththenodesfordiagramclarity.•Fixedannoyingsituationwhereequationisconstantlyre-establishedwhentryingtodeleteequationfromnodepropertiesdialogbybackspacing.•Fixedproblemsoccurringwhennodefaultprinterisinstalled,suchaserrormessage:**1223**Xcomponentof`drawingbounds`inVISUALnet'V1'istoolarge(=...,butmaximumis16383).•Fixedbug:Databaseaccessgaveanerrorwhenthefirstnodeinthenetwasskipped(i.e.,wasn'tadatabasecolumn).•Lotsofsmallimprovementstothetableeditordialogbox.•Fixedbug:'AddCaseFileNodes'didn'tdoanythinginsomesituations.•Cannowscrollwitharrowkeys.•Cannowenteremptystringsforvaluesofuser-definedfieldsinnodedialogbox.•Ifnodesateachendofalinkarein"hidden"format,thelinkisnotdrawn.•Otherminorimprovementsandbugfixes.
DoingProbabilisticInferenceAfteraBayesnethasbeenconstructedandcompiled,youcanapplyittoaparticular=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_case.htm');returnfalse;">casebyenteringfindings(alsoknownas“evidence”),whicharethevaluesfornodesthatyouknow.Thenyouusebeliefupdating(whichisaformofprobabilisticinference)todeterminenewprobabilitiesforthestatesofalltheothernodes.
Youcanrunthroughtheprocessusingthisexample.
Aswellasfindingbeliefs,Neticacanfindthemostlikelyconfigurationoftheremainingvariables,accordingtothefindingsentered.Thisiscalledthe“MostProbableExplanation”.
YoucanalsouseNeticatodosensitivityanalysistofindhowtightlycouplednodesare.Thatcanbeusedtodeterminethedegreetowhicha=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingatonenodeisexpectedtochangethebeliefsatothernodes,orwhichnodeswouldbethebesttoobtainfindingsfor,inordertoobtainmaximuminformationonanothernode.
ProbabilisticInferencebyNodeAbsorptionItispossibletodo=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_probabilistic_inference.htm');returnfalse;">probabilisticinferenceusingnodeabsorption,by=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_enter_finding.htm');returnfalse;">enteringallthefindings,andthenabsorbingallthenodesexceptforasinglequerynode.Theresultingprobability=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_CPT.htm');returnfalse;">CPTforthatnodewillbeasinglebeliefvector(becausethenodewon’thaveanyparents),whichisthesameasthebeliefsthatwouldbeobtainedbycompilingtheBayesnetanddoingbeliefupdating.Ofcourse,thenetisdestroyedintheprocess,butyoucanrecoveritbychoosingEdit→Undo.Normallyitisbettertodoinferenceby=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_compile_net.htm');returnfalse;">compilingthenetanddoing=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_belief_updating.htm');returnfalse;">beliefupdating,butsometimesadditionalinsightsaregainedbyusingnodeabsorptionforinference.
Itshouldbementionedthatnodeabsorptionwillalsoworkwith=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_decision_nets.htm');returnfalse;">decisionnets.Tosolveadecisionnet,selectallitsnodes,andclickthe toolbutton.Thenaturenodeswillallbeabsorbedout.Whenadecisionnodeisabsorbed,itisnotremovedfromthenet;insteaditiscompletelydisconnectedanditsdecisiontablesettotheoptimaldecisionfunction.Utilitynodesarealsoleft,soyoucanseetheexpectedutility.ThealgorithmusedisdescribedinShachter86,Shachter88andShachter89.
Whenusingnodeabsorptiontosolvedecisionproblems,thedecisionnodes
musthave=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_no_forgetting_link.htm');returnfalse;">no-forgettinglinks.Theremustbeonlyoneutilitynode,withnodescendants.Andifnotallthenodesofthenetarebeingabsorbed,theymustconsistofadescendantsubnet.So,ifnodesareabsorbedone-by-one,asuitableordermustbeused.TheserestrictionsareexplainedinmoredetailintheShachterreferencesmentionedabove.Ifanyoftheserestrictionsarenotmet,Neticawillnotproduceanerroneousresult,butwilljustabsorbasmanyofthenodesasitcan,andthendisplayamessageexplainingwhyitwasimpossibletoproceed.
rect (functionforequations)
Usage: rect(x,a,b)
Definition: (a<=x&&x<b)?1:0
Required: a b
Returns1ifxisbetweenaandb,otherwise0.
Thisfunctionisoftenmultipliedbyanotherto"captureapiece"oftheotherfunction.
Alsoknownasthe"rectangularfunction"becauseoftherectangularshapeofitsgraph.
ThisfunctionisthesameastheprobabilitydistributionUniformDist,exceptheightofUniformDisttheisnormalizedsothattheareaunderitscurveis1.
Ifbisinfinity,the"unitstepfunction"isformed.
Seealsoclip,andsign.
Inordertodosomeoperationsonanode,youfirstselectitbyclickingonceonit,anditwillthenbedrawnusingnegativecolorstohiliteit.Youcanselectseveralnodesatatimebyclickingonthebackgroundanddraggingtheselectionrectangletoincludethem.Toaddorremovenodesfromyourselection,holddowntheCTRLkeywhileyoudotheselectionoperation,orright-clickonthenodeandchooseSelect/Deselect.MoreInfo
BetaDistribution (continuousprobabilitydistforequations)
Usage: BetaDist(x, , )
Definition: x^( -1)(1-x)^( -1)/beta( , )
wherebetaisthebetafunction
Required: >0 >0
Support: 0 x 1
Moments: = /( + )
^2= /[( + )^2( + +1)]
1=2( – )sqrt(( + +1)/( ))/( + +2)
2=3( + +1)[2( + )^2+ ( + -6)]/[ ( + +2)( + +3)]
Almostanyreasonablysmoothunimodaldistributionon[0,1]canapproximatedbysomebetadistribution(ifitsnoton[0,1],seeBeta4Dist).AnimportantuseofthebetadistributionisasaconjugatedistributionfortheparameterofaBernoullidistribution.
HiddenNodeStyleSometimesitisusefultohidenodesinyournet,especiallywhenworkingwithlargenets.
Tounhideanode(s):
1.Clickdownonthenetbackground(i.e.notonanodeorlink),andthendragwiththemousesothatthedashedlinerectanglegoesoverthenodethatwasmadehidden.Thenodewillthenbeselected(eventhoughyoucan'tseeit),soyoucanchooseStyle→Defaultfromthemenuto"bringitback"(availablefromboththeoverheadandright-clickmenus).
2.Alternately,ifitwon'tharmanyothernodes,youcanjustdoCTRL-Atoselectallthenodes,thenchooseStyle→Defaultfromthemenu.
3.Ifhidingthenodewasthelastactionyouperformed,youcansimplyclicktheUndoarrowordoCTRL-Z.
NormalDistribution (continuousprobabdistforequations)
Usage: NormalDist(x, , )
Definition: [1/( sqrt(2 ))]exp(-[(x- )/ ]^2/2)
Required: >0
Support - x
Moments: mean=
standarddeviation=
1=0 2=3
Thenormaldistribution,orapproximationsofit,arisefrequentlyinnature(thisispartlyexplainedbythe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_central_limit_theorem.htm');returnfalse;">centrallimittheorem).Sinceitalsohasmanyconvenientmathematicalpropertiesitisthemostcommonlyusedcontinuousdistribution.
Forthisdistribution,68.2%oftheprobabilityiswithin1standarddeviationofthemean,95.4%iswithin2standarddeviations,and99.74%iswithin3standarddeviations.
If =0, =1itisknownasa“standardnormal”distribution.
_find0FunctionThisisafunctionthatNeticausesinternallytofindthestateofadiscretenodehavingnumericvaluesassociatedwithitsstates,givenoneofthosenumericvalues.IfNeticagivesyouamessagesayingtherewasanerrorevaluating_find0(z,x0,x1,...xn),wherethezandxiarenumbers,thenyourequationissupplyingillegalvalues,evenifyouneverexplicitlyused_find0inyourequation.
Thevalueofzmustequaloneofthexi,orelsetheequationissayingthatthenodehasavaluethatisnotrepresentedbyanyofitsstates.Youcanchangetheequationtoonlysupplynumbersthatmatchthoseattachedtothestateofthenode(perhapsusingnearest),oryoucanchangethenumbersattachedtothestates.Or,ifyouwishittobeabletomatchnumbersinbetweenthexi,thenyoushouldchangethenodetoacontinuousone,andleavethesamesetofattachednumericvaluesasitsdiscretizationthresholds.
_BernoulliFunctionThisisadistributionthatNeticausesinternallytorepresenttheBernoullidistribution.Ifyougetanerrormessagesayingtherewasanerrorevaluating_Bernoulli(k,p),wherekandparenumbers,thenyourequationissupplyingillegalvalues,evenifyouneverexplicitlyused_Bernoulliinyourequation.
Forinstance,ifyourequationfor=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleannodeBisP(B|x)=x/10andvaluesofxcangoupto11,then_Bernoulli(1,1.1)willbeillegal,sinceyouaresupplying1.1asaprobability(andNeticacan’tnormalizeit,sincenoprobabilityforBbeingfalseisgiven).
round (functionforequations)
Usage: round(x)
Definition: floor(x+1/2)
Required: xisanunrestrictedreal
Roundsxtothenearestinteger.Toroundofftootherquantities,useroundto.
roundto (functionforequations)
Usage: roundto(dx,x)
Definition: dx*floor((x+dx/2)/dx)
Required: dx>0
Roundsxtothenearestdx,whichmaybelessthanorgreaterthan1.
Forexample,roundto(10,17)rounds17tothenearest10,andsoitreturns20.
Ifdx=1,thenthisisthesameasround.
approx_eq (functionforequations)
Usage: approx_eq(x,y)x~=y
Definition: eqnear(2e-5,x,y)Definitionofeqnear
Required: xandyareunrestrictedreals
Returnstrueiffxisequaltoy,withinasmallrelativetolerance.
Usuallytheoperatorformofthisfunctionismostconvenient:x~=y
Tohavecontrolofthetolerance,useeqnear.
eqnear (functionforequations)
Usage: eqnear(reldiff,x,y)
Definition: |X-Y|/max(|X|,|Y|)<=reldiff
Required: reldiff>=0
Returnstrueiffxisequaltoy,withinreldiff.
TohaveNeticachoosereldiff,useapprox_eq.
clip (functionforequations)
Usage: clip(min,max,x)
Definition: (x<min)?min:(x>max)?max:x
Required: min max
Returnsx,unlessitislessthanmin(inwhichcaseitreturnsmin),ormorethanmax(inwhichcaseitreturnsmax).
Seealsomax,min,andrect.
sign (functionforequations)
Usage: sign(x)
Definition: (x>0)?1:(x<0)?-1:0
Required: xisanunrestrictedreal
Returns1ifxispositive,-1ifxisnegative,and0ifxiszero.
Seealsorect,clip,andabs.
xor (functionforequations)
Usage: xor(b1,b2,...bn)
Definition: odd(NumberTrue(b1,b2,...bn))
Required: biareboolean
Returnstheexclusive-orofb1,b2…bn.
Thisisalsoknownastheparityfunction,andwillreturntrueiffanoddnumberofbievaluatetotrue.
Seealsoand,or,not,andequal.
increasing (functionforequations)
Usage: increasing(x1,x2,...xn)
Definition: (x2>x1)&&(x3>x2)&&...&&(xn>xn-1)
Required: xiareunrestrictedreals
Returnstrueiffeachxiisgreaterthanthepreviousone.
Ifyouwishthetesttobe“greaterthanorequals”,useincreasing_eq.
Seealsogreater.
increasing_eq (functionforequations)
Usage: increasing_eq(x1,x2,...xn)
Definition: (x2>=x1)&&(x3>=x2)&&...&&(xn>=xn-1)
Required: xiareunrestrictedreals
Returnstrueiffeachxiisgreaterorequaltothepreviousone.
Ifyouwishittobejustgreaterthan,useincreasing.
Seealsogreater_eq.
avg (functionforequations)
Usage: avg(x1,x2,...xn)
Definition: (x1+x2+...+xn)/n
Required: xiareunrestrictedreals
Returnstheaverage(i.e.mean)ofx1,x2,…xn.
Atleastoneargumentmustbepassed.
Seealsomax.
Example: min(10,6.6,3.4,126,3.4)returns3.4
mag (functionforequations)
Usage: mag(x1,x2,...xn)
Definition: sqrt(x1^2+x2^2+...+xn^2)
Required: xiareunrestrictedreals
Returnsthemagnitudeofthevector[x1,x2,…xn].ThisisalsoknownastheEuclideanlengthofthevector.
Iftherealandimaginarypartofacomplexnumberarepassed,themagnitudeofthecomplexnumberisreturned.
Ifnoargumentsarepassed,zeroisreturned.Ifoneargumentispassed,itsabsolutevalueisreturned.
Seealsoabs,max.
Example: mag(1.5,0,-2)returns2.5
min (functionforequations)
Usage: min(x1,x2,...xn)
Definition: xis.t.(xi<=xj)forallj
Required: xiareunrestrictedreals
Returnstheminimumofx1,x2,…xn.
Atleastoneargumentmustbepassed.
Ifyoujustwanttheindexoftheminimum(i.e.itspositioninthelist),useargmin.
Seealsomax.
Example: min(10,6.6,3.4,126,3.4)returns3.4
max (functionforequations)
Usage: max(x1,x2,...xn)
Definition: xis.t.(xi>=xj)forallj
Required: xiareunrestrictedreals
Returnsthemaximumofx1,x2,…xn.
Atleastoneargumentmustbepassed.
Ifyoujustwanttheindexofthemaximum(i.e.itspositioninthelist),useargmax.
Seealsomin.
Example: max(-10,6.6,3.4,-126,3.4)returns6.6
argmin (functionforequations)
Usage: argmin0(x0,x1,...xn)
argmin1(x1,x2,...xn)
Definition: is.t.(xi<=xj)forallj
Required: xiareunrestrictedreals
Returnstheindex(positioninlist)oftheargumentwiththelowestvalue.Ifthereareseveralwiththesamelowestvalue,thentheindexofthefirstoccurrencewillbereturned.Thefirstargumenthasindex0ifargmin0isused,orindex1ifargmin1isused.
Atleastoneargumentmustbepassed.
Ifyouwanttheminimumvalueitself,ratherthanitsindex,insteadusemin.
Seealsoargmax.
Examples: argmin0(10,6.6,3.4,126,3.4)returns2
argmin1(-5e3,6.6,3.4,-126)returns1
argmax (functionforequations)
Usage: argmax0(x0,x1,...xn)
argmax1(x1,x2,...xn)
Definition: is.t.(xi>=xj)forallj
Required: xiareunrestrictedreals
Returnstheindex(positioninlist)oftheargumentwiththehighestvalue.Ifthereareseveralwiththesamehighestvalue,thentheindexofthefirstoccurrencewillbereturned.Thefirstargumenthasindex0ifargmax0isused,orindex1ifargmax1isused.
Atleastoneargumentmustbepassed.
Ifyouwanttheminimumvalueitself,ratherthanitsindex,insteadusemax.
Seealsoargmin.
Examples: argmax0(1,-6.6,3.4,1.26,3.4)returns2
argmax1(5e3,-6.6,-3.4,126)returns1
nearest (functionforequations)
Usage: nearest0(val,x0,x1,...xn)
nearest1(val,x1,x2,...xn)
Definition: is.t.(|val-xi|<=|val-xj|)forallj
Required: valandxiareunrestrictedreals
Returnstheindex(positioninlist)oftheargumentwiththevalueclosesttoval(asmeasuredbytheabsolutevalueofthedifference).Ifthereareseveralwiththesamesmallestdifference,thentheindexofthefirstoccurrencewillbereturned.Thefirstxargumenthasindex0ifnearest0isused,orindex1ifnearest1isused.
Mustbepassedatleast2arguments(valandanx).
Fortheinversefunction,seeselect.
Seealsomember.
Examples: nearest0(1,1,3.4,1,3.4)returns0
nearest1(5e3,-6.6,-3.4,126)returns3
select (functionforequations)
Usage: select0(index,x0,x1,...xn)
select1(index,x1,x2,...xn)
Definition: xis.t.i==index
Required: indexisinteger,xiareallthesametypeselect0:0 index<n
select1:0<index n
Returnsthevalueofthexargumentatpositionindex:x[index]
Thefirstxargumentisatindex0ifselect0isused,andatindex1ifselect1isused.
Mustbepassedatleast2arguments(indexandanx).
Fortheinversefunction,seenearest.
Examples: select0(1,-6.6,3.4,1.26,3.4)returns3.4
select1(1,-6.6,3.4,1.26)returns–6.6
member (functionforequations)
Usage: member(elem,s1,s2,...sn)
Definition: (elem==s1)||(elem==s2)||...||(elem==sn)
Required: elemandallsimustbethesametype
Returnstrueiffoneofthesiargumentshasthesamevalueaselem..
Seealsonearest.
Examples: member(1,-6,3,1,3)returnstrue
member(C,blue,red)andC=redreturnstrue
factorial (functionforequations)
Usage: factorial(n)
Definition: n(n–1)(n–2)...1
Required: n 0nisaninteger
Returnsthefactorialofn,whichistheproductofthefirstnintegers.
factorial(n)isoftenwrittenasn!
factorial(0)=1
Evenfairlysmallvaluesofn(around170)cancausefactorialtooverflow.Forthatreasoncalculationswiththefactorialfunctionareoftendoneusingthelogarithmoftheresults,forwhichyoucanuselogfactorial.
Ifnisnotanintegeryoumaywanttousethegammafunction,whichforintegervaluesisrelatedtofactorialby:factorial(n)=gamma(n+1)butwhichisalsodefinedfornon-integervalues.
logfactorial (functionforequations)
Usage: logfactorial(n)
Definition: log(n(n–1)(n–2)...1)
Required: n 0nisaninteger
Returnsthenaturallogarithmofthefactorialofn(i.e.n!).
Ifnisnotanintegeryoumaywanttousetheloggammafunction,whichforintegervaluesisrelatedtologfactorialby:logfactorial(n)=loggamma(n+1)butwhichisalsodefinedfornon-integervalues.
logistic (functionforequations)
Usage: logistic(t)
Definition: exp(t)/(1+exp(t))
Required: tisanunrestrictedreal
Logisticisalsoknownas"expit",or"sigmoid".
Thisistheinverseofthelogitfunction(alsoknownaslogodds).
SeealsoLogisticDist,logit.
Example: expit(0)returns0.5expit(1)returns0.7310585
logit (functionforequations)
Usage: logit(p)
Definition: log(p/(1-p))
Required: 0<p<1
logitisalsoknownas"logodds".
Thisistheinverseofthelogisticfunction(alsoknownas"expit"or"sigmoid")
Itapproachesnegativeinfinityaspapproaches0,andpositiveinfinityaspapproaches1.
Seealsologistic.
Example: logit(0.5)returns0logit(0.75)returns1.0986123
gamma (functionforequations)
Usage: gamma(x)
Required: x 0
Returnsthegammafunctionofx.
Thegammafunctionisnormallydefinedfornegativevaluesofxaswell,butNeticacannotcomputethese.
Don’tconfusethisfunctionwiththegammaprobabilitydistribution.
Evenfairlysmallvaluesofx(around170)cancausegammatooverflow.Forthatreasoncalculationswiththegammafunctionareoftendoneusingthelogarithmoftheresults,forwhichyoucanuseloggamma.
Forintegervaluesofx,thegammafunctionisrelatedtothefactorialfunctionby:factorial(n)=gamma(n+1)
loggamma (functionforequations)
Usage: loggamma(x)
Definition: log(gamma(x))
Required: x 0
Returnsthenaturallogarithmofthegammafunctionofx.
Theloggammafunctionisnormallydefinedfornegativevaluesofxaswell,butNeticacannotcomputethese.
beta (functionforequations)
Usage: beta(z,w)
Definition: gamma(z)gamma(w)/gamma(z+w)
Required: z>0w>0
Returnsthebetafunctionofzandw.
BetaDististhebetaprobabilitydistribution,whichisbasedonthebetafunction.
Seealsogamma.
erf (functionforequations)
Usage: erf(x)
Definition: (2/sqrt( ))Integralfrom0toxofexp(-t^2)dt
Required: xisanunrestrictedreal
Thisreturnstheerrorfunctionofx.Itisusefulforcalculatingintegralsofthenormaldistribution.
Ifxislarge,youcanobtainbetteraccuracywitherfc.
erfc (functionforequations)
Usage: erfc(x)
Definition: 1–erf(x)(definitionoferf)
Required: xisanunrestrictedreal
Thisreturnsthecomplementaryerrorfunctionofx.Itisusefulforcalculatinganintegralofatailofanormaldistribution.
Itwouldbeeasyenoughtojustuse1-erf(x),butthisprovidesbetternumericalaccuracywhenxislarge(soerf(x)isverycloseto1).
binomial (functionforequations)
Usage: binomial(n,k)
Definition: n!/(k!*(n-k)!)
Required: 0 k nnandkareintegers
Returnsthebinomialcoefficient(nk).Thisisthenumberofdifferentk-sizedgroupsthatcanbedrawnfromasetofndistinctelements.Seealsothemultinomialfunction.
BinomialDististhebinomialprobabilitydistribution,whichisbasedonthebinomialcoefficient.
multinomial (functionforequations)
Usage: multinomial(n1,n2,...nn)
Definition: (n1+n2+...nn)!/(n1!*n2!*...nn!)
Required: ni 0niareintegers
Returnsthenumberofwaysan(n1+n2+…nn)sizedsetofdistinctelementscanbepartitionedintosetsofsizen1,n2,…nn.Ifpartitioningintoonlytwosets,thisisthesameasbinomial.
Theprobabilitydistributionbasedonthisfunctionisthemultinomialdistribution.
UniformDistribution (continuousprobabilitydistforequations)
Usage: UniformDist(x,a,b)
Definition: 1/(b-a)
Required: b>a
Support: a x b
Moments: =(a+b)/2 =(b-a)/sqrt(12)
1=0 2=1.8
Thisisthedistributiontousewhentheminimumandmaximumpossiblevaluesforavariableareknown,butwithinthatrangethereisnoknowledgeofwhichvalueismorelikelythananother.
Ithasaconstantvaluefromx=atox=b,andzerovalueoutsidethisrange.
Alsoknownasthe"rectangulardistribution",andsimilartotherectfunction.
TriangularDistribution (continuousprobabdistforequations)
Usage: TriangularDist(x,m,w)
Definition: (w-|x-m|)/w^2
Required: w>0
Support: m-w x m+w
Moments: =m =w/sqrt(6)
1=0 2=2.4
Thegraphofthisdistributionhasatriangularshape,withthehighestpointatx=a,andnonzerovaluesfroma-wtoa+w.
SeealsoTriangular3Dist,andTriangularEnd3Dist.
AsymmetricTriangularDistribution (continuousprob.dist.forequations)
Usage: Triangular3Dist(x,m,w1,w2)
Definition: 2(x-m+w1)/(w1(w1+w2))form-w1<=x<=m,
2(m+w2-x)/(w2(w1+w2))form<=x<=m+w2
Required: w1 0w2 0w1&w2can'tbothbe0
Support: m-w1 x m+w2
Moments: m w2–w1 3
The=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_pdf.htm');returnfalse;">pdfhasatriangularshape,withthehighestpointatx=m,andnonzerovaluefromm-w1tom+w2.
SeealsoTriangularDist,andTriangularEnd3Dist.
AsymmetricTriangularRangeDistribution (cpdistforequations)
Usage: TriangularEnd3Dist(x,m,a,b)
Definition: 2(x-a)/((b-a)(m-a))fora<=x<=m,
2(b-x)/((b-a)(b-m))form<=x<=b
Required: a m ba b
Support: a x b
Moments: a+b+m /3
^2 a^2+b^2+m^2-ab-am-bm /18
The=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_pdf.htm');returnfalse;">pdfhasatriangularshape,withthehighestpointatx=m,andnonzerovaluefromatob.
SeealsoTriangular3Dist,andTriangularDist.
LognormalDistribution (continuousprobabilitydist.forequations)
Usage: LognormalDist(x, , )
Definition: N(log(x), , )/x
=(1/[x sqrt(2 )])exp(-[(log(x)- )/ ]^2/2)
whereNisthenormaldistribution
Required: >0
Support: x>0
Moments: =exp( + ^2/2)
^2=exp(2 + ^2)[exp( ^2)–1]
1=[exp( ^2)+2]sqrt(exp( ^2)–1)
2=exp(4 ^2)+2exp(3 ^2)+3exp(2 ^2)
Thelognormaldistributionresultswhenthelogarithmoftherandomvariableisdescribedbyanormaldistribution.Thisisoftenthecaseforavariablewhichistheproductofanumberofrandomvariables(bythe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_central_limit_theorem.htm');returnfalse;">centrallimittheorem).
Noticethatthe‘n’ofLognormalisnotcapitalized,indicatingthatthisisnotthesameasthelogarithmofthenormaldistribution.
ExponentialDistribution (continuousprobabilitydistforequations)
Usage: ExponentialDist(x, )
Definition: exp(- x)
Required: >0
Support: x 0
Moments: =1/ =1/
1=2 2=9
Ifeventsoccurbya=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Poisson_process.htm');returnfalse;">Poissonprocess,thenthetimebetweensuccessiveeventsisdescribedbytheexponentialdistribution(where istheaveragenumberofeventsperunittime).
GammaDistribution (continuousprobabilitydistforequations)
Usage: GammaDist(x, , )
Definition: x^( -1)exp(-x/ )/(gamma( ) ^ )
=exp[( -1)log(x)-x/ -log(gamma( ))- log( )]
Parameters: isshape isscale
Required: >0 >0
Support: x 0
Moments: = = sqrt( )
1=2/sqrt( ) 2=3+6/
Ifeventsoccurbya=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Poisson_process.htm');returnfalse;">Poissonprocess,thenthetimerequiredfortheoccurrenceof eventsisdescribedbythegammadistribution(where istheaveragetimebetweenevents).
For =1,thisistheexponentialdistributionwith =1/ .For =2,thisisthechi-squaredistributionwithdegreesoffreedom =2 .
TheErlangdistributionisaspecialcaseofthegammadistributioninwhich=1and =n(whichisaninteger).
WeibullDistribution (continuousprobabilitydistforequations)
Usage: WeibullDist(x, , )
Definition: ( / )(x/ )^( -1)exp(-(x/ )^ )
Parameters: isshape isscale
Required: >0 0
Support: x 0
Moments: = gamma(1+1/ )
^2= ^2[gamma(1+2/ ) gamma(1+1/ )^2]
1=[gamma(1+3/ )-3gamma(1+1/ )gamma(1+2/ )+2gamma
(1+1/ )^3]/[gamma(1+2/ )–gamma(1+1/ )^2]^(3/2)
2=[gamma(1+4/ )-4gamma(1+1/ )gamma(1+3/ )+6gamma
(1+1/ )^2gamma(1+2/ )-3gamma(1+1/ )^4]/[gamma(1+2/ )-gamma(1+1/ )^2]^2
TheWeibulldistributionisoftenusedforreliabilitymodels,sinceifthefailurerateofanitem(i.e.,percentoftheremainingoneswhichfail,asafunctionoftime)isgivenas:Z(t)=rt^( -1),thenthedistributionofitemlifetimesisgivenbytheWeibulldistributionwithr= / ^ .
GeneralizedBetaDistribution (contprob.distforequations)
Usage: Beta4Dist(x,a,b,c,d)
Definition: Be((x-c)/(d-c), , )
whereBeisthebetadistribution
Parameters: cislowerendpointdisupperendpoint
Required: >0 >0d>c
c x d
Thisisabetadistributionthathasbeenshiftedandscaled,sothatthe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_pdf.htm');returnfalse;">pdfhasnonzerovaluesfromx=ctox=d,insteadoffromx=0tox=1.Thisdistributionhasgreatflexibilitytofitalmostanysmooth,unimodaldistributionwithnotails(i.e.,onlynonzerooverafiniterange).
CauchyDistribution (continuousprobabdistforequations)
Usage: CauchyDist(x, , )
Definition: 1/( (1+((x- )/ )^2))
Parameters: =location =scale
Required: >0
Moments: =undefined =undefined
Althoughreal-worlddatararelyfollowsaCauchydistribution,itisusefulbecauseofitsunusualness.Forexample,althoughitissymmetricabout(whichisthereforeitsmedianandmode),itdoesn'thaveamean(orvariance,etc.)becausetheappropriateintegralsdon'tconverge.TheC(0,1)distributionisalsoStudent'stdistributionwithdegreesoffreedom=1.
LaplaceDistribution (continuousprobabilitydistforequations)
Usage: LaplaceDist(x, ,
Definition: (1/(2 ))exp(-|x- |/ )
Required: b>0
Support: - x
Moments: mean
^2 2 ^2
1=0 2=3
Its=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_pdf.htm');returnfalse;">pdfistwoexponentialdistributionssplicedtogetherback-to-back.ThedifferencebetweentwoiidexponentialdistributionrandomvariablesfollowsaLaplacedistribution.
Alsoknownasthe"doubleexponential"distribution.
ExtremeValueDistribution (continuousprobab.dist.forequations)
Usage: ExtremeValueDist(x, , )
Definition: exp(-exp(-(x- )/ )-(x- )/ )/
Parameters: =location =scale
Required: >0
Moments: = + ( =Eulers=0.5772156649)
= /sqrt(6)
1=1.3 2=5.4
Thisdistributionisthelimitingdistributionforthesmallestorlargestvaluesinlargesamplesdrawnfromavarietyofdistributions,includingthenormaldistribution.
Alsoknownasthe"Fisher-Tippetdistribution","Fisher-TippetTypeIdistribution"orthe"log-Weibulldistribution".
ParetoDistribution (continuousprobabdistforequations)
Usage: ParetoDist(x,a,b)
Definition: (a/b)(b/x)^(a+1)
Parameters: aisshapebislocation
Required: a>0b>0
Support: x b
Moments: =ab/(a-1)fora>1( fora 1)
^2=ab^2/[(a-1)^2(a-2)]fora>2
( if1<a 2,non-existentifa 1)
1=[2(1+a)/(a-3)]sqrt((a-2)/a)fora>3
2=6(a^3+a^2–6a-2)/[a(a-3)(k-4)]fora>4
TheParetodistributionisapowerlawprobabilitydistributionfoundinalargenumberofreal-worldsituations,suchasthedistributionofwealthamongindividuals,frequenciesofwords,sizeofparticles,sizeoftowns/cities,areasburntinforestfires,sizeofsomefractalfeaturesetc.Thesearesituationswheretherearemanythataresmallandafewthatarelarge(liketheParetoprinciple,inwhich20%ofthepopulationowns80%ofthewealth).
Foranyvalueofa,thedistributionis"scale-free",whichmeansthatnomatterwhatrangeofxonelooksat,theproportionofsmalltolargeeventsisthesame(i.e.,theslopeofthecurveonanysectionofthelog-logplotisthesame).
AlsoknownastheBradforddistribution.
Chi-SquareDistribution (continuousprobabilitydistforequations)
Usage: ChiSquareDist(x,n)
Definition: x^( /2-1)/[exp(x/2)2^( /2)gamma( /2)]
Required: >0 isaninteger
Support: x 0
Moments: = ^2=2
1=2sqrt(2/ ) 2=3+12/
ThisisthedistributionofZ1^2+Z2^2+...Z ^2whereZiareindependentstandardnormalvariates.
isusuallycalledthe“degreesoffreedom”ofthedistribution.
Student'st-Distribution (continuousprobabilitydistforequations)
Usage: StudentTDist(x,
Definition: (( +1)/2)/[sqrt( pi)( /2)(1+x^2/ )^(( +1)/2)
Required: >0
Support: - x
Moments: m=0
^ for >2
1=0for >3 2=6/( -4)for >4
Thet-distributionorStudent'st-distributionarisesintheproblemofestimatingthemeanofanormallydistributedpopulationwhenthesamplesizeissmall.
F-Distribution (continuousprobabilitydistforequations)
Usage: FDist(x, 1, 2)
Definition: [( 1x/( 2+ 1x))^(1/2)][( 2/( 2+ 1x))^( 2/2)]/[xbeta( 1/2, 2/2)]
wherebetaisthebetafunction
Required: >0 2>0
Support: x 0
Moments: 2/( 2-2)for >2
^ 2 2^2( 1+ 2-2)/[ 1( 2-2)^2( 2-4)]for 2>4
Theratiooftwochi-squaredvariatesX1andX2,eachdividedbytheirdegreesoffreedom:(X1/ 1)/(X2/ 2)followsanF-distribution.
SinglePointDistribution (discreteprobabilitydistforequations)
Usage: SingleDist(k,c)
Definition: (k==c)?1:0
Required:kandcareintegers
Support: k c
Moments: =c =01=undefined 2=undefined
Thesinglepointdistributionindicatesthatk=c.Theprobabilitythatkisanyothervalueis0.
Thisisthediscreteversionofadiracdelta.
DiscreteUniformDistribution (probabilitydistforequations)
Usage: DiscUniformDist(k,a,b)
Definition: 1/(b-a+1)
Required: b ak,a,bareintegers
Support: a k b
Moments: =(a+b)/2^2=(b-a)(b–a+2)/121=02=(3/5)[3–4/[(b-a)(b–a+2)]]
Thisdistributionrepresentsthesituationwherekhasanequalprobabilityoftakingonanyoftheintegervaluesfromatobinclusive(whereaandbareintegers).Ifkwerecontinuous,thenitwouldbeacontinuousuniformdistribution.
BernoulliDistribution (discreteprobabilitydistforequations)
Usage: BernoulliDist(b,p)
Definition: b?p:1-p
Required: 0 p 1bboolean
Moments: =p^2=p(1–p)1=(1-2p)/sqrt(p(1-p))2=3+[1-6p(1-p)]/[p(1-p)]
Thisisthedistributionforasingle"Bernoullitrial",inwhichpistheprobabilityofanoutcomelabeled"success"occurring.bisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleanthatistrueifthe"success"occurs.Anexampleisflippingacoinandcheckingfortheeventofheadsappearing.
BinomialDistribution (discreteprobabilitydist.forequations)
Usage: BinomialDist(k,n,p)
Definition: binomial(n,k)p^k(1-p)^(n-k)Definitionof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_binomial_coefficient.htm');returnfalse;">binomial
Required: 0 p 1kandnareintegers
Support: 0 k n
Moments: =np^2=np(1–p)1=(1-2p)/sqrt(np(1-p)2=3+[1-6p(1-p)]/[np(1-p)]
A=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bernoulli_process.htm');returnfalse;">binomialexperimentisaseriesofnindependenttrials,eachwithtwopossibleoutcomes(oftenlabeled"success"and"failure"),withaconstantprobability,p,ofsuccess.Thetotalnumberofsuccesses,k,isgivenbythebinomialdistribution.
Iftherearemorethantwopossibleoutcomes,usethemultinomialdistribution.
Ifthesamplingiswithoutreplacement,usethehypergeometricdistribution
Forlargen,andpnottoocloseto0or1,thebinomialdistributioncanbeapproximatedbyanormaldistributionwithmean =np,andvariance=np(1-p).Forlargen,andpcloseto0,itcanbeapproximatedbyaPoissondistributionwithparameter =np.Asn->infinitythesearethelimitingdistributions(providingp=constantinthenormalcase,andp->0,np=constantinthePoissoncase).
PoissonDistribution (discreteprobabdistforequations)
Usage: PoissonDist(k, )
Definition: exp(- )* ^k/k!=exp(- +k*log( )-log(k!))
Required: >0kisaninteger
Support: k 0
Moments: mean= ^2=1=1/sqrt( ) 2=3+1/
Ifeventsoccurbya=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Poisson_process.htm');returnfalse;">Poissonprocess,thenthenumberofeventsthatoccurinafixedtimeintervalisdescribedbythePoissondistribution(where istheaveragenumberofeventsperunittime).
HypergeometricDistribution (discreteprobabilitydist.forequations)
Usage: HypergeometricDist(k,n,s,N)
Definition: binomial(s,k)binomial(N-s,n-k)/binomial(N,n)Definitionof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_binomial_coefficient.htm');returnfalse;">binomial
Required: N 00 n N0 s Nk,N,nandsareintegers
Support: 0 k n
Moments: =ns/N^2=ns(1-s/N)(N-n)/[N(N-1)]1=(N-2s)(N-2n)sqrt(N-1)/[(N-2)sqrt(ns(N-s)(N-n))]2=N^2(N-1)/[(N-2)(N-3)ns(N-s)(N-n)][N(N+1)-6n(N-n)+3s(N-s)/N^2[N^2(n-2)-Nn^2+6n(N-n)]]
Thisprovidestheprobabilitythattherearek"successes"inarandomsampleofsizen,selected(withoutreplacement)fromNitemsofwhichsarelabeled"success"andN-slabeled"failure".
Itisusedinplaceofthebinomialdistributionforsituationswhichsamplewithoutreplacement.
NegativeBinomialDistribution (discreteprobabilitydist.forequations)
Usage: NegBinomialDist(k,n,p)
Definition: binomial(n+k-1,k)p^n(1-p)^kDefinitionof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_binomial_coefficient.htm');returnfalse;">binomial.
Required: 0 n0<p 1kandnareintegers
Support: 0 k
Moments: =n(1-p)/p^2=n(1-p)/p^21=(2-p)/sqrt(n(1-p))2=3+[p^2+6(1-p)]/(n(1-p))
Thisisthedistributionofthenumberoffailuresthatoccurinasequenceoftrialsbeforensuccesseshaveoccurred,ina=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bernoulli_process.htm');returnfalse;">Bernoulliprocess(independenttrials,withoutcomeslabeled"success"or"failure",andconstantprobabilitypofsuccess).
Thelimitofanegativebinomialdistributionasn ,(1-p) 0,n(1-p) ,isaPoissondistributionwithparameter .
Ifn=1,thenthisdistributionisjustthegeometricdistribution.
GeometricDistribution (discreteprobabilitydist.forequations)
Usage: GeometricDist(k,p)
Definition: p(1-p)^k
Required: 0<p 1kisaninteger
Support: 0 k
Moments: =(1-p)/ps^2=(1-p)/p^21=(2-p)/sqrt(1-p)2=3+[p^2+6(1-p)]/(1-p)
Thisdistributiondescribesthenumberof=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_Bernoulli_process.htm');returnfalse;">Bernoullitrials(independenttrials,withoutcomeslabeled"success"or"failure",andconstantprobabilitypofsuccess)beforethefirstsuccessoccurs(i.e.,includesonlythefailuretrials).Anexamplewouldbethenumberofcoinflipsresultingintailsbeforethefirstheadisseen.
SituationswhereBernoullitrialsarerepeateduntilthenthsuccessarecalled"negativebinomialexperiments",andthegeometricdistributionisaspecialcaseofthenegativebinomialdistributionwithn=1.
Notethatthegeometricdistributionisinsteaddefinedbysomeauthorstohavethe=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_pdf.htm');returnfalse;">pdf:p(1-p)^(k-1)
LogarithmicDistribution (discreteprobabilitydist.forequations)
Usage: LogarithmicDist(k,p)
Definition: -(p^k)/(klog(1-p))
Required: 0<p<1kinteger
Support: k 1
Moments: =-p/[(1-p)log(1-p)]
^2=-p(p+log(1-p))/[(1-p)log(1-p)]^2
Alsoknownasthe"logarithmicseriesdistribution".
MultinomialDistribution (discreteprobabilitydist.forequations)
Usage: MultinomialDist(bc,n,k1,p1,k2,p2,...km,pm)
Required: n 0ki 00 pi 1sumpi!=0bcbooleann,kiinteger
Support: n=sumki
Mean: E[ki]=npi
Covariance: cov[ki,kj]=-npipjifi!=jifi=jthencov[ki,ki]=var[ki]=npi(1-pi)
Themultinomialdistributionisageneralizationofthebinomialdistributiontothesituationwheretherearenotjusttwooutcomes(usuallylabeled"success"and"fail"),butrathermoutcomes,eachhavingprobabilitypi(i=1..m),andweareinterestedinthenumberofoccurrencesofeachoutcome(ki),giventhatatotalofntrialsareperformed.
Tocreateamultinomialdistributionbetweenthekiandnnodes,firstaddtothenetanew=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleannode,inthisexamplecalledbc.Thenaddlinksfromthenodesofallthenon-fixedparameters(usuallynandallki)tonodebc.Atnodebc,putanequationwithMultinomialDist,andconverttheequationtoatable.Finally,givenodebca=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_finding.htm');returnfalse;">findingoftrue.Normallythesumofpiisone,butNeticawilljustnormalizethepiifthatisnotthecase.Ifmis2,thenk2isdeterministicallydeterminedbyk1(i.e.,k2=n-k1),andk1isdistributedbyBinomialDist.Eachofthekiseparatelyhasabinomialdistributionwithparametersnandpi,andbecauseoftheconstraintthatthesumoftheki'sisn,theyarenegatively
correlated.TheDirichletdistributionistheconjugatepriorofthemultinomialinBayesianstatistics.Forassistanceonusingthisfunction,=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_email.htm');returnfalse;">contactoursupportteam.
Noisy-AndDistribution (DMprob.dist.forequations)
Usage: NoisyAndDist(e,inh,b1,p1,...bn,pn)
Definition: P(e)=(1-inh)producti=1ton(bi?1:(1-pi))
Required: 0 inh 1e,biBoolean0 pi 1
Usethisdistributionwhenthereareseveralpossiblerequirementsforanevent,andeachhasaprobabilitythatitwillactuallybenecessary.Eachofthenecessaryrequirementsmustpassfortheeventtooccur.Eventhen,thereisaprobability(givenbyinh)thattheeventmaynotoccur(makeinhzerotoeliminatethis).
Eachbiisa=4&&typeof(BSPSPopupOnMouseOver)=='function')BSPSPopupOnMouseOver(event);"class="BSSCPopup"onclick="BSSCPopup('X_PU_boolean_node.htm');returnfalse;">booleanvariable,whichwhenTRUE,indicatesarequirementpassed.eisalsoaboolean,whichindicateswhethertheeventoccurs.Eachofthepiaretheprobabilitythatbiwillberequiredtocausee.
Ifinhiszero,andonlyonepossiblerequirementisFALSE,saybk,thentheprobabilityforeis1-pk.IfmorepossiblerequirementsareFALSE,theprobabilitywillbelower.Andifinhisnonzero,theprobabilitywillbelower.ReducingapialwaysresultsinthesameorhigherP(e).
picanbeconsideredthe“strength”oftherelationbetweeneandbi,withzeroindicatingindependence(linkcouldberemoved),and1indicatingmaximumeffect.
SeealsoNoisyOrDist.
Noisy-MaxDistribution (multivariatedist.forequations)
SeealsoNoisyOrDist,NoisySumDist.
Forinformationonusingthisfunction,contactNorsys,andaskforthedocumenttitled"NoisyOr,Max,Sum.doc".
Noisy-SumDistribution (multivariatedist.forequations)
SeealsoNoisyMaxDist.
Forinformationonusingthisfunction,contactNorsysandaskforthedocumenttitled"NoisyOr,Max,Sum.doc".
CSVfileisacommonlyusedtermforaformofcasefileinwhichthenamesofthevariablesappearonthefirstline,andthenbelowareallthecases(i.e.records),witheachcaseonasinglelineandhavingavalueforeachofthevariables,andwithallthevaluesandvariablesintextformandseparatedbycommas(i.e."CommaSeparatedValues").Seealsotabdelimitedtext.
Tabdelimitedtextfileisacommonlyusedtermforaformofcasefileinwhichthenamesofthevariablesappearonthefirstline,andthenbelowareallthecases(i.e.records),witheachcaseonasinglelineandhavingavalueforeachofthevariables,andwithallthevaluesandvariablesintextformandseparatedbytabcharacters.SeealsoCSVfile.
AtextfileconsistsonlyofASCIIcharacters.Ithasnospecialsymbols,noformatting(bold,italics,fontsorsizes),nostructure(paragraphsections,chaptersections,margins,etc.),andnospecialinserts(pictures,tables,etc.).Youcancreateormodifyatextfileusingatexteditor.
ASCIIisatextcharacterencodingbasedontheEnglishalphabet,andwasfirstreleasedasastandardin1967.Itrepresentseachcharacterwith7bits,althoughtherearemany8-bitextensionsofit.ASCIIanditsextensionshavebeenbyfarthedominantwaytorepresenttextinacomputer,butarenowbeingovertakenbyUnicode,whichcanrepresentmanymorecharacters.InNetica,identifiers(i.e.IDnames)arealwayscomposedonlyofASCIIcharacters,whiletitlesanddescriptionsmaybeinUnicode.
LogisticDistribution (continuousprobabdistforequations)
Usage: LogisticDist(x, , )
Definition: exp(-(x- )/ )/( *(1+exp(-(x- )/ ))^2)
Parameters: =location =scale
Required: >0
Moments: Mean=Median=Mode=
variance=(pi* )^2/3
kurtosis=6/5
entropy=log( )+2
Itresemblesthenormaldistributioninshapebuthasheaviertails(higherkurtosis).Itscumulativedistributionfunction(cdf)isthelogisticfunction.