Topic: Internet of Things

Topic: Internet of Things

Outline for Presentation

  • Define your topic and its associated ethical dilemma (ethical values or principles)
  • Identify the facts: Stake holders, activity, actions, laws (or lack of)
  • Briefly outline two or three options / solutions and their consequences (intended and unintended)
  • Thoughtful discussion questions or prompts to engage the class to discuss the conflict or dilemma 
  • What did you find surprising about this issue or the class discussion???
  • Last word:  Your opinion and justification…any changes from discussion input.
 
 
Also write the research paper with the same content

pseudocode and a flowchart

Instructions Part 1: Pseudocode and Flowchart You’ll create both a pseudocode and a flowchart to design a mobile app. The app will write the device’s latitude and longitude to a file each time the device’s location changes. Use the techniques discussed in Section 3.3 and Chapter 10 of your textbook to write the latitude and longitude to the file as a record.
to create the flowchart. Write your pseudocode in a plain-text editor such as Notepad or TextEdit, and save as a text file (*.txt). Also, save a screenshot of your flowchart as a JPEG file (*.jpg).

FINAL PAPER

COSC 418: FINAL PAPER

THE ASSIGNMENT

Write a 7-10 pp. paper (or 1750 to 2500 words, not counting works cited) that takes a position informed

by research on the ethical dilemma(s) associated with the case study you explored in steps 1-4.

Include a Works Cited page (done in MLA format) with at least ten sources consulted to learn more

about not only the case but any associated issues; at least five of your sources should be secondary

critical resources in a peer-reviewed journal or scholarly study of some kind (many academic

publishers have removed their paywalls in light of COVID-19 circumstances, so it might oddly enough be

easier to download relevant research articles and that alone would be an interesting topic of its own).

When directly quoting or summarizing a source, you can then use in-text citations, given the

bibliographic information will be in the concluding works cited page.

MLA STYLE (in a nutshell) + OTHER SOURCING TIPS

Go to a wonderfully clear website sponsored by the online writing and learning (OWL) center at Purdue

University: http://owl.english.purdue.edu/owl/resource/747/01 .

This link will take you directly to the MLA Handbook. In the menu on the left side, click first on “MLA

Formatting Quotations,” and look at how quotations should be integrated into your prose (these rules

apply for any essay you will write). Next, click on “MLA In-Text citations: The Basics,” and review it

carefully, taking special note of where the punctuation goes when you are dealing with parenthetical

notes. And finally, click on the types of citation you need to format for your Works Cited.

Do also note that any MS Word processing program has a “REFERENCES” tab in the menu ribbon at top

of page that can also guide you through the logistics of citing sources (no matter the format or style

guide). The TU Cook library can also help you access resources, as they do have subscriptions to

databases and services, which means your netlogin ID will enable you to download and see items that

might not otherwise be possible to access: https://libraries.towson.edu/ . Additionally, I on occasion

discover students are not aware of the google scholar search engine, which is a good shorthand way to

find peer-reviewed articles (the regular google search engine has no consistent way to prioritize quality

scholarly sources in their search ranking results pages): https://scholar.google.com/ .

If you now in retrospect understand the case takes up topics relevant to specific textbook chapters, you

have key terms and existing debates and perspectives to factor in how you go about explaining your

position and researching the case further, too.

HOW CASE STUDY STEPS 1-4 ENABLES A WORKING DRAFT TO TAKE SHAPE

Case study steps 1-4 enabled us to lay the groundwork for researching a topic in greater depth after

focusing on a particular case and the various associated issues it raises; we also considered how the

philosophical frameworks covered at start of term bear ongoing relevance to how one would analyze

and reason through broader consequences and impacts.

For the final paper, you will now be attempting to formulate an argumentative thesis statement that

serves as a kind of answer to the ethical dilemma question you posed in the second step of the case

study process and that you further refined into conclusions drawn in step four. If you have rethought

 

 

the question or shifted focus after additional research and reflection as the semester proceeded, that’s

