what is the syntax to add noise in data set
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I need the syntax to add noise to data set..
I hv write the code as:
rand_class_data = randsample(data(:,:),data*10/100);
y(rand_class_data)= ~y(rand_class_data);
wrong_labels = y;
%testing ensemble on noised data
losswith_noised_data = loss(ens_on_traindata, rand_class_data,wrong_labels)
--------------------------------------------------
the dataset im using is ''ionosphere'
I want to change the labels that i hd done with
y(rand_class_data)= ~y(rand_class_data);
but the problem is with data
i.e. how should i randsample the data??..
mean to say how to write
r = randsample(data(:,:),data*10/100);
the error is as :
"POPULATION must be a vector."
plz suggest me the right syntax to randsample the data
0 Kommentare
Antworten (2)
Andrei Bobrov
am 30 Mai 2012
may be using data(:)?
eg
rand_class_data = randsample(data(:),round(numel(data)*10/100))
Walter Roberson
am 31 Mai 2012
Your question is still active here. Please do not ask duplicate questions.
0 Kommentare
Siehe auch
Kategorien
Mehr zu AI for Signals 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!