com.blazebit.ai.decisiontree.impl.SimpleAttributeSelector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blaze-ai-utils Show documentation
Show all versions of blaze-ai-utils Show documentation
Artificial Intelligence Utilities.
package com.blazebit.ai.decisiontree.impl;
import com.blazebit.ai.decisiontree.Attribute;
import com.blazebit.ai.decisiontree.AttributeSelector;
import com.blazebit.ai.decisiontree.Example;
import java.util.HashSet;
import java.util.Set;
/**
* @author Christian Beikov
*/
public class SimpleAttributeSelector implements AttributeSelector {
@Override
public Attribute select(final Set> examples, final Set availableAttributes, final Set usedAttributes) {
final Set usable = new HashSet(availableAttributes);
usable.removeAll(usedAttributes);
return usable.size() > 0 ? usable.iterator().next() : null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy