Pleasae help me (Random Sampling)

조회 수: 13 (최근 30일)
Rehan Ali
Rehan Ali 2015년 11월 12일
댓글: Walter Roberson 2015년 11월 14일
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
Rehan Ali
Rehan Ali 2015년 11월 14일
편집: Walter Roberson 2015년 11월 14일
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 2015년 11월 14일
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Classification Trees에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by