TemplateExpressionSpec don't use variables names and .sympy() doesn't work #916
-
Hello to everyone I am using TemplateExpressionSpec a follows but unfortunally the i,r and k are written in the results with template = TemplateExpressionSpec(
expressions=["i", "r","k"],
variable_names=['x1', 'x2', 'x3'],
combine="i(x1,x2,x3)*(r(x2)/k(x3))",
) Even specifying the variable names in .fit() doesn't help
Another problem is related to the fact that .sympy() returns that is not usable on template expression spec and if I use Any clue on how to fix this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @Vahan-tech, This is correct and is the intended behavior. Template expressions print using Perhaps a workaround could be add by someone in the future.
Cheers, |
Beta Was this translation helpful? Give feedback.
Hi @Vahan-tech,
This is correct and is the intended behavior. Template expressions print using
#1
instead of "x1" because the specific arguments can change. For example your template could bef(x1) - f(x2)
. So the only consistent way to handle this is to print#1
to mean "first argument" rather than specific variable names.Perhaps a workaround could be add by someone in the future.
.sympy()
is not available with template expressions – this is intended. See #911 for the issue for this.Cheers,
Miles