
streams.weka.NominalAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of streams-weka Show documentation
Show all versions of streams-weka Show documentation
Weka adaption for streaming processes in streams.
The newest version!
/**
*
*/
package streams.weka;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import weka.core.Attribute;
/**
* @author chris
* @deprecated Tested this but does not work out - all members of Attribute are
* private :-(
*/
public class NominalAttribute extends Attribute {
/** The unique class ID */
private static final long serialVersionUID = -6478741288493392903L;
final Map nominalValues = new HashMap();
/**
* @param attributeName The name of the Attribute
*/
public NominalAttribute(String attributeName) {
super(attributeName, new ArrayList());
}
public void addNominalValue(String value) {
if (nominalValues.containsKey(value)) {
return;
}
Integer idx = nominalValues.size() + 1;
nominalValues.put(value, idx);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy