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
Move the appropriate file types from the list on the left to the correct descriptions on the right.
File Types (Icons)
XE
F
E
4
Answer Area
A file where you create the user interface
allowing you to display information and react to
user input.
A file that contains all the setup information for
your app.
A file that contains coded app logic.
A file that contains a list of available resources
to be used in the project.
arrow_forward
The most popular resume format is the
Chronological format
Direct format
Function format
Indirect format
How do you rename a table?
Right click the object tab in the access window, and the click rename
Right click the table in the navigation plane, and then click rename
Click the table in the navigation pane, and then click the rename button
Open the table in table datasheet view, and then click the rename button
T or F
**A résumé sent by e-mail should not be accompanied by a cover message.
arrow_forward
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
Python question please include all steps and screenshot of code. Also please provide a docstring, and comments throughout the code, and test the given examples below. Thanks.(Use Table Below)
The following table lists various Python container types in the first column, andproperties that they may or may not have in the following columns. (Note: I havecompleted the table.) But if a question like this appears on the exam you will have tocomplete this table by writing YES in each cell if that data structure has that property, orNO if it does not
Ordered
Mutable
Iterable
Allows duplicate values
tuple
yes
no
yes
no
dictionary
no
yes
yes
no
set
no
no
yes
no
list
yes
yes
yes
yes
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
Search Algorithms
Dataset: We will use cars dataset as part of this project. The dataset is available as part of the assignment (cars.csv and a pdf that describe each of the fields for each record).
TASK 1
The idea of this project is to create a text-based application with the following options:
List all cars. This option will read from the file and when the user selects this option, the program will list all the cars in the file.
Find via Linear search. This option will allow the user to type a model of the car (ID field in the dataset) and it should print out the information about the car searched, the amount of time it took to find the car using linear search. For this option, create a class called SearchMethods and implement the method :
public static <T extends Comparable<T>> int linearSearch(T[] data, int min, int max, T target)
Find via Binary search. This option will allow the user to type a model of the car (ID field in the dataset) and it…
arrow_forward
Article Link:
https://www.mdpi.com/2304-6740/11/2/65Write a summary about the article
- Summarize the main idea/point(s)
- Please include excerpts from the article to emphasize a point, but it must be cited as an in-text citation. E.g. "Quote." (Author's lat name page) For example, (John 6)
arrow_forward
USING PYTHON: Create a Python class, Document.
Upon initialization, the instances of this class will take in one optional string parameter, initial_thoughts, which defaults to an empty string if not given during instance creation. In
addition, the instances of this class will also have the following attributes:
Input Format
Assume the inputs are user inputs that are valid commands and can access the attributes or invoke a method of the Document instance.
Constraints
String arguments when creating a Document instance and when invoking the add_words method will be limited to 1000 characters at maximum.
Output Format
The output will be composed of seven lines with the first 2 lines showing some information about the Document object and the next 5 lines showing the current values of the instance attributes.
Sample Input 0
essay Document ("I gotta start with something.")
exit
Sample Output 0
This Document instance has 4 instance attributes.
The class used to create this object has 5 methods…
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
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 PROGRAMMING!!
EXTRA CONSTRAINT: MAKE SURE THAT THE CODE ACCEPTS THE INPUT ON THE IMAGE AND OUTPUTS THE RESULT ON THE IMAGE AS WELLYou find yourself in a top-secret mission to infiltrate and disable the nuclear missile silos of a terrorist organization threatening to destroy any country that refuses to surrender. Fortunately, an ally double agent was able to successfully hijack the launch system used by the terrorists. However, in order to not get found out, they could not disable the system outright but they were able to infect the system with an undetectable virus that stops all processes of the system was activated.
Through a secure line, the double agent gives you the instructions in order to activate the virus and stop all missiles from firing:
In the trash can nearest the main computer, you should be able to get a crumpled piece of paper with a grid of random numbers printed onto it. You will know that it is the right piece of paper if there are the same number of rows and…
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
Javascript help please,
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
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
1. The timeclock.txt file contains the hours worked data for every employee as well as the shift they worked. The layout for the file is as follows:
EMPLOYEE NUMBER, HOURS WORKED, SHIFT
2. The personnel.txt file contains the names of all employees and their hourly pay rates. The layout for the file is as
follows:
EMPLOYEE NUMBER, EMPLOYEE NAME, PAY RATE Note: Both the timeclock.txt and payroll.txt files are pre-sorted by EMPLOYEE NUMBER in ascending order.
Business Rules
1. For hours <= 40, the employee gross pay is: HOURS WORKED PAY RATE 2. For hours> 40, the employee gross pay is: HOURS WORKED PAY RATE 1.5
3. For shift 3, add $1 per hour to the employee pay rate
The program should:
1. Download both input files in the same folder that you will create your .py program.
2. Read both input files together.
3. Match the input files by the EMPLOYEE NUMBER.
4. For each record in the timesheet.txt file, write a record in a new output file named payroll,txt based on the business rules…
arrow_forward
HW2b: R Exercises 1
Complete R Swirl 2 first! It will help you in this assignment!
Instructions: Write one R script title HW26.R that contains your answers to problems 1- 5. At the top of
the script write your name in a comment. Label each problem number using a comment and then type the
code that solves that problem. Here's an example of the script format (where you should fill in the R code to
solve each problem):
1
# Your Name
# Assignment
3 , # Thu Feb 03 07:39:07 2022
2
4
5
# 1.
6
7
type the R commands
solve problem 1
9.
# 2.
10
11
type the R commands to solve problem 2
12
13
# 3.
|14
15
etc.
1. What are the arguments for the Sequence Generation function seq() and give an example. Hint, use
the methods you have learned to search for help in RStudio.
2. Use R as a calculator to compute the following values.
а.
27(38-17)
b.
In(147)
436
V
С.
12
3. Create the following vectors in R and use R commands to answer the questions.
а 3 (5, 10, 15, 20, ..., 160)
b = (87, 86, 85,..., 56)
arrow_forward
GUI using tkinker (Python)
- Challenge Activity 1: Student Information Display ToolWrite a Python program (GUI App) that requests the following information from user and displays it: ∙ Student name∙ Student address, with suburb, state, and post code∙ Student telephone number ∙ Student Course
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
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
- Move the appropriate file types from the list on the left to the correct descriptions on the right. File Types (Icons) XE F E 4 Answer Area A file where you create the user interface allowing you to display information and react to user input. A file that contains all the setup information for your app. A file that contains coded app logic. A file that contains a list of available resources to be used in the project.arrow_forwardThe most popular resume format is the Chronological format Direct format Function format Indirect format How do you rename a table? Right click the object tab in the access window, and the click rename Right click the table in the navigation plane, and then click rename Click the table in the navigation pane, and then click the rename button Open the table in table datasheet view, and then click the rename button T or F **A résumé sent by e-mail should not be accompanied by a cover message.arrow_forwardfiles 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
- Python question please include all steps and screenshot of code. Also please provide a docstring, and comments throughout the code, and test the given examples below. Thanks.(Use Table Below) The following table lists various Python container types in the first column, andproperties that they may or may not have in the following columns. (Note: I havecompleted the table.) But if a question like this appears on the exam you will have tocomplete this table by writing YES in each cell if that data structure has that property, orNO if it does not Ordered Mutable Iterable Allows duplicate values tuple yes no yes no dictionary no yes yes no set no no yes no list yes yes yes yesarrow_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_forwardSearch Algorithms Dataset: We will use cars dataset as part of this project. The dataset is available as part of the assignment (cars.csv and a pdf that describe each of the fields for each record). TASK 1 The idea of this project is to create a text-based application with the following options: List all cars. This option will read from the file and when the user selects this option, the program will list all the cars in the file. Find via Linear search. This option will allow the user to type a model of the car (ID field in the dataset) and it should print out the information about the car searched, the amount of time it took to find the car using linear search. For this option, create a class called SearchMethods and implement the method : public static <T extends Comparable<T>> int linearSearch(T[] data, int min, int max, T target) Find via Binary search. This option will allow the user to type a model of the car (ID field in the dataset) and it…arrow_forward
- Article Link: https://www.mdpi.com/2304-6740/11/2/65Write a summary about the article - Summarize the main idea/point(s) - Please include excerpts from the article to emphasize a point, but it must be cited as an in-text citation. E.g. "Quote." (Author's lat name page) For example, (John 6)arrow_forwardUSING PYTHON: Create a Python class, Document. Upon initialization, the instances of this class will take in one optional string parameter, initial_thoughts, which defaults to an empty string if not given during instance creation. In addition, the instances of this class will also have the following attributes: Input Format Assume the inputs are user inputs that are valid commands and can access the attributes or invoke a method of the Document instance. Constraints String arguments when creating a Document instance and when invoking the add_words method will be limited to 1000 characters at maximum. Output Format The output will be composed of seven lines with the first 2 lines showing some information about the Document object and the next 5 lines showing the current values of the instance attributes. Sample Input 0 essay Document ("I gotta start with something.") exit Sample Output 0 This Document instance has 4 instance attributes. The class used to create this object has 5 methods…arrow_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
- In type over or replace mode, the software moves the rest of the document to the right as you type new material. True Falsearrow_forwardPYTHON PROGRAMMING!! EXTRA CONSTRAINT: MAKE SURE THAT THE CODE ACCEPTS THE INPUT ON THE IMAGE AND OUTPUTS THE RESULT ON THE IMAGE AS WELLYou find yourself in a top-secret mission to infiltrate and disable the nuclear missile silos of a terrorist organization threatening to destroy any country that refuses to surrender. Fortunately, an ally double agent was able to successfully hijack the launch system used by the terrorists. However, in order to not get found out, they could not disable the system outright but they were able to infect the system with an undetectable virus that stops all processes of the system was activated. Through a secure line, the double agent gives you the instructions in order to activate the virus and stop all missiles from firing: In the trash can nearest the main computer, you should be able to get a crumpled piece of paper with a grid of random numbers printed onto it. You will know that it is the right piece of paper if there are the same number of rows and…arrow_forwardPython codearrow_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