How to instantiate a Scikit-Learn linear model with known coefficients without fitting it

前端 未结 2 1964
孤城傲影
孤城傲影 2020-12-17 06:19

Background

I am testing various saved models as part of an experiment, but one of the models comes from an algorithm I wrote, not from a sklearn mod

2条回答
  •  情深已故
    2020-12-17 06:59

    This approach works nicely for primitive methods (such as linear-regression), but how can you tweak this for more complex models (such as lasso or elastic net or...). It appears the linear regressor can be modified like this, but a lasso regressor still throws errors (complaint of not being fit: As in this question, which is indicated as a duplicate of the above.

提交回复
热议问题