Computer Science > Research Paper > Georgia Institute Of TechnologyCS 6601submission.py (All)
import sys ''' WRITE YOUR CODE BELOW. ''' from numpy import zeros, float32 # pgmpy Use the following as the name attribute: "alarm","faulty alarm", "gauge","faulty gauge", "temperature". (for t... he tests to work.) """ BayesNet = BayesianModel() # Adding nodes BayesNet.add_node("alarm") BayesNet.add_node("faulty alarm") BayesNet.add_node("gauge") BayesNet.add_node("faulty gauge") BayesNet.add_node("temperature") ## Adding edges BayesNet.add_edge("faulty alarm", "alarm") return BayesNet def set_probability(bayes_net): """Set probability distribution for each node in the power plant system. Use the following as the name attribute: "alarm","faulty alarm", "gauge","faulty gauge", "temperature". (for the tests to work.) """ cpd_fa = TabularCPD('faulty alarm', 2, values=[[0.85], [0.15]]) ## faulty alarm cpd_t = TabularCPD('temperature', 2, values=[[0.80], [0.20]]) ## temperature cpd_fgt = TabularCPD('faulty gauge', 2, values=[[0.95, 0.20], \ [0.05, 0.80]], evidence=['temperature'], evidence_card=[2]) ## Faulty gauge cpd_gtfg = TabularCPD('gauge', 2, values=[[0.95, 0.20, 0.05, 0.80], \ [0.05, 0.80, 0.95, 0.20]], evidence=['temperature', 'faulty gauge'], evidence_card=[2, 2]) ## gauge ringing in the [Show More]
Last updated: 1 year ago
Preview 1 out of 7 pages
Connected school, study & course
About the document
Uploaded On
Jun 10, 2021
Number of pages
7
Written in
This document has been written for:
Uploaded
Jun 10, 2021
Downloads
0
Views
44
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·