How to identify the class is labeled or not? help me in finding target matrix??
조회 수: 1 (최근 30일)
이전 댓글 표시
sorry for this silly question. actually, I want to classify a 2D data which I obtained after performing some operation. now I have to classify this data using patternnet. for that, i want a "target matrix".please help me in this. I have 51 classes in my dataset.
here i have a matrix of size 7701*51. now i want to classify this matrix in 51 classes(as these many individuals i have in the dataset). please help me, how can i generate target matrix if i want to do classification using nprtool.
댓글 수: 2
YT
2017년 12월 17일
I'm pretty new to neural networks myself, but I'll try to help. Do you only have 1 matrix with size 7701x51? Because I'm a bit confused about your formulation. In my experience, in most cases you have an input matrix X with size samples-by-features and a target matrix T with size samples-by-classes.
% Your complete data
%
% f1 f2 f3 f4 class1 class2 class3
%D = [0.1 10 5 2.3;1 0 0;
% 0.2 12 4 1.3;0 1 0;
% 0.4 15 3 1.1;0 0 1;]
% Your input matrix
% f1 f2 f3 f4
%X = [0.1 10 5 2.3;
% 0.2 12 4 1.3;
% 0.4 15 3 1.1]
% Your target matrix
% class1 class2 class3
%T = [1 0 0;
% 0 1 0;
% 0 0 1]
Maybe it's a good idea to attach a picture (or your data) as an attachment (using the paperclip icon).
답변 (1개)
Greg Heath
2017년 12월 18일
편집: Greg Heath
2017년 12월 29일
If you have N I-dimensional input vectors to classify into one of c independent classes, the size of the input matrix is
[ I N ] = size(input)
corresponding to a target matrix with N c-dimensional 0-1 unit sum vectors
[ c N ] = size(target)
that yields
sum(target) = ones(1,N)
From the info in the question,
c = 51
N = 51*300 = 15,300
Therefore the target matrix has columns from eye(51) with 50 zeros and the single "1" indicates the class.
However, it is not clear from the description what I (the size of the input vectors) is supposed to be.
Hope this helps
Thank you for formally accepting my answer
Greg
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!