Search code examples
python-3.xjupyter-notebookdata-sciencelinear-regressionprediction

Jupyter notebook linear regression problem


in jupyter notebook when we input this we expect this output as shown in screenshot correct answer

But in my notebook when i enter same query i am getting different output whywrong output


Solution

  • This is how the fitted model outputs are shown in the newest version of sklearn, i.e., 0.23. The parameters are the same, but they are not shown in the output. To replicate the same you have to downgrade your python < 3.4 and skelarn < 0.23. There is another way you can check this if you want which is shown below:

    Scikit-learn example