2012-01-29 3 views
1

안녕하세요, KDD 1999 데이터 세트를 사용하여 저는 matlab에 순진한 베이를 적용하려고했습니다. 내가 알고 싶은 무엇Matlab Naive Bayes

training = [1;0;-1;-2;4;0]; % this is the sample data. 
target_class = ['posi';'zero';'negi';'negi';'posi';'zero']; 
    % This should have the same number of rows as training data but why? 

% Training and Testing the classifier (between positive and negative) 
test = 10*randn(10,1) % this is for testing. I am generating random numbers. 
class = classify(test,training, target_class, 'diaglinear') 
% This command classifies the test data depening on the given training data using a  Naive Bayes classifier 

% diaglinear is for naive bayes classifier; there is also diagquadratic 

는 "Target_class입니다 : 내가 알고 싶은 것은 당신이 순진 베이 즈의 코드에 아래의"교육 "과"target_class을 "이있을 때는 KDD 데이터 세트는, 데이터의 494021x42 배열입니다 "kdd 데이터 세트 공격 유형과 관련이 있습니까?

back dos 
buffer_overflow u2r 
ftp_write r2l 
guess_passwd r2l 
imap r2l 
ipsweep probe 
land dos 
loadmodule u2r 
multihop r2l 
neptune dos 
nmap probe 
perl u2r 
phf r2l 
pod dos 
portsweep probe 
rootkit u2r 
satan probe 
smurf dos 
spy r2l 
teardrop dos 
warezclient r2l 
warezmaster r2l 

"테스트"집합에 포함 된 열 제목 열은 대상 클래스입니까? 예 :

protocol_type: symbolic. 
service: symbolic. 
flag: symbolic. 
src_bytes: continuous. 
dst_bytes: continuous. 
land: symbolic. 
wrong_fragment: continuous. 

답변

3

예를 들어. here이면 대상 클래스가 실제로 공격 유형이라는 것을 알 수 있습니다. 그러나 훈련 세트는 시험 세트보다 적은 공격 유형을 포함합니다.

침입 탐지 알고리즘을 훈련 한 후에는 기존 침입 탐지 시스템과 유사하지만 동일하지 않은 새로운 공격 유형을 처리 할 수 ​​있어야하므로 현실감있게 수행됩니다.

+0

이상한 점은 훈련 세트에서 공격 유형이 적 으면 나는 의미있는 결과를 얻지 못할 수도 있다는 뜻입니까? 테스트 데이터에는 적게 넣고 기차에는 정확성을 위해 더 많은 내용이 들어 있다고 생각할 것입니다. –

+0

오늘 분류를 훈련하면 지금까지 본 공격에 대해서만 훈련 할 수 있습니다. 앞으로 기존 공격과 관련된 새로운 공격이 나타날 것이라고 가정하는 것이 합리적입니다. 그것들을 탐지하는 것은 당신의 임무입니다! –

관련 문제