python - Converting a pyearth model -


i've create model pyearth, , i'd convert object format can translated other representations (for example c++ function).

one approach parse str output of model.summary():

$ print(model.summary()) earth model ------------------------------------- basis function  pruned  coefficient   ------------------------------------- (intercept)     no      1.78778       h(x0-0.245279)  no      1.73016       h(0.245279-x0)  no      -2.6705       h(x0-1.22149)   no      0.31407       h(1.22149-x0)   yes     none          ------------------------------------- mse: 12.2425, gcv: 12.2427, rsq: 0.3090, grsq: 0.3090 

but lead float precision loss, , seems it'd fragile piece of logic.

is there better way?

looks there function pyearth.export.export_sympy() converts model sympy expression.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -