Skip main navigation
We use cookies to give you a better experience, if that’s ok you can close this message and carry on browsing. For more info read our cookies policy.
We use cookies to give you a better experience. Carry on browsing if you're happy with this, or read our cookies policy for more information.

How about selecting key attributes before applying a classifier?

Removing attributes from a dataset before applying a classifier often results in better performance.

It’s ironic that removing information can improve performance! Isn’t the whole idea of data mining to bring as much data as possible to bear on the problem?

Well, that’s true enough. But individual classification algorithms, though they might try to select the most appropriate attributes to use at any given stage, are not necessarily as good at it as a specially designed attribute selection algorithm, applied before the classifier is invoked. For example, “nearest neighbor” or instance-based algorithms (described in Week 3 of Data Mining with Weka) classify test instances on the basis of the nearest training instance. But attributes irrelevant to the decision will distort the distance measure by adding an irrelevant, perhaps random, dimension to the instance space. Decision tree algorithms try to choose the most informative attribute to split on at each node of the tree, but at lower levels there are not many instances to go on and an irrelevant, noisy, attribute may seem, by chance, to be the best choice.

At the end of this week you will be able to explain – and apply – different approaches to attribute selection. The idea is to select a subset of attributes that will work well for the problem at hand. How can you measure whether they would work well? And to find the best subset seems to require searching through all possible subsets, which is an onerous task. You will soon be able to describe – and use – alternative search strategies that reduce the computation (but do not necessarily arrive at the very best solution).

A particularly important revelation is that if you apply an attribute selection method and then apply a classification algorithm to the result, the outcome – even when evaluated using cross-validation – is not necessarily an accurate assessment of performance on fresh data. This is because the entire data set is used when choosing the best attribute subset. That’s cheating! Only the training data should be used. (If you’re on the ball, you might recognize a parallel with supervised discretization.) But how on earth can you achieve this with Weka? You’re about to find out …

Share this article:

This article is from the free online course:

More Data Mining with Weka

The University of Waikato

Contact FutureLearn for Support