Training data and Training target in Neural Networks
6 views (last 30 days)
Show older comments
Hi,
I am having a signal in form of vector (1*25000). I want to split this signal into four parts x_train, y_train, x_test and y_test (according to 70-30% training and testing method) in MATLAB. Can anyone help me how to split this vector form signal into these four parts?
Thanks
2 Comments
Accepted Answer
Greg Heath
on 9 Feb 2020
You cannot make any intelligent decisions until you have examined a plot of the data!!!
(WRONG!!! Plotting the data first is the ultimate beginning decision!!!)
Hope this helps.
Greg
0 Comments
More Answers (1)
Mahesh Taparia
on 7 Feb 2020
Hi
You have correctly divided the data using randperm. Since you didn’t have ground truth, you are taking last 8750 as ground truth as per following code:
mat_1 = reshape(train_data, [rownr_1, colnr_1]);
x_train = mat_1(:,1);
y_train = mat_1(:,2);
which is incorrect. Select the correct ground truth.
2 Comments
Mahesh Taparia
on 10 Feb 2020
Hi
You mentioned earlier that your dataset is unlabeled, y_train would be the labels of x_train. Taking y_train (labels of x_train) as half of the data (which is amplitude) is illogical.
For supervised learning, there is a need of ground truth so collect the labels. Or else you can try with unsupervised learning approach like clusteriung.
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!