Weka is a classification algorithm. This is possible thanks to the ADAMS framework's MathExpressionClassifier. As the expression, you only need to provide the formula following the =.
If you don't want to use ADAMS, you can use the mxexpression-weka-package library instead. However, you'll have to change the names of the attributes in your formula to attX. (with X being the 1-based attribute index). ADAMS includes this bundle as well.