当前位置: 首页>>代码示例>>C#>>正文


C# Domain.GetNodeByName方法代码示例

本文整理汇总了C#中Domain.GetNodeByName方法的典型用法代码示例。如果您正苦于以下问题:C# Domain.GetNodeByName方法的具体用法?C# Domain.GetNodeByName怎么用?C# Domain.GetNodeByName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Domain的用法示例。


在下文中一共展示了Domain.GetNodeByName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetBactermiaProbability

        /// <summary>
        /// Returns the probability of bacterimia in a patient
        /// </summary>
        /// <param name="dom">The Cpn network domain</param>
        /// <returns>The probability of bacterimia</returns>
        public float GetBactermiaProbability(Domain dom)
        {
            //Find bacteremia nodes in CPN
            DiscreteChanceNode dSepsisNode = (DiscreteChanceNode)dom.GetNodeByName("Bacteremia_total");
            DiscreteChanceNode dSepsisNode1 = (DiscreteChanceNode)dom.GetNodeByName("Bacteremia_total_1");
            DiscreteChanceNode dSepsisNode2 = (DiscreteChanceNode)dom.GetNodeByName("Bacteremia_total_2");

            List<float> results = new List<float>();

            results.Add(dSepsisNode.GetBelief((uint)1));
            results.Add(dSepsisNode1.GetBelief((uint)1));
            results.Add(dSepsisNode2.GetBelief((uint)1));

            float finalResult = 0f;

            foreach (float res in results)
            {
                if (res > finalResult)
                {
                    finalResult = res;
                }
            }

            return finalResult;
        }
开发者ID:Bulgrak,项目名称:PBA_SepsisTool,代码行数:30,代码来源:SepsisControllerBLL.cs

示例2: GetBeliefsOnSepsisNode

        public SepsisResult GetBeliefsOnSepsisNode(Domain dom)
        {
            SepsisResult result = new SepsisResult();
            //Find sepsis node in CPN
            DiscreteChanceNode dSepsisNode = (DiscreteChanceNode)dom.GetNodeByName("Sepsis_pu_em_gg_us_pn");
            //Read all states on sepsis node

            result.No = dSepsisNode.GetBelief((uint)0);
            result.Mild = dSepsisNode.GetBelief((uint)1);
            result.Moderate = dSepsisNode.GetBelief((uint)2);
            result.Severe = dSepsisNode.GetBelief((uint)3);
            result.Critical = dSepsisNode.GetBelief((uint)4);
            result.Bacterimia = GetBactermiaProbability(dom);
            dom.RetractFindings();
            return result;
        }
开发者ID:Bulgrak,项目名称:PBA_SepsisTool,代码行数:16,代码来源:SepsisControllerBLL.cs

示例3: DiscreteRangeNodeInitializeStatesAge

        /// <summary>
        /// Special case for age. Initializes age
        /// </summary>
        /// <param name="nodeID"></param>
        /// <param name="age"></param>
        /// <param name="dNode"></param>
        /// <param name="lookupList"></param>
        public void DiscreteRangeNodeInitializeStatesAge(int age, Domain dom, List<aDiscreteNodeRange> lookupList)
        {
            //Find the discrete node "age" in CPN
            DiscreteChanceNode dNode = (DiscreteChanceNode)dom.GetNodeByName("age");
            string nodeID = "age";
            //Find state to initialize
            string nodeState = GetStateToInitDNodeRange(nodeID, age, lookupList);

            //If value is null, don't initialize anything on the current node
            if (nodeState == null)
            {
                throw new Exception();
            }
            //Enter findings (evidence) in discrete node
            DiscreteNodeEnterFindings(dNode, nodeState);
        }
开发者ID:Bulgrak,项目名称:PBA_SepsisTool,代码行数:23,代码来源:SepsisControllerBLL.cs


注:本文中的Domain.GetNodeByName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。