Skip main navigation

Classification by regression

Linear regression can be used for classification too. Ian Witten uses a filter to convert nominal classes to numeric, and applies linear regression

Linear regression can be used for classification too. On the diabetes data, use the NominalToBinary filter to convert the two classes, which are nominal, to the numeric values 0 and 1, and apply linear regression. The result is a predicted number between 0 and 1 for each instance. The addClassification filter is used to add that number as a new attribute; then OneR is applied to choose a good split point on that attribute to predict the original two classes. The procedure is a bit cumbersome, but the result works quite well as a classifier.

This article is from the free online

Data Mining with Weka

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now