From: shital patil <>
Reply-To: "Weka machine learning workbench list." <>
Date: Wednesday, 1 May 2013 1:50 AM
To: "Weka machine learning workbench list." <>
Subject: [Wekalist] Linear regression with weka

Hello ,

I am using linear regression as meta classifier through java code
Dealing with 2 class classification problem I represented one class as 0 and other as 1
I want to know how to classify new instance-

Do I need to build regression model separately for instances belonging to one class and then other and finally compare score from ClassifyInstance method ?

Or I  need to consider entire dataset for training at once and build only one regression model?

weka.classifiers.meta.ClassificationViaRegression implements this for any base regression learner by creating a separate binary indicator attribute for each class value and then learning a regression model for each. For a test instance, the distributionForInstance() method asks each base regression model for a score (truncated at 0 and 1) for its respective label, stores them in an array and then normalises the array to make a probability distribution.