I want a code for kernel PCA

hello, I am looking for a site where I can find a program reduction dimentionality kernel PCA think you

回答 (1 件)

Shashank Prasanna
Shashank Prasanna 2013 年 2 月 14 日

0 投票

MATLAB currently doesn't offer this as a part of the statistics toolbox. In the past I've used this and it worked really well for me:

6 件のコメント

BANI tita
BANI tita 2013 年 2 月 16 日
Hello, thank you for your reply, I tried to execute the function kernel pca but she give a following error ,pray you help me find a solution.
%%=============================
??? Subscripted assignment dimension mismatch.
Error in ==> eigs at 282 workd(:,cols(2)) = applyOP(workd(:,cols(1)));
Error in ==> kernel_pca at 77 [V, L] = eigs(@(v)kernel_function(v, X', 1, kernel, param1, param2, 'Normal'), size(X, 1), no_dims, 'LM', options);
Error in ==> compute_mapping at 348 else [mappedA, mapping] = kernel_pca(A, no_dims, varargin{:}); end
Error in ==> test_kernel_pca at 12 mappedX = compute_mapping(X, 'KernelPCA', no_dims, 7);
%======================
% load baseAT.mat;
X=PA;
no_dims =10;
labels=lblsa;
mappedX = compute_mapping(X, 'KernelPCA', no_dims, 7);
%%============
Walter Roberson
Walter Roberson 2013 年 2 月 16 日
what is size(X) ?
BANI tita
BANI tita 2013 年 2 月 17 日
size(x)=(5185,220)
Shashank Prasanna
Shashank Prasanna 2013 年 2 月 18 日
try clear all
try some of the trouble shooting steps mentioned in the website:
make sure you have the relevant files on the path
BANI tita
BANI tita 2013 年 2 月 19 日
編集済み: Walter Roberson 2013 年 2 月 19 日
hello,
here is the program I run but still it gives me same error
%%%-----------------------------------
load baseAT.mat;
X=PA;
labels=lblsa;
figure, scatter3(X(:,1), X(:,2), X(:,3), 5, labels); title('Original dataset'), drawnow
no_dims = round(intrinsic_dim(X, 'EigValue'));
disp(['MLE estimate of intrinsic dimensionality: ' num2str(no_dims)]);
mappedX = compute_mapping(X, 'KernelPCA', no_dims, 7);
figure, scatter(mappedX(:,1), mappedX(:,2), 5, labels); title('Result of dimensionality reduction'), drawnow
Hariprasad Kannan
Hariprasad Kannan 2018 年 3 月 7 日
The kernel pca code doesn't address the pre-image problem. It gives location of the points in the feature space.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

質問済み:

2013 年 2 月 14 日

コメント済み:

2018 年 3 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by