フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Hoe can i obtain the the row numbers that were remained after selecting the training data set.I could see the row numbers that were selected for training in an order .I would like to see the same for the remaining data without seeing the logical valu

2 ビュー (過去 30 日間)
Honey Adams
Honey Adams 2018 年 7 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
clear all
clc
IN=[-0.04844752 0.041968141 -0.044564664;
-0.304020248 0.131284505 0.472041681;
-0.074829705 -0.049999997 -0.094350919;
0.28895241 0.390694469 0.416666657;
-0.098011374 0.012270158 -0.067317739;
-0.175849974 -0.160909101 -0.174713209;
-0.141403094 -0.004999995 -0.098300003;
-0.210274339 -0.191784486 -0.109999985]
for i= 1:6
NEWIN = [ones(size(IN,1),1) IN]
num_NEWIN = size(NEWIN,2)
L=length(NEWIN)
mixed = randperm(L,6) % for validation
Training = NEWIN(mixed,:) % input for training
InTraining = Training(:,1:end-1)
OutTraining = Training(:,end) % output for training
Trainvar = size(InTraining,2)
Trainlength = size(InTraining,1)
TrainingVal = true(1,L);
TrainingVal(mixed)=false;
Remain_validating= NEWIN(TrainingVal,:)
Testing = Remain_validating(:,1:end-1)

回答 (1 件)

KSSV
KSSV 2018 年 7 月 6 日
remained = setdiff(1:L,mixed) ;

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by