Currently, I am implementing a program in Java that uses a classifier to collect data. This done right now through the following lines of code:
SVMClassifier svm = new SVMClassifier(installDir, XAxisName);
double[] p = svm.predict(sent);
In the previous I specified the classifier that I am using. however, I want to implement this into some kind of abstract method so that the program will allow users to specify the classifier they want to use so they can run my program using any classifier.
I have a text file that the user specify the classifier they want to use and this is read into the program when it is ran and stores the name of the classifier into a variable called "classifier". what I am confused about is how I use a variable and use the contents of that as SVMClassifier from the previous example.
Any information or links to a way of being able to do this will be appreciated!