Pleasae help me (Random Sampling)

8 views (last 30 days)
Rehan Ali
Rehan Ali on 12 Nov 2015
Commented: Walter Roberson on 14 Nov 2015
Dear Sir,
I am Using KDD99 data set. having four class DOS, Prob, U2R and R2L, I need a random sample of DOS with sub attacks of DOS like ( Back, land, neptune, pod, smurf, teardrop) from Kdd99.
I need 39,1460 random sample of DOS with sub attacks, can any body help me, I need a code.
[Merged from duplicate question]
I have a matrix A, size ( 494020 x 41) samples , this matrix contain randomly distributed samples of four class , like DOS, Prob, U2R, R2L, further these classes have sub class and these subclasses samples distributed in Matrix A, I need only DOS class related samples, the DOS class have sub class is (Back, land ,Neptune ,pod, smurf, teardrop) Basically these are labels related to the samples that I want like,
I need 40 sample of Back.
I need 50 sample of land.
Need 100 sample of Neptune.
Need 100 sample of teardrop.
Need 500 samples of smurf.
Need 100 samples of Pod.
How I can get these sample randomly, I need 391458 samples of all subclass.
  3 Comments
Rehan Ali
Rehan Ali on 14 Nov 2015
Edited: Walter Roberson on 14 Nov 2015
yes Sir, that is a question ? so for that i have convert my labels to Numeric like
Back= 1 , land = 7, neptune = 10, pod= 15, smurf = 19 , teardrop = 21 ,
these are the label that belong to each class. may be if we know the indices of these label then we can get the samples very easily from matrix A , but how?
Walter Roberson
Walter Roberson on 14 Nov 2015
Which column of matrix A indicates which of the 4 classes DOS, Prob, U2R or R2L the row belongs to? For a row that belongs to DOS, which column of matrix A indicates which of the types of DOS it is?

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!