fine and should be expected to be an integral part of any process of critical inquiry and learning. Step

three prompted us to sort out how the ethical dilemma question shifted in emphasis, depending on the

philosophical framework at stake, and it could be that further research and ongoing things learned in

the class or through the scholarship of others prompted you to reconsider your thinking. A virtue of an

education is that you can and may adapt and reconsider your thinking when discovering additional

evidence that enables a deeper understanding of a topic. What matters most for writing an effective

paper would be that you are able to explain your reasoning with sufficient evidence and examples that

demonstrate the points made. However, it’s also important to be open-minded about how a “fact” can

be framed or reframed to misdirect attention or to focus on something that does not capture in fuller

complexity how or why a situation has resulted in other ethical considerations. As the tech sector too

frequently takes the position of “move fast and break things!” this kind of deeper, holistic thinking will

be a skill highly valued moving forward in your career and life, no matter what new-fangled technology

comes onto the scene and no matter whatever short-sighted justifications might be used to limit

opportunities to rethink the issues and situations at stake.

CONSIDER THE SOURCE

You listen to a heated discussion on the issues. You hear politicians, celebrities, and pundits bandying

opinions in the media. You explore the tech reviews or opinion pages in a magazine. You browse a blog.

In all of these experiences, you probably do not accept opinions, or even what’s presented as fact,

without some discrimination, some sense of considering the source.

By the same token, when asked to collect research for a paper, you can’t enter the library or use a

search engine with the idea that every source is equally respectable and authoritative. Even assuming

that you’ve narrowed down your topic and are exploring articles that seem relevant, which ones make

the best sources? With so much information available, how do you judge?

STARTING POINTS FOR EVALUATION

Timeliness: Use the most recent statistics you can find. If your source isn’t recent, then consider

whether the ideas/opinions/facts need to be understood differently based on the time that’s passed.

Author: What’s the educational and work experience of the author that lends authority to the

argument? What else has this person published, and was it well reviewed? Is there any personal

experience that affects this person’s point of view, making them a more immediate and useful source or

which contributes to potential partiality in views?

Institutional endorsement, publication, so forth: What connection does the

author/publication/webpage have to universities, hospitals, businesses (including tech companies),

government agencies, museums, or other well-recognized institutions that carry weight or which might

affect the point of view expressed?

THE WILD WEST OF WEB RESOURCES

The Modern Language Association’s (MLA) eighth edition (2016) recommends that modern-day citation

practices follow a few principles rather than inventing new rules for each web portal or other emergent

technologies.

 

 

MLA recommends that you cite basic traits shared by most works; the following template identifies the

core elements generally included — though all may not always apply, it depends on other source context

factors:

 

Author

Title of Source

Title of Container

Other Contributors

Version

Number

Publisher

Publication date

Location

 

ASSESSING SOURCES ON WEBSITES

A starting point for evaluating websites can be understanding how general top-level domain names (or

gTLDs) work. Here’s a shortlist, by no means comprehensive:

 .edu means the site comes from an educational source (though you need to assess whether it’s

a random student’s website, something backed by the university or a scholar’s own academic

page).

 .gov indicates government websites, which usually can be reliable for data and information

about an issue. Some, however, of course support the agency that supports them or might have

tacit political assumptions that determine what is or isn’t publicly shared. The county

commission’s website won’t criticize the county government, for example.

 .org indicates non-profit status, which may make it an advocacy group of some kind.

Information is intended to support a point of view, so just make sure that you’re aware of what

that is and the reputation of the group. Their arguments may or may not be non-partisan and

useful, but check their data sources no matter what!

 .com addresses are usually selling something. They might still have useful information, but be

wary and understand these are not scholarly sources.

If you wish to learn more about how that internet naming system continues to evolve in purpose and

use, you may take with a grain of salt another source, the Wikipedia entry for gTLDs:

https://en.wikipedia.org/wiki/Generic_top-level_domain

BOTTOM LINE: be careful, precise and thoughtful whenever and wherever you engage sources.

