I have modified the knn code(IBk.java available in
section) available in weka to suit to my requirement.
These are the first 4 lines of my code.
I named this new file as IBk.java.
Now can any one tell me how to compile and execute this java file.
WHere to store this file?
In which directory I should be to execute this code.?
I am using weka-3.5
My main doubt is that where to place this file and compile and execute
Just add the weka.classifiers package to the list of packages for the
weka.classifiers.Classifier class in the GenericPropertiesCreator.props
file (you can find that file in the weka/gui directory of the sources;
just copy it to your home directory and modify the copy, not the
original). The GenericPropertiesCreator.props file generates the props
file for the GenericObjectEditor. For more information, see here:
Proper way of adding the classifier:
1. Name your class "IBkMod" and the source file "IBkMod.java", not IBk
2. Place it in the sub-directory "weka/classifiers/lazy", just like the
original IBk and set the package of your class to "weka.classifiers.lazy".
3. for compiling have a look at this Wiki article:
That should make your classifier appear in the GUI (if the rest of your
code is OK, of course).
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
Ph. +64 (7) 858-5174