How do I extract a polynomial equation from regressionLearner?
显示 更早的评论
I am wondering how I can extract a resulting fitting equation from Matlab's regressionLearner (version R2017b)? I am using the linear regression with quadratic terms to fit the variable "C" as a function the variables "H2O", "CO2" and "P". I have exported the compact model into my workspace:


When I open the structure and click on "LinearModel", I find the supposedly used equation form under "Formula" as
LinearPredictor '1 + H2O*CO2 + H2O*P + CO2*P + H2O^2 + CO2^2 + P^2'

This formula has 7 terms. However, under "TermNames" 10 terms are listed, and under coefficients I find estimates for each of these terms, including standard error SE, tStat and pValue.

How do these ten terms relate to the seven terms in the LinearPredictor equation above? The LinearPredictor equation is missing terms with only H2O, CO2, and P, and instead of H2O:P it contains H2O*P etc. Are these supposed to be the same? Is this even the best way to extract a polynomial equation from the regressionLearner?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!