DOCUMENTATION & LINKS

• Does the source cite its own sources or are these varied and evenly engaged? Do you detect any

lack of credibility or bias?

• Are there critical reviews or links that lend credibility?

LOOKING MORE CLOSELY

 

 

Purpose: What’s the agenda? Look at the title, headlines, table of contents and preface. Find a thesis

statement, skim the text, and read the conclusion. Is it informative, persuasive, propaganda? Is there an

inherent bias that makes the source unreasonable or that must be considered when you present this

source?

Audience: You might reject a source because it’s too simple or too complex in its language or meaning,

which might mean that you and your audience don’t match its intended audience. Also, understanding

the intended audience can often help you understand the purpose of the piece.

Basic Quality: Does the writing itself seem intelligent? Is this a well-balanced, well-researched source

which, whether it remains objective or not, seems willing to discuss all sides of the issue? Is it clear

enough that you feel confident you fully understand it and won’t misunderstand it or take something

out of context?

Any Deceptive Practices?: A source might appear factual while actually camouflaging the truth. Read

carefully for logical fallacies, and for outright deception. For example, you see a graph that at a glance

seems to show no disparity, but when you look more closely, the unit of measurement is unreasonably

large. Likewise, a graph might seem to show a marked upward trend, but actually, the Y axis measures

only between 30% and 40%, so that vertical only shows a 7% increase! Or, you check an endnote to

learn that the vague accusation you nearly believed has no valid evidence, or that the test group had a

minute sampling. So many ways to manipulate evidence!

THE POINT IS: you’re not only looking for what will carry authority, you’re also making sure that you are

aware of any bias or perspective that might be relevant to the argument. Ideally, your statistical sources

will be based in data or measured facts of some kind, but these and other sources can be used for some

agenda. So, before you utilize a source, you have to understand it. For example, your argument

promoting holistic medicine might rely heavily upon interviews with practitioners and patients who have

experience. However, you don’t want your source to be the flyer promoting a new “remedy”. Choose, if

possible, someone whose lengthy experience is touted, whose practices and writings have some support

from a well-recognized medical facility. Recognize also that statistics published by a major mainstream

drug company might serve that company’s purposes.

Write Well! When in doubt, feel free to ask questions!

Do not use any format other than an attached Microsoft PowerPoint file. Adhere to the ‘7X7 Rule’. You are to include at least one visual accompaniment

Do not use any format other than an attached Microsoft PowerPoint file. Adhere to the ‘7X7 Rule’. You are to include at least one visual accompaniment (e.g., graph, table, image) and to make use of the ‘Notes’ section for additional detail.

· Cover (1 slide)

· Topic (1 slide)

· Background of the Problem (1 slide)

· Research Questions (1 slide)

· Methodology(-ies) and Design(s) (2 slides)

· Data Analysis (2 slides)

· Conclusions (1-2 slides)

· Professional Application (1 slide)

References (1-2 slides)

 Nearing the end of the semester, it is now time for students to reflect on the knowledge obtained in their course(s) and determine the effectiveness of incorporating real-world experience into our academic curriculum.  

Nearing the end of the semester, it is now time for students to reflect on the knowledge obtained in their course(s) and determine the effectiveness of incorporating real-world experience into our academic curriculum.
Students should;

  • Be able to apply knowledge and theory gained in their courses of study within current workplace or in their future employment.
  • Be able demonstrate the application of theory to workplace in written form.
  • Be able to identify the benefits of incorporating real-world experience into an academic program.

Requirement for the Reflection:Students will reflect on the connection between knowledge concepts for courses they are enrolled for the current semester and how those have been, or could be, applied in the workplace.

  • If you are enrolled in two course plus INTR your reflection should be a minimum of 400 words.
  • If any outside content or resources are used, proper APA citations and references are required.

My courses for this semester:

  1. Database Systems
  2.  Human Comput Inter & Usability

three problems (problems identified must be from the software engineering perspective, do NOT discuss from the general ethics perspective)

