|
|
Algorithm 2 Drug resistance classification algorithm |
|
| 1: |
repeat |
| 2: |
Randomly choose m vectors from SQV group, the rest n being training data |
| 3: |
Construct dictionary J using Algorithm 1 |
| 4: |
Randomly choose m vectors from none group, the rest n being training data |
| 5: |
Construct dictionary K using Algorithm 1 |
| 6: |
for each vector v in testing data do
|
| 7: |
computing the sparse representation of v using both dictionaries J and K
|
| 8: |
computing the representation errors using the two dictionaries |
| 9: |
if the error of using J is larger then |
| 10: |
v is resistant to SQV |
| 11: |
else
|
| 12: |
v is NOT resistant to SQV |
| 13: |
end if
|
| 14: |
end for
|
| 15: |
Compute the confusion matrix |
| 16: |
until For 9 times |
|