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

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 of those two examples to an example of regression in a similar biomedical application.
3 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 "3". In this exercise you will use k-nearest neighbors to classify whether a digit is a "3" or not.
1. Load the UCI ML handwritten digits dataset from sklearn (using load_digits).
2. Examine the data. e.g., determine how are the handwritten numerals stored? Use imshow to view a random sample of 10 handwritten digits. Understand what the targets are for this dataset and again how they are stored.
3. Using a \(80/20\%\) split, train a k-nearest neighbors classifier to correctly classify "3"s, reserving \(20\%\) for the testing. First split the data, reserving \(20\%\) for testing. Use a random_state of 211.
4. Now create the appropriate binary target array.
5. Plot a sample of digits (say the first 40) along with the target value above it.
6. 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 1 through 7. 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.
4 K-means classifier
In this section, you will apply the K-means classifier to determine whether a given digit is a 3 or
not a 3.
How many classes are there in this problem? Let's define this as nClass
Apply K-means using nClass clusters.
Compare the performance of the binary KNN classifier with a binary K-means classifier.
Now try K-means using 2,3,dots,10,11(from 2 through 11) clusters. Compare the correct
classification rate for each k value. Which seems to be the optimal number of clusters?
Explain with code
2 Biomedical applications of machine learning and

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!