How to form the training set ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
chaaru datta
am 14 Mai 2022
Kommentiert: chaaru datta
am 20 Jun. 2022
Hello all, I am new to machine learning and wanna use MATLAB for it... I am trying to form a training set in MATLAB on the basis of following expression:
where S denotes the training set, M = 10, m = 1 to M, is the training feature such that , denotes the training label such that .
My query is what should be the dimension of my training set. I think it should be .
Any help in this regard will be highly appreciated.
Akzeptierte Antwort
the cyclist
am 14 Mai 2022
If I understand all of your notation correctly, I think your training set needs to be an Mx3 matrix.
If means that each observation of x has two components (epsilon minus and epsilon plus), then for each observation of the training set, you need two values to represent x, and one to represent y. So
M = [0.2 0.3 -1;
-0.3 0.4 1;
...
0.6 0.5 -1];
would be the representation in which
- 1st column is x (epsilon minus)
- 2nd column is x (epsilon plus)
- 3rd column is y
16 Kommentare
the cyclist
am 17 Mai 2022
I see that the signal is used in the calculation of the features, but it doesn't affect the label, right?
The label you generated is completely random, not affected by the features. Here is the code to generate the labels, with all other code removed:
M_train = 1*10^5; % for training iteration, given in paper as 10^5
M_train_detail = int32(randi([0, 1], [1, M_train])); % generating random tag symbols
Train_label_final = [];
for kk = 1:(M_train)
if M_train_detail(kk)== 0
lab = -1;
else
lab = 1;
end
Train_label = [lab];
Train_label_final = [ Train_label_final; Train_label];
end
This is random, with no reference to signal or the features. Therefore, it is no surprise that you cannot predict these labels from the features.
Weitere Antworten (1)
the cyclist
am 17 Mai 2022
I spent a little bit more time with the paper.
It seems to me that in the paper, the labels y are supposed to be used when generating s (Eq. 5 & 6) and then epsilon (Eq. 7 & 8).
But you don't use your labels as part of the calculation of the features.
7 Kommentare
Siehe auch
Kategorien
Mehr zu Measurements and Feature Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!