How to identify the class is labeled or not? help me in finding target matrix??
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
YT
le 17 Déc 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).
Réponses (1)
Greg Heath
le 18 Déc 2017
Modifié(e) : Greg Heath
le 29 Déc 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
2 commentaires
Voir également
Catégories
En savoir plus sur Image Data Workflows dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!