ageron / ageron/handson-ml2

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

Đang mở
#227 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
30k
Fork
13.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.