forked from CybersecurityXLab/ids_svm_slidingwindow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert_to_csv.m
16 lines (12 loc) · 1.05 KB
/
convert_to_csv.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%convert a given file to csv
allFeatures = load('.\zscore_feature_sets\allFeatures.mat');
allLabels = load('.\zscore_feature_sets\allLabels.mat');
featureVals = [allFeatures.AllFeatures.CVPacketSize allFeatures.AllFeatures.ThirdMomentPacketSize allFeatures.AllFeatures.CVPacketInterarrival allFeatures.AllFeatures.ThirdMomentPacketInterarrival allFeatures.AllFeatures.CorJavaScriptCount allFeatures.AllFeatures.HTTPorFTPandExeCodeCount allFeatures.AllFeatures.HTTPandMalformedCount allFeatures.AllFeatures.FTPandCcodeCount allFeatures.AllFeatures.SYNCount allFeatures.AllFeatures.ECHOCount];
features = ["CVPacketSize"; "ThirdMomentPacketSize"; "CVPacketInterarrival"; "ThirdMomentPacketInterarrival"; "CorJavaScriptCount"; "HTTPorFTPandExeCodeCount"; "HTTPandMalformedCount"; "FTPandCcodeCount"; "SYNCount"; "ECHOCount";];
%B = padarray(i,1,0,'pre');
%B(1,1) = "test";
%dlmwrite('featureVals.csv',featureVals);
features = array2table(features);
writetable(features,"features.csv");
%labels = cell2table(allLabels.AllLabels.HLClass);
%writetable(labels,"labels.csv");