Closed RealHacker closed 6 years ago
Sorry I didn't see this before today.
Restricting x to be positive makes it a constrained optimization problem, rather than a linear regression. Linear regression finds parameters for a hypothesis equation that matches the data closest. You don't want to match the data closest, if the data will give a negative answer. Therefore, constrained optimization is what you are looking for. The AIToolbox library does not have a general constrained optimizer.
Sorry, this is not a bug. I just want to ask a question regarding Linear Regression Model.
I need to solve a linear equation Ax=B, with no bias. But I need to restrict x to be all positive. Is this possible with
LinearRegressionModel
? Or maybe using LAPACK directly?Thanks!