亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lungbayesdemo.html

?? 關(guān)于醫(yī)學(xué)診斷系統(tǒng)matlab實(shí)現(xiàn) v 關(guān)于醫(yī)學(xué)診斷系統(tǒng)matlab實(shí)現(xiàn)
?? HTML
?? 第 1 頁 / 共 4 頁
字號(hào):
<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"><html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">   <head>      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <!--This HTML is auto-generated from an M-file.To make changes, update the M-file and republish this document.      -->      <title>Modeling Lung Cancer Diagnosis Using Bayesian Network Inference</title>      <meta name="generator" content="MATLAB 7.6">      <meta name="date" content="2007-12-03">      <meta name="m-file" content="lungbayesdemo"><style>body {  background-color: white;  margin:10px;}h1 {  color: #990000;   font-size: x-large;}h2 {  color: #990000;  font-size: medium;}/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows. */ p,h1,h2,div.content div {  max-width: 600px;  /* Hack for IE6 */  width: auto !important; width: 600px;}pre.codeinput {  background: #EEEEEE;  padding: 10px;}@media print {  pre.codeinput {word-wrap:break-word; width:100%;}} span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}span.untermstring {color: #B20000}span.syscmd {color: #B28C00}pre.codeoutput {  color: #666666;  padding: 10px;}pre.error {  color: red;}p.footer {  text-align: right;  font-size: xx-small;  font-weight: lighter;  font-style: italic;  color: gray;}  </style></head>   <body>      <div class="content">         <h1>Modeling Lung Cancer Diagnosis Using Bayesian Network Inference</h1>         <introduction>            <p>This demo illustrates a simple Bayesian Network example for exact probabilistic inference using Pearl's message-passing algorithm.</p>         </introduction>         <h2>Contents</h2>         <div>            <ul>               <li><a href="#1">Introduction</a></li>               <li><a href="#3">Creating the Bayesian Network</a></li>               <li><a href="#5">Visualizing the Bayesian Network as a Graph</a></li>               <li><a href="#6">Initializing the Bayesian Network</a></li>               <li><a href="#16">Expanding the Network</a></li>               <li><a href="#19">Drawing the Expanded Network</a></li>               <li><a href="#20">Performing Exact Inference on Clustered Trees</a></li>               <li><a href="#23">Explaining Away the Lung Cancer</a></li>               <li><a href="#27">References</a></li>            </ul>         </div>         <h2>Introduction<a name="1"></a></h2>         <p>Bayesian networks (or belief networks) are probabilistic graphical models representing a set of variables and their dependencies.            The graphical nature of Bayesian networks and the ability of describing uncertainty of complex relationships in a compact            manner provide a method for modelling almost any type of data.         </p>         <p>Consider the following example, representing a simplified model to help diagnose the patients arriving at a respiratory clinic.            A history of smoking has a direct influence on both whether or not a patient has bronchitis and whether or not a patient has            lung cancer. In turn, the presence or absence of lung cancer has direct influence on the results of a chest x-ray test. We            are interested in doing probabilistic inference involving features that are not directly related, and for which the conditional            probability cannot be readily computed using a simple application of the Bayes' theorem.         </p>         <h2>Creating the Bayesian Network<a name="3"></a></h2>         <p>A Bayesian network consists of a direct-acyclic graph (DAG) in which every node represents a variable and every edge represents            a dependency between variables. We construct this graph by specifying an adjacency matrix where the element on row <i>i</i> and column <i>j</i> contains the number of edges directed from node <i>i</i> to node <i>j</i>. The variables of the models are specified by the graph's nodes: <tt>S</tt> (smoking history), <tt>B</tt> (bronchitis), <tt>L</tt> (lung cancer) and <tt>X</tt> (chest x-ray). The variables are discrete and can take only two values: true (<tt>t</tt>) or false (<tt>f</tt>).         </p><pre class="codeinput"><span class="comment">%=== setup</span>adj = [0 1 1 0; 0 0 0 0; 0 0 0 1; 0 0 0 0]; <span class="comment">% adjacency matrix</span>nodeNames = {<span class="string">'S'</span>, <span class="string">'B'</span>, <span class="string">'L'</span>, <span class="string">'X'</span>};           <span class="comment">% nodes</span>S = 1; B = 2; L = 3; X = 4;                 <span class="comment">% node identifiers</span>n = numel(nodeNames);                       <span class="comment">% number of nodes</span>t = 1; f  = 2;                              <span class="comment">% true and false</span>values = cell(1,n);                         <span class="comment">% values assumed by variables</span><span class="keyword">for</span> i = 1:numel(nodeNames)    values{i} = [t f];<span class="keyword">end</span></pre><p>In addition to the graph structure, we need to specify the parameters of the model, namely the conditional probability distribution.            For discrete variables, this distribution can be represented as a table (Conditional Probability Table, <tt>CPT</tt>), which lists the probability that a node takes on each of its value, given the value combinations of its parents.         </p><pre class="codeinput"><span class="comment">%=== Conditional Probability Table</span>CPT{S} = [.2 .8];CPT{B}(:,t) = [.25 .05] ; CPT{B}(:,f) = 1 - CPT{B}(:,t);<span class="comment">% CPT{L}(:,t) = [.03 .0005]; CPT{L}(:,f) = 1 - CPT{L}(:,t);</span>CPT{L}(:,t) = [.3 .005]; CPT{L}(:,f) = 1 - CPT{L}(:,t);CPT{X}(:,t) = [.6 .02]; CPT{X}(:,f) = 1 - CPT{X}(:,t);</pre><h2>Visualizing the Bayesian Network as a Graph<a name="5"></a></h2>         <p>We can visualize the network structure using the <tt>biograph</tt> object. The properties of nodes and edges can be changed as desidered.         </p><pre class="codeinput"><span class="comment">%=== draw the network</span>nodeLabels = {<span class="string">'Smoking'</span>, <span class="string">'Bronchitis'</span>, <span class="string">'Lung Cancer'</span>, <span class="string">'Abnormal Xrays'</span>};bg = biograph(adj, nodeLabels, <span class="string">'arrowsize'</span>, 4);set(bg.Nodes, <span class="string">'shape'</span>, <span class="string">'ellipse'</span>);bgInViewer = view(bg);<span class="comment">%=== save as figure</span>bgFig = figure;copyobj(bgInViewer.hgAxes,bgFig)<span class="comment">%=== annotate using the CPT</span>[xp, xn] = find(adj);     <span class="comment">% xp = parent id, xn = node id</span>pa(xn) = xp;              <span class="comment">% parents</span>pa(1) = 1;                <span class="comment">% root is parent of itself</span>s1 = cell(1,n); s2 = cell(1,n); pos = zeros(n,2);<span class="keyword">for</span> i = 2:n    pos(i,:) = bgInViewer.Nodes(i).Position;    s1{i} = sprintf(<span class="string">'P(%s|%s=t) = %f'</span>, nodeNames{i}, nodeNames{pa(i)}, CPT{i}(1,t));    s2{i} = sprintf(<span class="string">'P(%s|%s=f) = %f'</span>, nodeNames{i}, nodeNames{pa(i)}, CPT{i}(2,t));<span class="keyword">end</span>pos(1,:) = bgInViewer.Nodes(1).Position; <span class="comment">% root</span>s1{1} = sprintf(<span class="string">'P(%s=t) = %f'</span>, nodeNames{1}, CPT{1}(1));s2{1} = <span class="string">' '</span>;text(pos(:,1)+2, pos(:,2)-10, s1)text(pos(:,1)+2, pos(:,2)-15, s2)</pre><img vspace="5" hspace="5" src="lungbayesdemo_01.png"> <img vspace="5" hspace="5" src="lungbayesdemo_02.png"> <h2>Initializing the Bayesian Network<a name="6"></a></h2>         <p>The process of computing the probability distribution of variables given specific evidence is called probabilistic inference.            By exploiting local independencies among nodes, Pearls [1] developed a message-passing algorithm for exact inference in singly-connected            networks. The algorithm can compute the conditional probability of any variable given any set of evidence by propagation of            beliefs between neighboring nodes. For more information about the message-passing algorithm see [2]. We can create and initiate            a Bayesian network for the example under consideration as follows:         </p><pre class="codeinput">root = find(sum(adj,1)==0); <span class="comment">% root is any node with no parent</span>[nodes, edges] = bnMsgPassCreate(adj, values, CPT);[nodes, edges] = bnMsgPassInitiate(nodes, edges, root)</pre><pre class="codeoutput">nodes = 4x1 struct array with fields:    id    values    parents    children    peye    lambda    CPT    Pedges = 4x4 struct array with fields:    peyeX    lambdaX</pre><p>The algorithm parameters, including the conditional probability of each node given the evidence, are stored in the fields            of the MATLAB structures <tt>nodes</tt> and <tt>edges</tt>. Using the function <tt>customnodedraw</tt>, we can visualize the distribution of the conditional probability given an empty set of evidence in a series of pie charts,            as shown below.         </p><pre class="codeinput"><span class="comment">%=== conditional probability given the empty set []</span><span class="keyword">for</span> i = 1:n    disp([<span class="string">'P('</span> nodeNames{i}, <span class="string">'|[]) = '</span> num2str(nodes(i).P(1))]);<span class="keyword">end</span><span class="comment">%=== assign relevant info to each node handle</span>nodeHandles = bgInViewer.Nodes;<span class="keyword">for</span> i = 1:n    nodeHandles(i).UserData.Distribution = [nodes(i).P];<span class="keyword">end</span><span class="comment">%=== draw customized nodes</span>bgInViewer.ShowTextInNodes = <span class="string">'none'</span>;set(nodeHandles, <span class="string">'shape'</span>,<span class="string">'circle'</span>)bgInViewer.CustomNodeDrawFcn = @(node) customnodedraw(node);<span class="comment">%bgInViewer.Scale = .7</span>bgInViewer.dolayout</pre><pre class="codeoutput">P(S|[]) = 0.2P(B|[]) = 0.09P(L|[]) = 0.064P(X|[]) = 0.05712</pre><img vspace="5" hspace="5" src="lungbayesdemo_03.png"> <p>Suppose we are interested in evaluating the likelihood that a patient with bronchitis has lung cancer. We instantiate <tt>B=t</tt> (true) and we update the network as follows:         </p><pre class="codeinput"><span class="comment">%=== inference with B = t</span>evNode = B;evValue = t;[n1, e1, A1, a1] = bnMsgPassUpdate(nodes, edges, [], [], evNode, evValue);<span class="keyword">for</span> i = 1:n    disp([<span class="string">'P('</span> nodeNames{i}, <span class="string">'|B=t) = '</span> num2str(n1(i).P(1))]);<span class="keyword">end</span><span class="comment">%== plot and compare</span>figure(); subplot(2,1,1);x = cat(1,nodes.P);bar(x, <span class="string">'stacked'</span>); set(gca, <span class="string">'xticklabel'</span>, nodeNames);ylabel(<span class="string">'Probability'</span>);title(<span class="string">'Initialized network with empty evidence set'</span>)legend({<span class="string">'true'</span>, <span class="string">'false'</span>}, <span class="string">'location'</span>, <span class="string">'SouthEastOutside'</span>)hold <span class="string">on</span>; subplot(2,1,2);x1 = cat(1,n1.P);bar(x1, <span class="string">'stacked'</span>); set(gca, <span class="string">'xticklabel'</span>, nodeNames);ylabel(<span class="string">'Probability'</span>);title(<span class="string">'Updated network with evidence B=true'</span>)legend({<span class="string">'true'</span>, <span class="string">'false'</span>}, <span class="string">'location'</span>, <span class="string">'SouthEastOutside'</span>)</pre><pre class="codeoutput">P(S|B=t) = 0.55556P(B|B=t) = 1P(L|B=t) = 0.16889P(X|B=t) = 0.11796</pre><img vspace="5" hspace="5" src="lungbayesdemo_04.png"> <p>With the observation that the patient has bronchitis (<tt>B = t</tt>), the probability of a true condition for all other nodes has increased. In particular, the probability of smoking history            increases because smoking is one leading cause of chronic bronchitis. In turn, because smoking is also associated with lung            cancer, the probability of lung cancer increases and so does the probability of an abnormal chest x-ray test.         </p>         <p>Suppose the patient has not been evaluated for bronchitis but the chest x-ray shows some abnormalities. We instantiate <tt>X = t</tt> and we intialize again the network with the new evidence.         </p><pre class="codeinput">evNode = X;evValue = t;[n2, e2, A2, a2] = bnMsgPassUpdate(nodes, edges, [], [], evNode, evValue);<span class="keyword">for</span> i = 1:n    disp([<span class="string">'P('</span> nodeNames{i}, <span class="string">'|X=t) = '</span> num2str(n2(i).P(1))]);<span class="keyword">end</span></pre><pre class="codeoutput">P(S|X=t) = 0.67927

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产免费久久精品| 一区二区三区欧美久久| 欧美四级电影在线观看| 国产一区二区0| 日本色综合中文字幕| 亚洲欧美乱综合| 国产亚洲精品7777| 日韩欧美国产三级| 欧美日韩中文另类| 91香蕉视频mp4| 国产99精品国产| 免费成人在线网站| 日韩专区一卡二卡| 亚洲午夜久久久久| 夜夜揉揉日日人人青青一国产精品| 中文字幕在线观看不卡| 精品国产91九色蝌蚪| 91精品国产综合久久久久久漫画 | 国产精品一区二区果冻传媒| 午夜精品久久久久久久久久| 亚洲精品视频在线| 亚洲人123区| 中文字幕日韩欧美一区二区三区| 国产亚洲一区二区三区| 久久亚洲精精品中文字幕早川悠里 | 国产成人亚洲精品青草天美| 美女一区二区视频| 蜜臀av性久久久久蜜臀av麻豆| 一区二区三区四区高清精品免费观看| 国产精品第13页| 国产精品麻豆久久久| 国产日本欧洲亚洲| 国产三区在线成人av| 久久久亚洲精品一区二区三区 | 精品一二三四在线| 久久99久久久久久久久久久| 日韩和欧美一区二区| 视频一区在线视频| 日本aⅴ精品一区二区三区| 视频一区免费在线观看| 亚洲第一搞黄网站| 日本vs亚洲vs韩国一区三区 | 欧美三级电影精品| 67194成人在线观看| 欧美一级在线视频| 精品国产精品一区二区夜夜嗨| 欧美一区二区三区四区久久| 日韩美女天天操| 久久精子c满五个校花| 欧美国产精品专区| 亚洲欧美成aⅴ人在线观看| 一区二区三区欧美久久| 亚洲一区二区三区视频在线| 日韩精品视频网站| 国产精品一卡二卡在线观看| 成人国产免费视频| 欧洲精品一区二区三区在线观看| 欧美午夜理伦三级在线观看| 日韩三级伦理片妻子的秘密按摩| 久久久久久久精| 亚洲欧美激情小说另类| 午夜久久久影院| 国产露脸91国语对白| 97se亚洲国产综合自在线 | 欧美一区二区三区在线看| 日韩亚洲欧美在线| 欧美高清在线一区二区| 一区二区免费在线播放| 久久精品国产网站| 一本大道久久a久久综合| 欧美一区二区二区| 国产精品国产精品国产专区不片 | 成人综合婷婷国产精品久久蜜臀| 91麻豆精东视频| 日韩一区二区三| 中文字幕精品在线不卡| 五月天亚洲精品| 国产成人三级在线观看| 欧美日韩精品综合在线| www国产精品av| 一区二区三区日韩精品| 韩国三级中文字幕hd久久精品| 91免费观看在线| 精品国产一区二区亚洲人成毛片| 亚洲人成小说网站色在线| 久久精品久久99精品久久| 91蜜桃免费观看视频| 日韩亚洲欧美成人一区| 亚洲男人的天堂av| 国产一区二区三区国产| 欧美日韩国产大片| 国产精品每日更新| 精品一区二区三区蜜桃| 欧美情侣在线播放| 亚洲你懂的在线视频| 国产在线国偷精品产拍免费yy| 欧美三区在线观看| 国产精品乱码一区二三区小蝌蚪| 久久99国产精品久久| 欧美日韩不卡一区| 亚洲美女偷拍久久| 成人黄色小视频在线观看| 欧美www视频| 日韩精品三区四区| 欧美中文字幕一区二区三区| 国产精品久线观看视频| 韩国视频一区二区| 日韩一级黄色大片| 亚洲高清免费观看| 色综合视频一区二区三区高清| 久久精品一区二区三区不卡| 美女一区二区视频| 欧美一级日韩一级| 午夜免费久久看| 欧美亚男人的天堂| 亚洲激情av在线| 99在线视频精品| 国产精品国产三级国产aⅴ原创| 国产一区二区三区久久久| 日韩精品中文字幕一区| 美女诱惑一区二区| 欧美大肚乱孕交hd孕妇| 日本午夜一区二区| 777午夜精品视频在线播放| 午夜a成v人精品| 欧美日韩一区中文字幕| 午夜精品视频一区| 欧美二区在线观看| 亚洲成人精品影院| 欧美日韩亚洲综合在线| 亚洲午夜国产一区99re久久| 欧美午夜精品理论片a级按摩| 亚洲精品老司机| 欧美视频在线一区| 亚洲高清免费在线| 欧美一区二区三区日韩| 久久99精品久久久久久动态图 | 久久精品一区二区三区不卡| 国产伦理精品不卡| 欧美国产欧美综合| 99在线精品一区二区三区| 亚洲三级视频在线观看| 色天使色偷偷av一区二区| 亚洲一区二区三区影院| 51精品国自产在线| 九九视频精品免费| 日本一区二区三区高清不卡| k8久久久一区二区三区| 亚洲视频你懂的| 精品视频1区2区| 免费在线观看日韩欧美| 久久久精品tv| 色婷婷久久久综合中文字幕| 亚洲国产wwwccc36天堂| 欧美一区二区三区喷汁尤物| 国产在线麻豆精品观看| 成人欧美一区二区三区白人 | 国产精品视频一二| 一本到不卡精品视频在线观看| 亚洲福利一二三区| 精品国产百合女同互慰| kk眼镜猥琐国模调教系列一区二区| 亚洲一线二线三线视频| 欧美videofree性高清杂交| 成人深夜视频在线观看| 亚洲国产精品久久久久婷婷884 | 亚洲美女偷拍久久| 这里只有精品99re| 国产福利一区二区三区视频在线 | 7777精品伊人久久久大香线蕉的 | 91看片淫黄大片一级在线观看| 亚洲一区二区综合| 久久综合狠狠综合| 欧美午夜一区二区三区免费大片| 精品一区二区三区蜜桃| 一区二区三区精品久久久| 精品国产一区二区精华| 色av一区二区| 国产经典欧美精品| 亚洲va欧美va天堂v国产综合| 久久欧美一区二区| 欧美三级韩国三级日本三斤| 国产不卡一区视频| 日韩主播视频在线| 亚洲欧美日韩中文字幕一区二区三区| 91精品麻豆日日躁夜夜躁| 不卡免费追剧大全电视剧网站| 日本最新不卡在线| 亚洲美女视频在线| 国产欧美中文在线| 欧美一区二区三区在线| 99精品久久免费看蜜臀剧情介绍| 久久99热国产| 天天av天天翘天天综合网色鬼国产| 国产欧美日韩另类一区| 日韩精品一区二区三区视频播放| 欧美主播一区二区三区美女| av成人免费在线| 国产精品1024| 韩国精品免费视频|