Write your review in a Word file using Times New Roman font (no smaller than 10 pt but no bigger than 12 pt), single spacing, 1″ margins on all sides, single spacing, and the paper’s length is at least 1 page but no more than 2 pages. Any direct quotes from the movie, header, or footer do not count into the length of the paper.

In the midterm paper, you need to identify at least three problems (problems identified must be from the software engineering perspective, do NOT discuss from the general ethics perspective) that could have been avoided if a good software development method is applied in “Office Space”.

  1. Identify three problems related to software engineering and describe what the consequences of these problems are respectively; (4 points)
  2. Explain what actions you, as a member working on a software project, would have taken in order to avoid those problem respectively; (4 points)
  3. Describe if your actions (described above) are related to any knowledge that you learned from the first 4 modules of this semester. (2 points)

Can someone help me with this?

Can someone help me with this?

​​​​​​​Points: 100 Topics: MaxHeap, array resizing For this assignment you will: - represent a heap using the struct defined at theFormat of test files: where the first 2 lines specify an array of \( \mathrm{N} \) integers and the next 2 lines specify \( \1. Write your name at the top of each .c file you submit and use good coding style: indentation, variable names. Points will

heap.h
#ifndef HEAP_H
#define	HEAP_H

struct heap_struct {
	int* items;
	int N;  // current size
	int capacity; // array capacity
};

// max-heap operations

struct heap_struct make_heap_empty(int cap);

// assumes arr was dynamically allocated. 
struct heap_struct make_heap(int N, int * arr); // makes a max-heap from arr. Asssumes both size and capacity are N.

// Will free the heap array.
void destroy(struct heap_struct * heapP);

void print_heap(struct heap_struct heapS);

void sink_down(int i, int N, int * arr);
void swim_up(int idx, int * arr);

int peek(struct heap_struct heapS);
int poll(struct heap_struct * heapP);
void add(struct heap_struct * heapP, int new_item);// will resize the heap if needed


#endif	/* HEAP_H */

heap_calls.c

/* compile: 
gcc -g heap_calls.c heap.c
run:
./a.out 

Valgrind:
valgrind --leak-check=full ./a.out 
 * 
 */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "heap.h"  

int main()   {
	int N,k,i;
	char fname[501];
	int debug = 0;
	struct heap_struct heapS;
	printf("This program will call the heap functions.\n ");   
   

	N = 3;
	int *arr = (int*) calloc(N, sizeof(int) );
	arr[0] = 10;
	arr[1] = 20;
	arr[2] = 43;

	heapS = make_heap(N, arr);         
	print_heap(heapS);
	
	printf("removed: %6d\n", poll(&heapS) );	
	print_heap(heapS);

	printf("peek:    %6d\n", peek(heapS) );
	print_heap(heapS);

	printf("add:     %6d\n", 17);	
	add(&heapS, 17);
	print_heap(heapS);
	
	printf("removed: %6d\n", poll(&heapS) );	
	print_heap(heapS);

	printf("removed: %6d\n", poll(&heapS) );	
	print_heap(heapS);
   
	destroy(&heapS);   
	printf("After call to destroy (1)\n");
	print_heap(heapS);
   
	heapS = make_heap_empty(11);
	printf("Created empty heap: \n");
	print_heap(heapS);
	
	printf("add:     %6d\n", 204);	
	add(&heapS, 204);
	print_heap(heapS);	

	destroy(&heapS);   
	printf("After call to destroy(2)\n");
	print_heap(heapS);

	destroy(&heapS);   
	printf("After call to destroy(3)\n");
	print_heap(heapS);
	
	return 0;
}
heap_calls.c heap.c
gcc -g heap_calls.c heap.c
valgrind --leak-check=full ./a.out
==185== Memcheck, a memory error detector
==185== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==185== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==185== Command: ./a.out
==185==
This program will call the heap functions.
 in function make_heap, in DEBUG MODE, printing array BEFORE it gets turned into a heap :
Heap:  size: 3, capacity : 3
indexes:           0,      1,      2,
values:           10,     20,     43,

in function make_heap, in DEBUG MODE, printing array after sink_down at index 0.
Heap:  size: 3, capacity : 3
indexes:           0,      1,      2,
values:           43,     20,     10,

Heap:  size: 3, capacity : 3
indexes:           0,      1,      2,
values:           43,     20,     10,

removed:     43
Heap:  size: 2, capacity : 3
indexes:           0,      1,
values:           20,     10,

peek:        20
Heap:  size: 2, capacity : 3
indexes:           0,      1,
values:           20,     10,

add:         17
Heap:  size: 3, capacity : 3
indexes:           0,      1,      2,
values:           20,     10,     17,

removed:     20
Heap:  size: 2, capacity : 3
indexes:           0,      1,
values:           17,     10,

removed:     17
Heap:  size: 1, capacity : 3
indexes:           0,
values:           10,

After call to destroy (1)
Heap:  size: 0, capacity : 0
indexes:
values:

Created empty heap:
Heap:  size: 0, capacity : 11
indexes:
values:

add:        204
Heap:  size: 1, capacity : 11
indexes:           0,
values:          204,

After call to destroy(2)
Heap:  size: 0, capacity : 0
indexes:
values:

After call to destroy(3)
Heap:  size: 0, capacity : 0
indexes:
values:

==185==
==185== HEAP SUMMARY:
==185==     in use at exit: 0 bytes in 0 blocks
==185==   total heap usage: 3 allocs, 3 frees, 1,080 bytes allocated
==185==
==185== All heap blocks were freed -- no leaks are possible
==185==
==185== For lists of detected and suppressed errors, rerun with: -s
==185== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
heap.c
​​​​​​​#include <stdlib.h>
#include <stdio.h>

#include "heap.h"  

#define DEBUG 1

/*
struct heap_struct make_heap_empty(int cap){
}

struct heap_struct make_heap(int N, int * arr){
}

void destroy(struct heap_struct * heapP){
}


void print_heap(struct heap_struct heapS){
}


void swim_up(int idx, int * arr){
}


void sink_down(int i, int N, int * arr){
}

void add(struct heap_struct * heapP, int new_item){
}

int peek(struct heap_struct heapS){
}


int poll(struct heap_struct * heapP){
}

*/

all_opt.txt

5
10 40 20 50 90
6
13 * 82 p P *

empty.txt

2
10 40
10
* * * * 12 * 85 39 * *

resize.txt

2
10 40
9
5 -6 85 1 2 3 4 5 6 

// run all_opt.txt example

gcc -g run_test.c heap.c
valgrind --leak-check=full ./a.out
==170== Memcheck, a memory error detector
==170== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==170== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==170== Command: ./a.out
==170==
This program will create a max-heap and perform operations on it based on data from a file.

Enter the filename: all_ops.txt
in function make_heap, in DEBUG MODE, printing array BEFORE it gets turned into a heap :
Heap:  size: 5, capacity : 5
indexes:           0,      1,      2,      3,      4,
values:           10,     40,     20,     50,     90,

in function make_heap, in DEBUG MODE, printing array after sink_down at index 1.
Heap:  size: 5, capacity : 5
indexes:           0,      1,      2,      3,      4,
values:           10,     90,     20,     50,     40,

in function make_heap, in DEBUG MODE, printing array after sink_down at index 0.
Heap:  size: 5, capacity : 5
indexes:           0,      1,      2,      3,      4,
values:           90,     50,     20,     10,     40,

Heap:  size: 5, capacity : 5
indexes:           0,      1,      2,      3,      4,
values:           90,     50,     20,     10,     40,

Operation number 1, string: 13
add:          13

resizing
Heap:  size: 6, capacity : 10
indexes:           0,      1,      2,      3,      4,      5,
values:           90,     50,     20,     10,     40,     13,

Operation number 2, string: *
removed:     90
Heap:  size: 5, capacity : 10
indexes:           0,      1,      2,      3,      4,
values:           50,     40,     20,     10,     13,

Operation number 3, string: 82
add:          82
Heap:  size: 6, capacity : 10
indexes:           0,      1,      2,      3,      4,      5,
values:           82,     40,     50,     10,     13,     20,

Operation number 4, string: p
peek:        82
Heap:  size: 6, capacity : 10
indexes:           0,      1,      2,      3,      4,      5,
values:           82,     40,     50,     10,     13,     20,

Operation number 5, string: P
peek:        82
Heap:  size: 6, capacity : 10
indexes:           0,      1,      2,      3,      4,      5,
values:           82,     40,     50,     10,     13,     20,

Operation number 6, string: *
removed:     82
Heap:  size: 5, capacity : 10
indexes:           0,      1,      2,      3,      4,
values:           50,     40,     20,     10,     13,

==170==
==170== HEAP SUMMARY:
==170==     in use at exit: 0 bytes in 0 blocks
==170==   total heap usage: 6 allocs, 6 frees, 6,676 bytes allocated
==170==
==170== All heap blocks were freed -- no leaks are possible
==170==
==170== For lists of detected and suppressed errors, rerun with: -s
==170== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

This document will cover two aspects:

This document will cover two aspects:

1. The values to be attached to the probability tables, and

2. The formulae to be used to compute the probabilities that are required.

Probability table specification In total there are 16 nodes for the Car diagnosis Bayesian network. This means that 16 probability tables are

required. These tables must be assigned values according to the specifications below.

1. Battery age table

ba _y 0.2 ba_n 0.8

2. Alternator broken table

ab_y 0.1 ab_n 0.9

3. Fanbelt broken table

fb_y 0.3 fb_n 0.7

4. Battery dead table

ba_y_bd_y 0.7 ba_y_bd_n 0.3 ba_n_bd_y 0.3 ba_n_bd_n 0.7

Note that this table represents conditional probabilities. Thus for example, the row ba_y_bd_y=0.2 should be

interpreted as the Pr(battery being dead|battery is aged) is 0.2. All other tables below which have more than two

rows also happen to represent conditional probabilities.

 

 

5. No charging table

ab_y_fb_y_nc_y 0.75

ab_y_fb_n_nc_y 0.4

ab_n_fb_y_nc_y 0.6 ab_n_fb_n_nc_y 0.1 ab_y_fb_y_nc=n 0.25 ab_y_fb_n_nc=n 0.6 ab_n_fb_y_nc=n 0.4 ab_n_fb_n_nc=n 0.9

6. Battery meter table

bd_y_bm_y 0.9 bd_y_bm_n 0.1 bd_n_bm_y 0.1 bd_n_bm_n 0.9

7. Battery flat table

bd_y_nc_y_bf_y 0.95

bd_y_nc_n_bf_y 0.85

bd_n_nc_y_bf_y 0.8 bd_n_nc_n_bf_y 0.1 bd_y_nc_y_bf_n 0.05 bd_y_nc_n_bf_n 0.15 bd_n_nc_y_bf_n 0.2 bd_n_nc_n_bf_n 0.9

8. No oil table

no _y 0.05 no_n 0.95

9. No gas table

ng _y 0.05 ng_n 0.95

10. Fuel line blocked table

fb _y 0.1 fb_n 0.9

 

 

11. Starter broken table

sb _y 0.1 sb_n 0.9

12. Lights table

l_y_bf_y 0.9 l_n_bf_y 0.3 l_y_bf_n 0.1 l_n_bf_n 0.7

13. Oil lights table

bf_y_no_y_ol_y 0.9

bf_y_no_n_ol_y 0.7

bf_n_no_y_ol_y 0.8 bf_n_no_n_ol_y 0.1 bf_y_no_y_ol_n 0.1 bf_y_no_n_ol_n 0.3 bf_n_no_y_ol_n 0.2 bf_n_no_n_ol_n 0.9

14. Gas gauge table

bf_y_ng_y_gg_y 0.95

bf_y_ng_n_gg_y 0.4

bf_n_ng_y_gg_y 0.7 bf_n_ng_n_gg_y 0.1 bf_y_ng_y_gg_n 0.05 bf_y_ng_n_gg_n 0.6 bf_n_ng_y_gg_n 0.3 bf_n_ng_n_gg_n 0.9

15. Car won’t start table

This table has 64 rows. There are 3 cases to consider:

1. For every combination of bf, no, ng, fb, sb with at least one of these variables taking the value y, the

probability is 0.9 for the cs_n outcome.

2. For the case when all 5 variables bf, no, ng, fb, sb take the value n with cs_n. In this case the probability is 0.1

 

 

3. The remaining case is when cs_N. The probabilities are now defined as the complement of the probabilities

of the first 32 rows. That is if the probability is p for the first row then it is (1-p) for the 33rd row, if it is q for

row 2 then it is (1-q) for row 34 and so on.

Note this table must be encoded in the graph with 64 rows and each row should have a probability as specified

above.

16. Dipstick low table

no_y_dl_y 0.95 no_n_dl_y 0.3 no_y_dl_n 0.05 no_n_d_n 0.7

Formulae for computation of probabilities In addition to the discussion below you are strongly advised to refer to the class notes on Bayesian learning.

Let us illustrate the computation of the probabilities by taking R2 as an example.

For R2 you are asked to compute P(-cs, +ab, +fb) – this is the joint probability that the car does not start whenever

both the alternator and fan belt are not functioning at the same time.

To understand how this is done, let us first look at a simpler situation.

P(+c, +a, +b) = P(+c|+a, +b)*P(+a)*P(+b)

Using this as a guide we can now work out P(-cs, +ab, +fb)

This project will expose you to inference using Bayesian networks.

Purpose:  

This project will expose you to inference using Bayesian networks. Bayesian networks capture causal relationships and are widely used in fault diagnosis across a wide variety of applications. A Bayesian network can be represented by a directed graph which will model causal relationships between variables. A useful tool to represent and traverse a graph is NetworkX (NetworkX — NetworkX documentation) which contains a comprehensive library of graph types and graph algorithms written in Python. The application that we will be targeting is Car fault diagnosis which was introduced in class. The fundamental issue in such diagnosis applications is to discover the causes or underlying reasons for the fault to occur and to rank these reasons in terms of their importance.

In this application we will be exploring the reasons behind: a) the car not starting and the probability that this event takes place; and b) under what conditions the car battery becomes flat and the likelihood of this occurring.

