Reference no: EM132629483
Write a program to perform the following actions using Python Programming language with error handling and logs/outputs.
1. Read data1.txt, data2.xml and data3.json into data structures named data1, data2 and data3, respectively. Answer the following questions:
a. What are the data types in data1?
b. What are the data types in data2?
c. What are the data types in data3?
Ensure the data types in the data1, data2 and data3 structures conform to the data types described in theData Set Overview section.
2. Merge the three data sets into a single data set based on the ID attribute and mark duplicates. Answer the following question:
a. How many rows and columns are in the merged data set?
b. What columns in the merged data contain missing values?
c. How many duplicate records marked?
3. Create a new data set from the merge data set by removing any rows with missing values. Answer the following question:
a. How many rows are there in the new data set?
b. What percentage of rows contains "M" vs "R" in the Class attribute?
c. Calculate the minimum, 1st quartile, median, mean, 3rd quartile, maximum for the following attributes: V1, V2, V30, V40, V50 and V60.
4. For the 60 attributes V1, V2, ...V60, calculate the Pearson correlation for each pairwise combination of attributes? Note: Do not include pairs where the attribute is paired with itself, e.g., pairs V1 and V1, V2 and V2, ... should not be included.
a. What are the "Top 5" positively correlated attributes?
b. What are the "Top 5" negatively correlated attributes?
5. Generate the following plots:
a. Histogram for attribute V17
b. Boxplot of attribute V5 segregated by Class attribute
c. Scatter plot of attributes V17 vs V18. Color each point based on the value of the Class attribute.
6. Develop a predictive model. The response variable is Class. The set of possible explanatory variables are V1, V2, V3, ...V60. Use as many or as few(V1, to V10) of the explanatory variables as you deem necessary.
a. Fit prediction value
b. Accuracy value
Provide an assessment on the predictive model's performance.
7. Develop a predictive model. The response variable is Class. The set of possible explanatory variables are V1, V2, V3, ...V60. Use as many or as few (V1, to V40) of the explanatory variables as you deem necessary.
a. Fit prediction value
b. Accuracy value
Provide an assessment on the predictive model's performance.
8. Provide details of processing of columnsV1, V2, ... V60 in XML dataset.
a. What XML functions used to loop through records V1, V2, .... V60
b. How exceptions handled while processing XML dataset for invalid datatypes
9. Generate the following metrics outputs:
a. Data consistency checks metrics (e.g. count) for data1.txt, data2.xml and data3.json
b. Unique rows in the combined data set
Attachment:- test today to solve.rar