Try to read and understand the code above, now we work on a new data set drybean. Your…
- User
Try to read and understand the code above, now we work on a new data set dry_bean. Your tasks are:
load your data dry_bean_train.csv (used as training set with features and corresponding classes), dry_bean_test.csv (used as test set with only features), dry_bean_target.csv (used as ground truth for test set with target classes) from data folder. normalize your features (remember to combine the training set and test set,while doing normalization). reduce dimension of features by PCA, and visualize the training set using the first PC and the second PC. train KNN model using training set to find the best K, plotting the error line to visualize the choice of best K. predict the class label for your test set with trained knn, and visualize the predicted classes and traget classes. construct a confusion matrix for your results evaluate your results by its precision, recall and F1-scores.
- Assistant