0
votes

Suppose the linear model I want is sales = (0.4 * age) + (0.05 * income). How do I create this linear regression model in Weka without training on any data? I just want to save a model file that contains the linear relationship that I already know. No training is necessary. Is this possible in the Weka GUI or through the Java API? If so, how?

1

1 Answers

0
votes

The Weka classifier MathExpressionClassifier that comes with the ADAMS framework, allows you to do that. You only have to supply the formula after the = as the expression.

Another alternative, if you don't want to switch to ADAMS, is the mxexpression-weka-package library. However, you will need to convert the attribute names in your formula to attX (with X being the 1-based attribute index). This package is also part of ADAMS.