AIGS 1002 Assignment 4
.docx
keyboard_arrow_up
School
Loyalist College *
*We aren’t endorsed by this school
Course
1002
Subject
Computer Science
Date
Dec 6, 2023
Type
docx
Pages
1
Uploaded by DeaconMosquito4213
AIGS 1002 – Assignment 4
Due: Tuesday December 6
th
, 2022
Professor: Regan Tracey
This assignment consists of 5 questions
for a total of 50 points.
Please answer questions on paper or typed on word and upload python file separately
o
If you are not using Jupyter notebook, please copy and paste your code to a word document
outlining the answers for each question.
Make sure all steps are demonstrated in your solutions for full marks.
To upload your assignment to the submission folder on blackboard, you will need to either scan your
written solutions or simply upload your word document and python file to the drop box.
Please email me if you have any questions at
rctracey@loyalistcollege.com
Question 1 (10 points):
Given coefficients β
0
= -1.7684 and β
1
= 0.21783, calculate the joint likelihood for this data in Python.
Question 2 (10 point):
(a)
Given coefficients β
0
= -1.7684, β
1
= 0.21783 and x = 3, calculate the following:
1.
Logistic function, p
2.
Odds
3.
Log-it
4.
Log-Odds
(b) Explain the relationship between log-it and log-odds.
Question 3 (10 points):
Given coefficients β
0
= -1.7684 and β
1
= 0.21783.
(a)
What is the probability someone quits their job between ten days, x
1
=10 and 20 days, x
2
= 20?
(b) Calculate the odds ratio and explain.
Question 4 (10 points):
Draw a confusion matrix and identify where the true positive, true negative, false positive and false
negatives lie.
Question 5 (10 points):
(a)
Given the following confusion matrix, calculate sensitivity and precision.
[
6
3
4
5
]
(b)
What is the probability of successfully identifying a true positive.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
files for the work: https://mega.nz/file/AEJQFZIT#IKKIb5DD9h-5fHiWzEAIg8Lm60syggKnAwL1fqQQ168
Therefore, you should have print statements only where it is explicitly mentioned in the assignment. If you have additional print statements, make sure they are all converted to comments before you submit the assignment. Page 4 of 12 Assignment # 4 Due: Nov. 27th 11:00 PM 1. Text File Format Download the zipped file Files_for_A4 from Brightspace. When you will extract this zipped file you should find the following text files in the folder. The sample text files (datafile) are aTaleOfTwoCities.txt, harry.txt, harryPotter.txt, and invisibleMan.txt. You may assume that the words of the text files are separated by spaces (* ') and newline characters ( *\n'). You will be using these text files to do the analysis. There are two additional files (wordfile) named positivewords.txt and negativewords.txt; each of these files contains a sequence of words (one word per line) and these words will be…
arrow_forward
Write the Java statement to create an instance of a Rectangle with a width of 4 and a length of 8.
Edit View Insert Format Tools Table
arrow_forward
Please do not give solution in image formate thanku
Reflection Essay
Write a short essay (at least 500 words) for each reflection essay to reflect upon their learning experiences on Threat Intelligence, Computer Forensics, and Cyber Terrorism . A separate paragraph should be written for each point, and the topic needs to be marked clearly at the beginning of the paragraph.
arrow_forward
2. Design the form as follow:
File
Edit
View
Git
Project
Build
Debug
Format
Test
Analyze
Tools
Debug
Any CPU
> Start -
Form1.vb*
Form1.vb [Design]" X
o Sales App
Month
Enter the sales of each day in the month
Read
Sales in a month:
O Note:
- Add the following to the form:
a. Three buttons
b. Two labels
c. One textboxe
d. One listBox
- Give appropriate names to the form, and controls
Server Explorer Toolbox
arrow_forward
Online form design truths * Many replies Participation will improve dialogue. Default if most users pick it. For speedy form reading, use brief, informative labels. Z-pattern form fields speed up form input.
arrow_forward
In type over or replace mode, the software moves the rest of the document to the right as you type new material.
True
False
arrow_forward
Python code
arrow_forward
None
arrow_forward
Using the base block material cards #4, #13 and #16 as needed, add the following using Base blocks: 184 + 259. Show all work using the correct method on your handwritten work/answer sheet.
B
F
L
U
1
8
4
+
2
5
9
Submit QuestionQuestion 1
arrow_forward
Make android application using java and xml.
above there should be option either to click on details (shows any message) or exit (By clicking this, program should exit)
Fill the form.
insert data (name, contact, country (in Spinner) )
2 buttons (Submit (on clicking submit button, Alert Message shows Data submitted) and Show Data (Show data in another activity in list view)
arrow_forward
A bucket list is a collection of goals, dreams, and aspirations that you would like to accomplish within your lifetime. The purpose of this assignment is to develop a program that allows the user to manage their personal bucket list and save it to an XML file bucketlist.xml. For full credit, run the program and create a file with at least three entry elements. Submit a document containing a copy of the source file, a screenshot of the program in action, and the contents of the XML file. File Structure Below is the basic structure (i.e. schema) for the XML file. You may add additional elements. <bucketList> <entry> <rank></rank> <description></description> <status></status> </entry> </bucketList> Note: Before running the program, manually create an XML input file with at least one entry element that contains values in each child element. GUI Requirements At a minimum, your GUI must meet the below requirements. No minimize…
arrow_forward
Answer as soon as possible please
Web Programming Question
Create a complete PHP application with two (2) input fields to input five (5) username and its password into an MyUser [] array using adduser() function and a submit button using post method. Display the contents of the MyUser[] array after all the inputs.
arrow_forward
Please help me with these two questions. I am having trouble understanding what to do
Just provide the code. Use Js, css, and html
Thank you
arrow_forward
RECTANGLE PROBLEM
Enter Length:
Enter Width:
Area:
Perimeter:
Area
Perimeter
|Both
Clear
1. Add JavaScript to the square problem such that it computes the area, perimeter
or both when the length and width are given and the appropriate button is pressed.
Make sure to make all buttons functional. Rename to exam4sample21.html
Input File:
Output File:
rectangle.html
exam4sample21.html
2. Add input validation such that the proper error is generated when the input
field is not a number. Rename to exam4sample22.html
Use input form validation as follows:
onclick="if(isInteger(ʻinputl')) compute('inputl');"
function isInteger(id)
var flag=true;
var x=document.getElementById(id);
if (x.value==nuii || x.value=="")
else if (x.value==")
else if (isNaN (x.value))
else if ((parseFloat (x.value))$1 !=® ) { alert("Value Is Not An Integer");flag=false;}
return flag:
{ alert("Integer Field Empty");flag=false;}
i alert("Value Not A Number"); flag=false;}
Input File:
Output File:
exam4sample21.html…
arrow_forward
Submission Instructions
Follow the instructions for How to Submit Programming Assignments.
Assignment
First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ==> Close All Projects).
Then create a new Java application called "PatternMaker" (without the quotation marks) according to the following guidelines.
The program prompts the user for five input values:
An integer value between 1 and 10 (inclusive) for the number of rows to be printed
A second integer value between 1 and 10 (inclusive) for the number of columns to be printed
A string value for the starting string of the pattern
A string value for the second string of the pattern
A string value that separates the first two strings
The program must use nested for loops to print a rectangular array of alternating first and second strings of the pattern, separated by the separator string and such that the first string in the first row uses the "first string" provided by the user, but…
arrow_forward
Create a Java code
arrow_forward
C# programming Question 6
Help of any input, output and comments would be appreciated!
arrow_forward
Murach's javascript and Jquery 4th edition (ch9 animation)
I need help with this assignment, please. thanks
Modify a carousel to use animationIn this exercise, you’ll modify a carousel application so that when an image in the carousel is clicked, an enlarged image is displayed using animation.1. Open the application in this folder:carouselThen, run the application and notice that an enlarged image of the first book in the carousel is displayed.2. Review the HTML for the application, and notice that it contains an img element with an id of “image” following the heading. Also notice that the href attributes of the <a>elements in the carousel are set to the URL of the enlarged image to be displayed when the associated carousel image is clicked.3. Code an event handler for the click event of the <a> elements in the list. This event handler should start by getting the URL for the image to be displayed. Then, it should assign this URL to the enlarged image.4. Add animation to…
arrow_forward
Course name: data structures and algorithems
arrow_forward
Develop a Java GUI application that will display the petrol cost per litre for three different cities with a time span of three years.
On the form create a list box, to allow a user to select between three different cities. Also create a combo box for the user to select the year. Finally add a submit button. Once the user has selected a city, year and clicked the submit button display the petrol price per litre for that year. Use the following table for the city and yearly petrol prices per litre:
2017
2018
2019
Johannesburg
10.72
10.35
10.20
Durban
12.75
12.32
12.22
Cape Town
13.70
13.31
13.23
You are also required to create a menu system which will allow the user to exit the application under the file menu. Under the tools menu allow the form submission and option to display the average yearly petrol price report. The layout of the form is left to your discretion. Marks will be allocated to the presentation and effectiveness of the layout, but the following layout is…
arrow_forward
Python question please include all steps and screenshot of code. Also please provide a docstring, and comments through the code, and test the given examples below. Thanks.
If there is a vote at a meeting, there are several possible outcomes based on the numberof yes and no votes (abstains are not counted). If all the votes are yes, then the proposalpasses "unanimously", if at least 2/3 of the votes are yes, then the proposal passes with"absolute majority", if at least 1/2 of the votes are yes, then the proposal passes by"simple majority", and otherwise it fails. Write function vote() that takes as input thenumber of yes votes and the number of no votes and then prints the outcome of the vote.>>> votes(9, 0)proposal passes unanimously>>> votes(6, 3)proposal passes with absolute majority>>> votes(5, 4)proposal passes with simple majority>>> votes(4, 5)
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Related Questions
- files for the work: https://mega.nz/file/AEJQFZIT#IKKIb5DD9h-5fHiWzEAIg8Lm60syggKnAwL1fqQQ168 Therefore, you should have print statements only where it is explicitly mentioned in the assignment. If you have additional print statements, make sure they are all converted to comments before you submit the assignment. Page 4 of 12 Assignment # 4 Due: Nov. 27th 11:00 PM 1. Text File Format Download the zipped file Files_for_A4 from Brightspace. When you will extract this zipped file you should find the following text files in the folder. The sample text files (datafile) are aTaleOfTwoCities.txt, harry.txt, harryPotter.txt, and invisibleMan.txt. You may assume that the words of the text files are separated by spaces (* ') and newline characters ( *\n'). You will be using these text files to do the analysis. There are two additional files (wordfile) named positivewords.txt and negativewords.txt; each of these files contains a sequence of words (one word per line) and these words will be…arrow_forwardWrite the Java statement to create an instance of a Rectangle with a width of 4 and a length of 8. Edit View Insert Format Tools Tablearrow_forwardPlease do not give solution in image formate thanku Reflection Essay Write a short essay (at least 500 words) for each reflection essay to reflect upon their learning experiences on Threat Intelligence, Computer Forensics, and Cyber Terrorism . A separate paragraph should be written for each point, and the topic needs to be marked clearly at the beginning of the paragraph.arrow_forward
- 2. Design the form as follow: File Edit View Git Project Build Debug Format Test Analyze Tools Debug Any CPU > Start - Form1.vb* Form1.vb [Design]" X o Sales App Month Enter the sales of each day in the month Read Sales in a month: O Note: - Add the following to the form: a. Three buttons b. Two labels c. One textboxe d. One listBox - Give appropriate names to the form, and controls Server Explorer Toolboxarrow_forwardOnline form design truths * Many replies Participation will improve dialogue. Default if most users pick it. For speedy form reading, use brief, informative labels. Z-pattern form fields speed up form input.arrow_forwardIn type over or replace mode, the software moves the rest of the document to the right as you type new material. True Falsearrow_forward
- Make android application using java and xml. above there should be option either to click on details (shows any message) or exit (By clicking this, program should exit) Fill the form. insert data (name, contact, country (in Spinner) ) 2 buttons (Submit (on clicking submit button, Alert Message shows Data submitted) and Show Data (Show data in another activity in list view)arrow_forwardA bucket list is a collection of goals, dreams, and aspirations that you would like to accomplish within your lifetime. The purpose of this assignment is to develop a program that allows the user to manage their personal bucket list and save it to an XML file bucketlist.xml. For full credit, run the program and create a file with at least three entry elements. Submit a document containing a copy of the source file, a screenshot of the program in action, and the contents of the XML file. File Structure Below is the basic structure (i.e. schema) for the XML file. You may add additional elements. <bucketList> <entry> <rank></rank> <description></description> <status></status> </entry> </bucketList> Note: Before running the program, manually create an XML input file with at least one entry element that contains values in each child element. GUI Requirements At a minimum, your GUI must meet the below requirements. No minimize…arrow_forwardAnswer as soon as possible please Web Programming Question Create a complete PHP application with two (2) input fields to input five (5) username and its password into an MyUser [] array using adduser() function and a submit button using post method. Display the contents of the MyUser[] array after all the inputs.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L