-
Notifications
You must be signed in to change notification settings - Fork 3
Input formats
Presently, featsel is compatible with two types of input files: the DAT and the XML formats.
This input file format is useful for supervised learning.
Typically, the user has, for a given set S of features, a finite number of samples, each one associating a realization of S with a class label in {1,...,k}. For instance, if the user has seven samples of two features {A, B} defined in {0,1}^2, each sample associated with a label either T or F:
| Sample number | A | B | Class label |
|---|---|---|---|
| 1 | 0 | 1 | F |
| 2 | 1 | 1 | T |
| 3 | 1 | 1 | T |
| 4 | 0 | 1 | F |
| 5 | 1 | 0 | T |
| 6 | 1 | 1 | F |
| 7 | 1 | 0 | T |
In the above table, A (B) equal to one (zero) means that A (B) is present (absent) in a given sample. The information presented in the table above can be rearranged into a histogram depicting, for each subset of features, the number of occurrences that it was associated to each of the two labels:
| A | B | F | T | |
|---|---|---|---|---|
| 0 | 1 | 1 | 0 | |
| 1 | 0 | 0 | 2 | |
| 1 | 1 | 1 | 2 |
The featsel DAT format is precisely the table above without the table head:
0 1 1 0
1 0 0 2
1 1 1 2
It is noteworthy to mention that both the feature values and the number of labels do not need to be binary, just non-negative integer; for example, if we have two features, one defined in {0,1} and another one in {0,...,4}, and five labels, one possible DAT file would be:
0 4 1 1 0 0 0
1 3 1 0 2 11 2
1 2 0 0 0 0 3
0 1 2 2 0 7 10