필터 지우기
필터 지우기

Using PCA for feature selection OCR Matlab

조회 수: 3 (최근 30일)
ana ain
ana ain 2016년 5월 24일
I have a matrix from feature extraction process (using DCT method). The size is 4096x601 (mxn) in double type.
I wanted to use PCA for dimensionality reduction without losing important information (appropriate features of the data). Expected ouput is kxn matrix.
This is my code for collecting feature. After get DCT result, I need PCA to make the dimension become smaller (efficient) to prevent 'out of memory' issue in the training stage.
srcFiles = dir('D:\...\datatrain\*.png');
fetrain1 = [];
for a = 1:length(srcFiles)
file_name = strcat('D:\...\datatrain\',srcFiles(a).name);
A = imread(file_name);
% [fiturtrain] = feature_extractor (A);
[c] = CobaDCT (A);
[fiturtrain] = cobazigzag(c);
fetrain1 = [fetrain1 fiturtrain];
% vectorname = strcat(file_name,'_array.mat');
end
fetrain1 = pca (fetrain1);
save ('fetrain1.mat','fetrain1');
Surely, pca function not give me the best solution, because after get a certain matrix and run training process, I get this error:
"Error using bsxfun
Non-singleton dimensions of the two input arrays must match each other."
. Any suggestions and help would be appreciated.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by