Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
The Waikato Environment for Knowledge Analysis (WEKA), a machine
learning workbench. This version represents the developer version, the
"bleeding edge" of development, you could say. New functionality gets added
to this version.
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/*
* CheckSource.java
* Copyright (C) 2007-2012 University of Waikato, Hamilton, New Zealand
*/
package weka.filters;
import java.io.File;
import java.util.Enumeration;
import java.util.Vector;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.Option;
import weka.core.OptionHandler;
import weka.core.RevisionHandler;
import weka.core.RevisionUtils;
import weka.core.Utils;
import weka.core.converters.ConverterUtils.DataSource;
/**
* A simple class for checking the source generated from Filters implementing
* the weka.filters.Sourcable interface. It takes a filter, the
* classname of the generated source and the dataset the source was generated
* with as parameters and tests the output of the built filter against the
* output of the generated source. Use option '-h' to display all available
* commandline options.
*
* Valid options are:
*
*
*
* -W <classname and options>
* The filter (incl. options) that was used to generate
* the source code.
*
*
*
* -S <classname>
* The classname of the generated source code.
*
*
*
* -t <file>
* The training set with which the source code was generated.
*
*
*
* -c <index>
* The class index of the training set. 'first' and 'last' are
* valid indices.
* (default: none)
*
*
*
*
* Options after -- are passed to the designated filter.
*
*
* @author fracpete (fracpete at waikato dot ac dot nz)
* @version $Revision: 10210 $
* @see weka.filters.Sourcable
*/
public class CheckSource implements OptionHandler, RevisionHandler {
/** the classifier used for generating the source code */
protected Filter m_Filter = null;
/** the generated source code */
protected Filter m_SourceCode = null;
/** the dataset to use for testing */
protected File m_Dataset = null;
/** the class index */
protected int m_ClassIndex = -1;
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration