Just wondering if anyone could guide, how to plot the misclassified samples (outliers) along with the original feature space using tsne
So T-SNE (just use .cpu().numpy() on the tensors and feed into sklearn’s TSNE) has the property that you need to provide all datapoints you want to project into a lower-dimensional space at fitting time.
So you would need to concatenate the samples you get, call fit_transform to get the projected points. These will be in the same order, so you can take apart the array into the various types of points for visualzation.
More recent approaches such as Isomap from sklearn or UMAP allow you to fit a model first and then pass additional data through it, though in the case of outliers, this might not be as neat.
Thanks very much, Thomas for the reply. I have plotted all the samples along with the misclassified samples, however, misclassified samples do not appear within the feature space, they are spread all around the feature space.