/** * Full Constructor. * * @param n The name of the classifier * @param base The classifier to be used in this system. * @param attributeString The string describing the types of attributes example objects will * have. **/ public WekaWrapper(String n, weka.classifiers.Classifier base, String attributeString) { super(n); Parameters p = new Parameters(); p.baseClassifier = base; p.attributeString = attributeString; setParameters(p); freshClassifier = base; }
/** * Retrieves the parameters that are set in this learner. * * @return An object containing all the values of the parameters that control the behavior of * this learning algorithm. **/ public Learner.Parameters getParameters() { Parameters p = new Parameters(super.getParameters()); p.baseClassifier = baseClassifier; p.attributeString = attributeString; return p; }
/** * Empty constructor. Instantiates this wrapper with the default learning algorithm: * <code>weka.classifiers.bayes.NaiveBayes</code>. Attribute information must be provided before * any learning can occur. * * @param n The name of the classifier. **/ public WekaWrapper(String n) { this(n, new Parameters()); }