Question: you will need to implement the code in evaluation.py file to load your classifiers ( i . e . , SvmClassifier.sav / RfClassifier.sav ) via
you will need to implement the code in evaluation.py file to load your classifiers ie SvmClassifier.sav RfClassifier.sav via Pickle, predict the classes for the test cases using split in evaluation.py and print precision recall, specificity, confusion matrix, accuracy score as given in the pulsarclassification.py f
# import any required library to load dataset, open files os print confusion matrix and accuracy score
# Create test set if you like to do the split programmatically or if you have not already split the data at this point
# Load your saved model for dissadvantaged communities classification
#that you saved in dissadvantagedcommunitiesclassification.py via Pikcle
# Make predictions on testset created from step
# use predictions and testset Xtest classifications to print the following:
# confution matrix, accuracy score, precision, recall, specificity
# You can easily find the formulae for Precision, Recall, and Specificity online.
# Get and print confusion matrix
cm
# Below are the metrics for computing classification accuracy, precision, recall and specificity
TP cm
TN cm
FP cm
FN cm
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