Project Requirements:

R1

Use Networkx in Google Colab and represent the network as shown below:

Attach probability tables to each node as specified in the Project 3 discussion document. Visualize the network using Networkx and show the nodes and edges. You do not have to show the probability tables you created but this of course will be embedded in your code. The coloring used in the figure above does not need to be reproduced. Instead, use a neutral color of blue to shade the nodes. Make sure that your edges show directionality.

R2

Compute the probability P (-cs, +ab, +fb)

R3

Compute the probability P (-cs, +ab)

R4

Compute the probability P(-cs, +fb)

R5

For the battery going flat, which of the factors is more important, battery dead or not charging?

Note:

  1. Use the starter code provided for this project. This is essential as many of you will not be familiar with NetworkX.
  2. I strongly recommend that you read the Project 3 Discussion Document as it covers not just the probability

The values to be attached to the probability tables,

This document will cover two aspects:

1. The values to be attached to the probability tables, and

2. The formulae to be used to compute the probabilities that are required.

Probability table specification In total there are 16 nodes for the Car diagnosis Bayesian network. This means that 16 probability tables are

required. These tables must be assigned values according to the specifications below.

1. Battery age table

ba _y 0.2 ba_n 0.8

2. Alternator broken table

ab_y 0.1 ab_n 0.9

