How to form the training set ?
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
채택된 답변
the cyclist
2022년 5월 14일
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
the cyclist
2022년 5월 17일
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.
추가 답변 (1개)
the cyclist
2022년 5월 17일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Measurements and Feature Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!