Package weka.filters.supervised.instance

Examples of weka.filters.supervised.instance.StratifiedRemoveFolds


     */
    public void removeStratifiedFoldsFilter(Integer fold, Integer numFolds, boolean invert) throws Exception {
        if (_logger.isDebugEnabled()) {
            _logger.debug("Applying stratified remove folds filter");
        }
        StratifiedRemoveFolds srf = new StratifiedRemoveFolds();
        String[] options;
        if (invert) {
            options = new String[6];
            options[0] = "-S";
            options[1] = "-9";
            options[2] = "-N";
            options[3] = numFolds.toString();
            options[4] = "-F";
            options[5] = fold.toString();
        } else {
            options = new String[7];
            options[0] = "-S";
            options[1] = "-9";
            options[2] = "-V";
            options[3] = "-N";
            options[4] = numFolds.toString();
            options[5] = "-F";
            options[6] = fold.toString();
        }
        srf.setOptions(options);
        srf.setInputFormat(_instances);
        _instances = Filter.useFilter(_instances, srf);
    }
View Full Code Here

TOP

Related Classes of weka.filters.supervised.instance.StratifiedRemoveFolds

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.