Feature subset selection
Thu, 01/15/2009 - 15:47 — Thomas Abeel
Subset selection algorithms differ with the scoring and ranking methods in that they only provide a set of features that are selected without further information on the quality of each feature individually.
Subset selection algorithms provide the method
- /* Load the iris data set */
- Dataset data = FileHandler.loadDataset(new File("iris.data"), 4, ",");
- /* Construct a greedy forward subset selector */
- GreedyForwardSelection ga = new GreedyForwardSelection(1, new PearsonCorrelationCoefficient());
- /* Apply the algorithm to the data set */
- ga.build(data);
- /* Print out the attribute that has been selected */
- System.out.println(ga.selectedAttributes());
复制代码