Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

iv . corr: Filter malicious transactions where Actual and Origin places are different. Calculate elementwise product between Authentication _ score and IP _ validation _

iv. corr: Filter malicious transactions where Actual and Origin places are different. Calculate
elementwise product between Authentication_score and IP_validation_score and then
perform correlation between the resultant vector and Amount column.
Output:
print(corr)=-0.06
v. pca: Create a N x 5 matrix where N is number of rows in the dataset and 5 is the number of
columns, we will call these features (Transaction_type, Entry_mode, Amount,
Authentication_score, and IP_validity_score)(before that you need to convert all
CITS 2401
Computer Analysis
and Visualisation
Page 3 of 6
string values to numerical values. You can assume there will always be 3 Transaction_type and
use the following values - ATM: 1, EFTPOS: 2, and Internet: 3 and four Entry_mode - Magnetic
Stripe: 1, Manual: 2, Chip Card Read: 3, and NFC: 4). Calculate principal component analysis (PCA)
to reduce the dimensionality of data to N X 1.
The algorithm for PCA is:
a) Standardize the data along all the features (subtract mean and divide by standard deviation
over the feature dimension).
b) Calculate the covariance matrix for the features
c) Perform eigen decomposition on the covariance matrix to get eigenvectors (principal
components) and eigenvalues
d) Sort the eigenvectors based on their eigenvalues from highest to lowest
e) Select top k eigenvectors (k=1)
f) Transform the data using the selected eigenvectors (dot product of eigenvectors and
Standardized data in step a)
Output:
print(pca.shape)=(10000,1)
print(pca[0:5])=[0.73,0.81,0.7,0.93,0.72]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

Why are graphical aggregate planning methods useful?

Answered: 1 week ago

Question

Define facework and identify three primary facework strategies

Answered: 1 week ago