mnist的t-SNE二维空间可视化MATLAB

%%

filename = 'mnist';

digitDatasetPath = fullfile(matlabroot,'toolbox','nnet','nndemos', ...

'nndatasets','DigitDataset');

imds = imageDatastore(digitDatasetPath, ...

'IncludeSubfolders',true,'LabelSource','foldernames');

%%

labelCount = countEachLabel(imds);

%%

Y = categorical(imds.Labels);

for i = 1:sum(labelCount.Count)

img = im2double(readimage(imds,i));

imgs(:,i) = img(😃;

end

X = tsne(imgs',Algorithm="barneshut",Perplexity=300);

%%

figure;gscatter(X(:,1),X(:,2),Y)

xlabel(' x 1 x_1 x1', 'FontSize',14, 'Interpreter','latex')

ylabel(' x 2 x_2 x2', 'FontSize',14, 'Interpreter','latex')

box off

相关推荐
硅谷秋水2 小时前
π0.5:带开放世界泛化的视觉-语言-动作模型
人工智能·机器学习·计算机视觉·语言模型
搏博2 小时前
机器学习之三:归纳学习
人工智能·深度学习·学习·机器学习
小墙程序员5 小时前
机器学习入门(七)PCA
机器学习
伊织code5 小时前
SKLearn - Biclustering
机器学习·支持向量机·聚类·sklearn·biclustering
搏博5 小时前
专家系统的基本概念解析——基于《人工智能原理与方法》的深度拓展
人工智能·python·深度学习·算法·机器学习·概率论
yzx9910135 小时前
决策树随机深林
人工智能·python·算法·决策树·机器学习
winner88815 小时前
论文解读:迁移学习(A Survey on Transfer Learning)
人工智能·机器学习·迁移学习
我是个菜鸡.6 小时前
视觉/深度学习/机器学习相关面经总结(2)(持续更新)
人工智能·深度学习·机器学习
随风飘摇的土木狗6 小时前
【MATLAB第118期】基于MATLAB的双通道CNN多输入单输出分类预测方法
matlab·cnn·分类预测·卷积神经网络·双通道
小墙程序员6 小时前
机器学习入门(六)异常检测
机器学习