scikit-learn-contrib / py-earth

A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines
http://contrib.scikit-learn.org/py-earth/
BSD 3-Clause "New" or "Revised" License
458 stars 121 forks source link

Exporting a fitted Earth models as a sympy expression #223

Open ASMAA9555 opened 1 year ago

ASMAA9555 commented 1 year ago

Hi, please if my Resulting sympy expression is as follow: 10.09973960737218e-5H^2O + 1.000379617581785374HS^2O^2 - 3.010726723740426HSO (%)^3 + 5.0103148920221564HS*O*2 + 9.00086824336123546HSO + 1.000583791144606651HWO - 6.000605250796458352HW - 4.000687835136935973HN+ 3.00187622749500295HO + 2.0238479599870805H + 1.0443106468205726

can I simplifie the equation by putting in factor the basis function which are repeated to have the following form of equation which is more simple : 1.04+H(2.02+3.002O-6W-4N)+HO(1W+9S+10.1H)+HSO²(1S-3.01*O+5.01) is it correct ?