Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 . Tasks To begin, you need to define a main ( filename , filter _ value, type _ of _ card ) function that

2. Tasks
To begin, you need to define a main(filename, filter_value, type_of_card) function that will
read the dataset and store the transaction records in data and call the below functions to display appropriate
results.
Sample Input:
main('CreditCard_2024_Project2.csv', 'Port Lincoln', 'ANZ')
Task 1: Data Analysis using NumPy Mark: 15
Answer the following 5 NumPy related tasks for data analysis. These will require use of NumPy functions and
methods, matrix manipulations, vectorized computations, NumPy statistics, NumPy where function, etc. To
complete this task, write a function called task1(data, filter_value, type_of_card), where
CITS 2401
Computer Analysis
and Visualisation
Page 2 of 6
data contains all records from the dataset and filter_value is an area name and type_of_card is the
name of the card provider. The function should return a list containing values from the following questions.
Return all results rounded to two decimal points.
Input:
cos_dist, var, median, corr, pca = task1(data, 'Port Lincoln ', 'ANZ ')
output:
[0.06,1337142.45,[5.75,7.21],-0.06,[0.73,0.81,0.7,0.93,0.72,...]]
i. cos_dist: Calculate cosine distance between normal and malicious transactions based on
IP_validity_score.
Formula:
=1
(,)=
Output:
print(cos_dist)=0.06
ii. var: Filter transactions based on certain geographical area e.g. Port Lincoln and calculate and displ

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Survey of Accounting

Authors: Thomas Edmonds, Christopher, Philip Olds, Frances McNair, Bor

4th edition

77862376, 978-0077862374

Students also viewed these Databases questions

Question

Givens: Ho: 0.80 Ha: Answered: 1 week ago

Answered: 1 week ago