3. Fanbelt broken table

fb_y 0.3 fb_n 0.7

4. Battery dead table

ba_y_bd_y 0.7 ba_y_bd_n 0.3 ba_n_bd_y 0.3 ba_n_bd_n 0.7

Note that this table represents conditional probabilities. Thus for example, the row ba_y_bd_y=0.2 should be

interpreted as the Pr(battery being dead|battery is aged) is 0.2. All other tables below which have more than two

rows also happen to represent conditional probabilities.

 

 

5. No charging table

ab_y_fb_y_nc_y 0.75

ab_y_fb_n_nc_y 0.4

ab_n_fb_y_nc_y 0.6 ab_n_fb_n_nc_y 0.1 ab_y_fb_y_nc=n 0.25 ab_y_fb_n_nc=n 0.6 ab_n_fb_y_nc=n 0.4 ab_n_fb_n_nc=n 0.9

6. Battery meter table

bd_y_bm_y 0.9 bd_y_bm_n 0.1 bd_n_bm_y 0.1 bd_n_bm_n 0.9

7. Battery flat table

bd_y_nc_y_bf_y 0.95

bd_y_nc_n_bf_y 0.85

bd_n_nc_y_bf_y 0.8 bd_n_nc_n_bf_y 0.1 bd_y_nc_y_bf_n 0.05 bd_y_nc_n_bf_n 0.15 bd_n_nc_y_bf_n 0.2 bd_n_nc_n_bf_n 0.9

