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 .
*/
/*
* MergeManyValues.java
* Copyright (C) 1999-2012 University of Waikato, Hamilton, New Zealand
*
*/
package weka.filters.unsupervised.attribute;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Vector;
import weka.core.*;
import weka.core.Capabilities.Capability;
import weka.filters.Filter;
import weka.filters.StreamableFilter;
import weka.filters.UnsupervisedFilter;
/**
* Merges many values of a nominal attribute into one
* value.
*
*
*
* Valid options are:
*
*
*
* -C <col>
* Sets the attribute index
* (default: last)
*
*
*
* -L <label>
* Sets the label of the newly merged classes
* (default: 'merged')
*
*
*
* -R <range>
* Sets the merge range. 'first and 'last' are accepted as well.'
* E.g.: first-5,7,9,20-last
* (default: 1,2)
*
*
*
*
* @author Kathryn Hempstalk (kah18 at cs.waikato.ac.nz)
* @version $Revision: 14508 $
*/
public class MergeManyValues extends PotentialClassIgnorer implements UnsupervisedFilter,
StreamableFilter, OptionHandler, WeightedInstancesHandler, WeightedAttributesHandler {
/** for serialization */
private static final long serialVersionUID = 4649332102154713625L;
/** The attribute's index setting. */
protected SingleIndex m_AttIndex = new SingleIndex("last");
/** The first value's index setting. */
protected String m_Label = "merged";
/** The merge value's index setting. */
protected Range m_MergeRange = new Range("1,2");
/**
* Returns a string describing this filter
*
* @return a description of the filter suitable for displaying in the
* explorer/experimenter gui
*/
public String globalInfo() {
return "Merges many values of a nominal attribute into one value.";
}
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration