Question: Do the following tasks ( in exact sequence ) using the HW 4 _ DataA data: B - 1 . / 5 marks /

Do the following tasks (in exact sequence) using the "HW4_DataA" data: B-1./5 marks/: Read and display the data given in HW4_DataA. Describe both the numeric and categorical attributes. Refer to Table 8.5.2 for the data description. B-2./12.5 marks: 2.5 each/: Do the necessary pre-processing. In specific do the following: a. Normalize the numeric attributes using min-max normalization scheme. D. Perform ordinal (label) encoding for the ordinal attribute (education _level). Use dictionary for the ordinal encoding. The order is as follows starting from the lowest: {High School, Associate's, Bachelor's, Master's, Doctoral; C. Perform one hot encoding for the categorical attributes (gender, and marital ststus) d. For occupation feature, encode student to 0 and all other choices to 1(do not forget to convert the type to integer). e. Perorfm label encoding for the class (loan _status). B-3./10 marks: 2.5 each/: a. Split the dataset into training and testing sets using train_test_ split function with 75% for training and 25% for training using random state =10. b. Build a decision tree classifier for predicting the class label. Fit the classifier using the training dataset. Set random state to 100, criterion to entropy, and splitter to best. C. Draw the decision tree using scikit-learn (sklearn) d. Test the classifier on the testing data set, and print the confusion matrix and classification metrics (Accuracy, sensitivity (Recall), Precision) of the decision tree classifier. B-4.17.5 marks: 2.5 each/: Using the same dataset split in B-3.a a. Build a Random Forest classifier for predicting the class label with & trees. Fit the classifier using the training set. Set criterion to entropy and random_ state to 62. b. Draw the trees using sci-kit learn (sklearn) C. Test the classifier on the testing data set, and print the confusion matrix and classification metrics (Accuracy, sensitivity (Recall), Precision) of the Random forest classifier. B-5./10 marks: Calculate the Information Gain (IG) for the class variable "loan_status" given the feature "education _level" as a root node. B-6./10 marks: From the decision tree built in B-3, write a classification rule using the normalized values first then return it to the original values. B-7./10 marks): Write two association rules for " gender -> education level", which rule has the highest accuracy? Write the corresponding support and accuracy. B-8./10 marks/: Repeat parts b, c, and d in B-3 using the Nave Bayes GaussianNB classifier. B-9./5 marks/: Compare the performance of the Nave Bayes against the built decision tree and random forest classifiers using confusion matrix. Based on the comparison, which one is the best to use with the given data set? PLEASE solve all the parts
Do the following tasks ( in exact sequence )

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 Programming Questions!