ageron / ageron/handson-ml2

Chapter 2. Got different results for linear regression using windows and ubuntu

Aberta
#227 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Jupyter Notebook
Estrelas
30k
Forks
13.1k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

I noticed this problem when I try to run the jupyter notebook code on my windows computer and ubuntu computer.

The result for RandomForest seems exactly same. However, the linear regression in cell 83 gives the predictions, which are different on two computers, where the ubuntu result is same as the downloaded jupyter notebook shows, while the windows result is different.

So then I double checked the data, it seems exactly same. Then I compared the coefficients by outputting

lin_reg.coef_

The windows result is
array([-5.56504116e+04, -5.67324623e+04, 1.38190749e+04, -2.00154656e+03,
7.48547532e+03, -4.56915062e+04, 4.53960963e+04, 7.48198373e+04,
6.60940148e+03, 1.03259856e+03, 9.25735792e+03, -1.61550167e+17,
-1.61550167e+17, -1.61550167e+17, -1.61550167e+17, -1.61550167e+17])

Apparently, there's some overflow in windows scikit-learn run.

Would you mind pointing out how to fix it on windows?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.