All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weka.attributeSelection.SymmetricalUncertAttributeEval Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 3.9.6
Show newest 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 .
 */

/*
 *    SymmetricalUncertAttributeEval.java
 *    Copyright (C) 1999-2012 University of Waikato, Hamilton, New Zealand
 *
 */

package weka.attributeSelection;

import java.util.Enumeration;
import java.util.Vector;

import weka.core.Capabilities;
import weka.core.Capabilities.Capability;
import weka.core.ContingencyTables;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.Option;
import weka.core.OptionHandler;
import weka.core.RevisionUtils;
import weka.core.Utils;
import weka.filters.Filter;
import weka.filters.supervised.attribute.Discretize;

/**
 *  SymmetricalUncertAttributeEval :
*
* Evaluates the worth of an attribute by measuring the symmetrical uncertainty * with respect to the class.
*
* SymmU(Class, Attribute) = 2 * (H(Class) - H(Class | Attribute)) / H(Class) + * H(Attribute).
*

* * * Valid options are: *

* *

 * -M
 *  treat missing values as a seperate value.
 * 
* * * * @author Mark Hall ([email protected]) * @version $Revision: 10172 $ * @see Discretize */ public class SymmetricalUncertAttributeEval extends ASEvaluation implements AttributeEvaluator, OptionHandler { /** for serialization */ static final long serialVersionUID = -8096505776132296416L; /** The training instances */ private Instances m_trainInstances; /** The class index */ private int m_classIndex; /** The number of instances */ private int m_numInstances; /** The number of classes */ private int m_numClasses; /** Treat missing values as a seperate value */ private boolean m_missing_merge; /** * Returns a string describing this attribute evaluator * * @return a description of the evaluator suitable for displaying in the * explorer/experimenter gui */ public String globalInfo() { return "SymmetricalUncertAttributeEval :\n\nEvaluates the worth of an attribute " + "by measuring the symmetrical uncertainty with respect to the class. " + "\n\n SymmU(Class, Attribute) = 2 * (H(Class) - H(Class | Attribute)) " + "/ H(Class) + H(Attribute).\n"; } /** * Constructor */ public SymmetricalUncertAttributeEval() { resetOptions(); } /** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. **/ @Override public Enumeration




© 2015 - 2024 Weber Informatics LLC | Privacy Policy