public class Selector
extends java.lang.Object
Title: Selector
Description: This class implements an attribute condition of a rule
Company: KEEL
Modifier and Type | Field and Description |
---|---|
static int |
EQUAL
Number to represent equality.
|
static int |
GREATER
Number to represent greater.
|
static int |
LESS_EQUAL
Number to represent lesser.
|
Constructor and Description |
---|
Selector()
Defalt constructor
|
Selector(int attribute,
myDataset train)
Parameter constructor
|
Selector(java.lang.String attribute,
java.lang.String operator,
java.lang.String value)
Parameter constructor
|
Modifier and Type | Method and Description |
---|---|
void |
adjuntaNombres(java.lang.String[] attributes)
Sets the attributes names inside the Selector.
|
Selector |
copy()
Creates a copy of the Selector
|
boolean |
covers(double[] example)
Checks if the examples is covered by the selector
|
int |
getattribute()
Returns the attribute considered in this selector.
|
java.lang.String |
printString()
Returns a String representation of the selector.
|
public static int EQUAL
public static int LESS_EQUAL
public static int GREATER
public Selector()
public Selector(java.lang.String attribute, java.lang.String operator, java.lang.String value)
attribute
- name of the variableoperator
- operator typevalue
- value of the conditionpublic Selector(int attribute, myDataset train)
attribute
- variable positiontrain
- full training setpublic void adjuntaNombres(java.lang.String[] attributes)
attributes
- attributes names to be set.public java.lang.String printString()
public Selector copy()
public boolean covers(double[] example)
example
- public int getattribute()