febo / myra Goto Github PK
View Code? Open in Web Editor NEWA collection of Ant Colony Optimization (ACO) algorithms for the data mining classification and regression tasks
License: Apache License 2.0
A collection of Ant Colony Optimization (ACO) algorithms for the data mining classification and regression tasks
License: Apache License 2.0
The consequent of a rule should not be limited to an integer number in order to cope with regression and hierarchical multi-label problems.
Received
java -cp myra-4.1.1.jar myra.rule.irl.AntMiner -f KDDTest-21.arff
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at myra.Dataset.add(Dataset.java:267)
at myra.Dataset.add(Dataset.java:239)
at myra.util.ARFFReader.processInstance(ARFFReader.java:302)
at myra.util.ARFFReader.read(ARFFReader.java:151)
at myra.util.ARFFReader.read(ARFFReader.java:106)
at myra.util.ARFFReader.read(ARFFReader.java:84)
at myra.Classifier.run(Classifier.java:171)
at myra.rule.irl.AntMiner.main(AntMiner.java:241)
The dataset looks like this:
@relation 'KDDTest-21'
@attribute 'duration' real
@attribute 'protocol_type' {'tcp','udp', 'icmp'}
@attribute 'service' {'aol', 'auth', 'bgp', 'courier', 'csnet_ns', 'ctf', 'daytime', 'discard', 'domain', 'domain_u', 'echo', 'eco_i', 'ecr_i', 'efs', 'exec', 'finger', 'ftp', 'ftp_data', 'gopher', 'harvest', 'hostnames', 'http', 'http_2784', 'http_443', 'http_8001', 'imap4', 'IRC', 'iso_tsap', 'klogin', 'kshell', 'ldap', 'link', 'login', 'mtp', 'name', 'netbios_dgm', 'netbios_ns', 'netbios_ssn', 'netstat', 'nnsp', 'nntp', 'ntp_u', 'other', 'pm_dump', 'pop_2', 'pop_3', 'printer', 'private', 'red_i', 'remote_job', 'rje', 'shell', 'smtp', 'sql_net', 'ssh', 'sunrpc', 'supdup', 'systat', 'telnet', 'tftp_u', 'tim_i', 'time', 'urh_i', 'urp_i', 'uucp', 'uucp_path', 'vmnet', 'whois', 'X11', 'Z39_50'}
@attribute 'flag' { 'OTH', 'REJ', 'RSTO', 'RSTOS0', 'RSTR', 'S0', 'S1', 'S2', 'S3', 'SF', 'SH' }
@attribute 'src_bytes' real
@attribute 'dst_bytes' real
@attribute 'land' {'0', '1'}
@attribute 'wrong_fragment' real
@attribute 'urgent' real
@attribute 'hot' real
@attribute 'num_failed_logins' real
@attribute 'logged_in' {'0', '1'}
@attribute 'num_compromised' real
@attribute 'root_shell' real
@attribute 'su_attempted' real
@attribute 'num_root' real
@attribute 'num_file_creations' real
@attribute 'num_shells' real
@attribute 'num_access_files' real
@attribute 'num_outbound_cmds' real
@attribute 'is_host_login' {'0', '1'}
@attribute 'is_guest_login' {'0', '1'}
@attribute 'count' real
@attribute 'srv_count' real
@attribute 'serror_rate' real
@attribute 'srv_serror_rate' real
@attribute 'rerror_rate' real
@attribute 'srv_rerror_rate' real
@attribute 'same_srv_rate' real
@attribute 'diff_srv_rate' real
@attribute 'srv_diff_host_rate' real
@attribute 'dst_host_count' real
@attribute 'dst_host_srv_count' real
@attribute 'dst_host_same_srv_rate' real
@attribute 'dst_host_diff_srv_rate' real
@attribute 'dst_host_same_src_port_rate' real
@attribute 'dst_host_srv_diff_host_rate' real
@attribute 'dst_host_serror_rate' real
@attribute 'dst_host_srv_serror_rate' real
@attribute 'dst_host_rerror_rate' real
@attribute 'dst_host_srv_rerror_rate' real
@attribute 'class' {'normal', 'anomaly'}
@data
13,tcp,telnet,SF,118,2425,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0.00,0.00,0.00,0.00,1.00,0.00,0.00,26,10,0.38,0.12,0.04,0.00,0.00,0.00,0.12,0.30,anomaly
0,udp,private,SF,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,3,0.00,0.00,0.00,0.00,0.75,0.50,0.00,255,254,1.00,0.01,0.01,0.00,0.00,0.00,0.00,0.00,anomaly
0,tcp,telnet,S3,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1.00,1.00,0.00,0.00,1.00,0.00,0.00,255,79,0.31,0.61,0.00,0.00,0.21,0.68,0.60,0.00,anomaly
0,udp,private,SF,53,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,511,511,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,255,1.00,0.00,0.87,0.00,0.00,0.00,0.00,0.00,normal
0,tcp,private,SH,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1.00,1.00,0.00,0.00,1.00,0.00,0.00,16,1,0.06,1.00,1.00,0.00,1.00,1.00,0.00,0.00,anomaly
0,tcp,http,SF,54540,8314,0,0,0,2,0,1,1,0,0,0,0,0,0,0,0,0,2,9,0.00,0.00,0.50,0.11,1.00,0.00,0.22,255,229,0.90,0.01,0.00,0.00,0.00,0.00,0.01,0.00,anomaly
0,tcp,imap4,REJ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,9,0.00,0.00,1.00,1.00,0.04,0.06,0.00,255,9,0.04,0.07,0.00,0.00,0.00,0.00,1.00,1.00,anomaly
7570,tcp,telnet,SF,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,165,0.65,0.33,0.00,0.00,0.49,0.76,0.33,0.01,anomaly
0,udp,private,SF,56,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,294,294,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,255,1.00,0.00,0.93,0.00,0.00,0.00,0.00,0.00,normal
0,tcp,ftp_data,SF,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0.00,0.00,0.00,0.00,1.00,0.00,0.00,93,51,0.09,0.04,0.09,0.04,0.00,0.00,0.01,0.00,normal
0,tcp,other,REJ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,511,1,0.14,0.00,0.86,1.00,0.00,1.00,0.00,255,1,0.00,0.94,0.00,0.00,0.13,0.00,0.87,1.00,anomaly
0,tcp,other,REJ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,490,1,0.07,0.00,0.93,1.00,0.00,1.00,0.00,255,1,0.00,1.00,0.00,0.00,0.07,0.00,0.93,1.00,anomaly
0,tcp,telnet,SF,21,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,14,0.00,0.21,0.75,0.57,0.50,0.75,0.93,255,40,0.16,0.02,0.00,0.00,0.00,0.00,0.24,0.50,anomaly
0,udp,private,SF,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,254,1.00,0.01,0.00,0.00,0.00,0.00,0.00,0.00,anomaly
0,tcp,telnet,S3,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1.00,1.00,0.00,0.00,1.00,0.00,0.00,255,115,0.45,0.02,0.00,0.00,0.53,0.36,0.01,0.01,anomaly
0,tcp,imap4,REJ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,0.00,0.00,1.00,0.89,0.50,1.00,1.00,64,59,0.25,0.08,0.02,0.03,0.00,0.00,0.88,1.00,anomaly
0,tcp,http,S0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,94,1.00,1.00,0.00,0.00,1.00,0.00,0.00,255,255,1.00,0.00,0.00,0.00,0.76,0.76,0.21,0.21,anomaly
0,tcp,ctf,S0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,171,15,1.00,1.00,0.00,0.00,0.09,0.09,0.00,255,15,0.06,0.09,0.00,0.00,1.00,1.00,0.00,0.00,anomaly
0,tcp,telnet,S3,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1.00,1.00,0.00,0.00,1.00,0.00,0.00,255,146,0.57,0.02,0.00,0.00,0.53,0.49,0.01,0.01,anomaly
0,udp,private,SF,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,1,0.00,0.00,0.00,0.00,0.01,0.96,0.00,255,1,0.00,0.69,0.99,0.00,0.00,0.00,0.01,0.00,anomaly
0,tcp,telnet,S3,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1.00,1.00,0.00,0.00,1.00,0.00,0.00,255,158,0.62,0.02,0.00,0.00,0.55,0.53,0.01,0.01,anomaly
Do you have any idea why?
i tried this command " java -cp myra-5.0.jar myra.algorithm.ContinuousAntMiner -f breast.cencer.arff" in the same directory that has the dataset file and the jar file as well.
The error i got was
"Error: Could not find or load main class myra.algorithm.ContinuousAntMiner
Caused by: java.lang.ClassNotFoundException: myra.algorithm.ContinuousAntMiner"
could you please advice how to fix this issue?
Thanks
Dear Fernando,
when i tried to compile the code I get the below error
The syntax of the command is incorrect.
make: *** [src/main/java/myra/AbstractActivity.class] Erreur 1
there is another way to compile your code?
thanks
do you know Ant-tree-miner implementation python ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.