THe project I am currently working on creates statistical models and 
provides the linear regression model as an equation.
It has some package centric ways for defining polynomials and other 
functions, for instance:
68.1223e-02*VB_POLY(var_to_use,0.79425485,0.0074458634,-3.6000059e-05)

I'm trying to define a function to evaluate these, but am not having much 
luck. The linear regression models are put into an .ini file where I read 
them out then use
parse_expr to evaluate them with the dictionary containing the data for the 
variables:
[model_1]
formula = -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)

Python function, the eval function is not correct, I am trying to get a 
simple test case to work:
class VB_POLY(Function):
  nargs = 4

  @classmethod
  def eval(cls, var, a, b, c):
    print "%s %s %s %s" % (var, a, b, c)
    return

Python code to evaulate:
mlr_result = parse_expr(self.formula, self.data_used)

The VB_POLY eval function is never called. I'm sure I am missing something 
basic so I'd 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/b221adc0-9cf3-4306-94bf-7dad220afb53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to