How to identify the class is labeled or not? help me in finding target matrix??

1 visualización (últimos 30 días)
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 comentarios
YT
YT el 17 de Dic. de 2017
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).
user06
user06 el 18 de Dic. de 2017
sir i have 51 classes and each class contains 300 samples. i have extracted features using CNN. the result of the CNN has the size 7701*51(as i have divided 151 images for training and 149 for testing). now i want to do classification using nprtool. for that i have to provide target matrix. and i am unable to understand how can i generate that target matrix.

Iniciar sesión para comentar.

Respuestas (1)

Greg Heath
Greg Heath el 18 de Dic. de 2017
Editada: Greg Heath el 29 de Dic. de 2017
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

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by