Sorry if this ends up being a re-post, I submitted a similar question and I
do not think it went through.
I am working on a project that uses a statistical modelling program whose
output is a linear regression model. THe program has a unique way of
representing various well know equations such as polynomials or quadratic:
VB_POLY(variable_to_be_used,0.79425485,0.0074458634,-3.6000059e-05)
I can have one or more of these I store in an ini file and retrieve them
when the prediction engine is run, a full equation would look like:
-10.5296e-01 + 22.1357e-02*tide_hi_8726243 + 68.1223e-02*VB_POLY(
sarasota_bay_nexrad_summary_144,0.79425485,0.0074458634,-3.6000059e-05) +
91.2317e-02*VB_POLY(c10_min_salinity_24,-641.91178,36.505262,-0.51822633)
With the items such as tide_hi_8726243 and sarasota_bay_nexrad_summary_144
being data whose value I provide in a dictionary when I execute parse_expr.
mlr_result = parse_expr(self.formula, self.data_used)
I've defined a VB_POLY class, the eval method is only for testing at the
moment, as:
class VB_POLY(Function):
nargs = (1, 4)
@classmethod
def eval(cls, obs_var, a, b, c):
print "%s %s %s %s" % (obs_var, a, b, c)
return
The eval method never seems to be called, I'm not sure what I'm missing and
would appreciate any pointers.
Thanks,
Dan
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/529f1389-c42a-49c0-b7dd-938f6f025009%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.