| 173 | |
| 174 | |
| 175 | def visualize(self, ssler, x, y) : |
| 176 | |
| 177 | res = [] |
| 178 | |
| 179 | paths = ["MachineLearningAlgorithm/KNN/Pictures/raw_andrews_curves.png", |
| 180 | "MachineLearningAlgorithm/KNN/Pictures/raw_heatmap.png", |
| 181 | "MachineLearningAlgorithm/KNN/Pictures/raw_parallel_coordinates.png", |
| 182 | "MachineLearningAlgorithm/KNN/Pictures/raw_radviz.png", |
| 183 | "MachineLearningAlgorithm/KNN/Pictures/raw_scatter.png", |
| 184 | "MachineLearningAlgorithm/KNN/Pictures/result.png"] |
| 185 | |
| 186 | for pa in paths : |
| 187 | |
| 188 | with open(pa, 'rb') as f: |
| 189 | data = base64.b64encode(f.read()) |
| 190 | |
| 191 | res.append(str(data)) |
| 192 | |
| 193 | return res |