Open ivanlen opened 7 years ago
@ivanlen The coefficients for all terms, including the constant term, are stored in the coef_
attribute of the fitted model. Knot positions and coefficients can be found by inspecting the string produced by the summary
method. Alternatively, you can inspect the attributes of the basis_
attribute of the fitted model. It's also possible to export to a sympy expression, using the pyearth.export.export_sympy
function.
Hi, I was checking the documentation and I couldn't how to find the knots positions and the values of the coefficients of the different polynomials of the fit. Let's say that I fit the data (x,y) and the fit has k knots and max_degree=m. How I find out the values of k values of the knots and the (m+1) coefficient of each the piecewise polynomials. Sorry for the knot question, I imagine some numerical recipes but I probably there is a really straightforward way that I can't find out.
By the way, congrats to the developers of the package, it is super useful and performs really well.