8. No oil table

no _y 0.05 no_n 0.95

9. No gas table

ng _y 0.05 ng_n 0.95

10. Fuel line blocked table

fb _y 0.1 fb_n 0.9

 

 

11. Starter broken table

sb _y 0.1 sb_n 0.9

12. Lights table

l_y_bf_y 0.9 l_n_bf_y 0.3 l_y_bf_n 0.1 l_n_bf_n 0.7

13. Oil lights table

bf_y_no_y_ol_y 0.9

bf_y_no_n_ol_y 0.7

bf_n_no_y_ol_y 0.8 bf_n_no_n_ol_y 0.1 bf_y_no_y_ol_n 0.1 bf_y_no_n_ol_n 0.3 bf_n_no_y_ol_n 0.2 bf_n_no_n_ol_n 0.9

14. Gas gauge table

bf_y_ng_y_gg_y 0.95

bf_y_ng_n_gg_y 0.4

bf_n_ng_y_gg_y 0.7 bf_n_ng_n_gg_y 0.1 bf_y_ng_y_gg_n 0.05 bf_y_ng_n_gg_n 0.6 bf_n_ng_y_gg_n 0.3 bf_n_ng_n_gg_n 0.9

15. Car won’t start table

This table has 64 rows. There are 3 cases to consider:

