Isomap算法的matlab实现
本人最近为了完成机器学习这门课的作业,查阅了Isomap的相关资料。现把matlab官网给出的Isomap代码贴在下面,方便新手使用。
同时把网址附在这里,https://www.mathworks.com/matlabcentral/fileexchange/62449-isomap-d-n_fcn-n_size-options。
function [Y, R, E] = Isomap(D, n_fcn, n_size, options);
% ISOMAP Computes Isomap embedding using the algorithm of
% Tenenbaum, de Silva, and Langford (2000).
%
% [Y, R, E] = isomap(D, n_fcn, n_size, options);
%
% Input:
% D = N x N matrix of distances (where N is the number of data points)
% n_fcn = neighborhood function (‘epsilon’ or ‘k’)
% n_size = neighborhood size (value for epsilon or k)
%
% options.dims = (row) vector of embedding dimensionalities to use
% (1:10 = default)
% options.comp = which connected component to embed, if more than one.
% (1 = largest (default), 2 = second largest, …)
% options.display = plot residual variance and 2-D embedding?
% (1 = yes (default), 0 = no)
% options.overlay = overlay graph on 2-D embedding?
% (1 = yes (default), 0 = no)
% options.verbose = display progress reports?
% (1 = yes (default), 0 = no)
%
% Output:
% Y = Y.coords is a cell array, with coordinates for d-dimensional embeddings
% in Y.coords{d}. Y.index contains the indices of the points embedded.
% R = residual variances for embeddings in Y
% E = edge matrix for neighborhood graph
%
% BEGIN COPYRIGHT NOTICE
%
Isomap算法的matlab实现
最新推荐文章于 2024-08-31 15:39:32 发布
本文介绍了如何在MATLAB中实现Isomap算法,详细解析了官方提供的代码,并提供了算法的输入参数说明。通过示例代码,展示了从构建邻接图到计算最短路径,再到构造低维嵌入的过程。此外,还探讨了如何定义neighbourhood函数`n_fcn`。
摘要由CSDN通过智能技术生成