Hi Pritom,
I guess you are referring to this file exchange function: https://www.mathworks.com/matlabcentral/fileexchange/62449-isomap-d-n_fcn-n_size-options
The Isomap algorithm builds a neighborhood to understand which points are "close" to each other in your high-dimensional data.
- 'n_fcn' is the neighborhood selection method. It can be 'k' (for k nearest neighbor) or 'epsilon' (connects to all points within distance epsilon)
- 'n_size' is the the value chosen for your neighborhood method 'n_fcn'. If n_fcn = 'k', then n_size should be integer (like 2,5,etc.) or if n_fcn = 'epsilon', then n_size should be distance threshold (0.5,1,etc.)
Isomap works on D(Distance Matrix), a NxN matrix which contains pairwise distance between data points and hence cannot directly work on your raw data. You can perform a preprocessing similar to as follows:
% Data Size: 32 data points with each 1632 features %
% Compute a 32x32 distance matrix %
% Calculates euclidean distance by default, but other distance metrics can be specified %
D = pdist2(data, data);
% Can also conider normalizing the data %
D = normalize(D,2) % Nomalizes each row
% Now you can pass D to Isomap: example usage with k=5 neighbors %
[Y, R, E] = Isomap(D, 'k', 5);
For more information on the functions used above, please refer to
- https://www.mathworks.com/help/stats/pdist2.html
- https://www.mathworks.com/help/matlab/ref/double.normalize.html
Hope this helps.