1. For every combination of bf, no, ng, fb, sb with at least one of these variables taking the value y, the

probability is 0.9 for the cs_n outcome.

2. For the case when all 5 variables bf, no, ng, fb, sb take the value n with cs_n. In this case the probability is 0.1

 

 

3. The remaining case is when cs_N. The probabilities are now defined as the complement of the probabilities

of the first 32 rows. That is if the probability is p for the first row then it is (1-p) for the 33rd row, if it is q for

row 2 then it is (1-q) for row 34 and so on.

Note this table must be encoded in the graph with 64 rows and each row should have a probability as specified

above.

16. Dipstick low table

no_y_dl_y 0.95 no_n_dl_y 0.3 no_y_dl_n 0.05 no_n_d_n 0.7

Formulae for computation of probabilities In addition to the discussion below you are strongly advised to refer to the class notes on Bayesian learning.

Let us illustrate the computation of the probabilities by taking R2 as an example.

For R2 you are asked to compute P(-cs, +ab, +fb) – this is the joint probability that the car does not start whenever

both the alternator and fan belt are not functioning at the same time.

To understand how this is done, let us first look at a simpler situation.

P(+c, +a, +b) = P(+c|+a, +b)*P(+a)*P(+b)

Using this as a guide we can now work out P(-cs, +ab, +fb)