Question: 2 Biomedical applications of machine learning and computational modeling Name 2 examples of biomedical applications in which you might use a binary classifier; contrast each
Biomedical applications of machine learning and computational modeling
Name examples of biomedical applications in which you might use a binary classifier; contrast each of those two examples to an example of regression in a similar biomedical application.
Nearest neighbor binary classification
Suppose we are developing a text reader for the visually impaired. We will start off with detecting numbers, in particular we will try to detect the numeral In this exercise you will use knearest neighbors to classify whether a digit is a or not.
Load the UCI ML handwritten digits dataset from sklearn using loaddigits
Examine the data. eg determine how are the handwritten numerals stored? Use imshow to view a random sample of handwritten digits. Understand what the targets are for this dataset and again how they are stored.
Using a split, train a knearest neighbors classifier to correctly classify s reserving for the testing. First split the data, reserving for testing. Use a randomstate of
Now create the appropriate binary target array.
Plot a sample of digits say the first along with the target value above it
Now try applying your classifier to the test data. Show the prediction for the same samples you showed above.
How accurate was your classifier? Show the confusion matrix for your classifier.
Try KNN for different numbers of neighbors through How does the accuracy change? Show
the true positive rate and false positive rate. How does this compare with your expectation
based on your understanding of the KNN algorithm? If it does not match your expectation,
comment on some possible explanations.
Kmeans classifier
In this section, you will apply the Kmeans classifier to determine whether a given digit is a or
not a
How many classes are there in this problem? Let's define this as nClass
Apply Kmeans using nClass clusters.
Compare the performance of the binary KNN classifier with a binary Kmeans classifier.
Now try Kmeans using dots,from through clusters. Compare the correct
classification rate for each k value. Which seems to be the optimal number of clusters?
Explain with code
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
