Question: You must demonstrate following 5 matplotlib related skills for data visualisation. To complete this task, write a function called task 4 ( data ) ,

You must demonstrate following 5 matplotlib related skills for data visualisation. To complete this task, write a
function called task4(data), where data contains all records from the dataset. The function should display
the following plots. The presentation of the visualisations (e.g., customising labels, points etc.) will determine
your fluency in data visualisation skills.
i. Plot Amount values using bar plot for transactions where IP_validity_score is below 2 and
Authentication_score is below 1.5. Use different colours for normal and malicious
transactions.
ii. Extract data from malicious transactions for different Type_of_card separately and display their
total Amount using a pie plot. Number of different Type_of_card will vary.iii. Extract data from all transactions for different Entry_mode separately and display the
IP_validity_score values using a boxplot. Number of different Entry_mode will vary.
iv. Create a N X 2 matrix where N is number of transactions in the dataset, 2 is the index for
Authentication_score and IP_validity_score values. Plot the matrix using scatter plot.
v. Create a colour code using the values in the matrix created in QV Task 1(pca). Plot
Authentication_score values where values are over 8 as a bar plot using the corresponding
colour codes. [You can use the rounded value of pca to create the colours].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!