In order to apply k-means type deep learning to our protein sequence classification problem we will first leanrn new features with k-means. After that we can apply any classifier to the data. 1. Gather *all* proteins in our benchmarks. 2. Now we want to not cluster all proteins but we want to cluster substrings of each protein. We can call each substring a fragment. Suppose we have a protein sequence ACGTAGGGATA We set window size to 5 and set stride to 1. With this we get the fragments ACGTA CGTAG GTAGG TAGGG AGGGA GGGAT GGATA In this way we get fragments for each protein sequence in our benchmark. We convert each fragment into a feature vector with the mismatch kernel. Then we cluster everything with k-means. For our data we should set w = 30, s = 1, number of clusters k to be 1600. 3. From the clustering we will build new features for each protein sequence p. As an example suppose we did 10 clusters. This means we will have 10 new features. So how do we make features for protein p? f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 p: How do we get fi? Suppose sequence p has fragments p1, p2, p3, and p4. For each fragment we get a one-hot encoded vector, this means 1 in one dimension and 0 everywhere else. Suppose fragments p1, p2, p3, and p4 are in clusters f2, f4, f5, and f5. Then we their feature vectors would be p1: 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 p2: 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 p3: 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 p4: 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 We add these vectors to get the feature vector for protein p: p: 0, 1, 0, 1, 2, 0, 0, 0, 0, 0 4. Now that we have our new features we can apply any SVM classifier to the training and predict test. Note that in the above method we consider both training and test data, and that is fine because we are doing k-means (unsupervised learning) that doesn't require labels. This method is generally called "unsupervised pre-training". 5. Submit files in the same manner as in previous assignments to your course directory.