vinayakumarr / Network-Intrusion-Detection

Network Intrusion Detection KDDCup '99', NSL-KDD and UNSW-NB15
677 stars 239 forks source link

Features with string values #4

Closed PlayerForever closed 6 years ago

PlayerForever commented 6 years ago

Hi, how did you deal with the string features? e.g., Services and protocols? It would be nice if you can provide some information about the pre-processing of the dataset. :)

StevenLOL commented 6 years ago

One approach is to convert them to one hot encoding.

eg the 2nd feature could be:

'icmp' 1 0 0
'tcp' 0 1 0
'udp' 0 0 1
PlayerForever commented 6 years ago

Hi StevenLOL,

I did it with two encode processes, firstly with labelEncoder and then oneHotEncoder and got further with the experiments. Thanks anyway. :)

Cheers, J.H.