I have the following code to plot my data using TSNE feature reduction algorithm in matlab
data=dlmread('features.txt');
meas=data(:,2:end);
species=data(:,1);
rng('default'); % for reproducibility
Y = tsne(meas,'Algorithm','exact','Distance','mahalanobis');
gscatter(Y(:,1),Y(:,2),species);
title('Mahalanobis');
However, by running it I have the following problem:
The covariance matrix for the Mahalanobis metric must be symmetric and positive definite.
Error in tsne (line 323) tempDistMat = pdist(X,distance);
Error in plotafeatures (line 7) Y = tsne(meas,'Algorithm','exact','Distance','mahalanobis');
With other distances the plot occurs correctly, what is possibly happening with my code or data?
My data can be found HERE