Commit Graph

55 Commits

Author SHA1 Message Date
Jerome Lovy
9b7ab19c56 Import urllib.request instead of urllib
As of January 25, 2021, in some environments, such as Colab (Python 3.6.9),
the following import statement
    import urllib
is not the right one for using urllib.request.

Indeed, calls to urllib.request functions then yield the following error:
    AttributeError: module 'urllib' has no attribute 'request'

One must import urllib.request instead.

See also https://stackoverflow.com/q/22278993
2021-01-25 11:55:32 +01:00
Aurélien Geron
f225f59780 Update to latest library versions 2020-11-21 12:22:42 +13:00
Haesun Park
42196c4235 fix colorbar ticks 2020-05-09 11:40:30 +09:00
Aurélien Geron
2f7ab70295 Update notebooks to latest nbformat 2020-04-06 19:13:12 +12:00
Aurélien Geron
a55720e9e4 Make notebooks 1 to 9 runnable in Colab without changes 2019-11-05 22:26:52 +08:00
Aurélien Geron
bbadc3276a Merge branch 'master' of github.com:ageron/handson-ml2 2019-10-21 09:02:13 +08:00
Aurélien Geron
143ef4b1db Remove y=None argument in the transform() method 2019-10-17 18:05:01 +08:00
jmribeiro
aed738c7ad Removed duplicated np.random.seed(42) entry from the second notebook 2019-10-13 19:20:42 +01:00
Aurélien Geron
07b83a5e09 Import urllib directly instead of from six.moves, as we move away from Python 2 2019-10-12 16:29:54 +09:30
Aurélien Geron
ec3136f59f Add index=housing.index when wrapping array in a DataFrame, fixes #426 2019-05-12 21:28:56 +08:00
Aurélien Geron
7335c9d5c0 Use separate joblib package rather than the one in sklearn (which is deprecated) 2019-04-26 21:22:15 +08:00
Aurélien Geron
52afcf4290 Crop long outputs so they show up nicer on github.com 2019-04-16 00:06:57 +08:00
Aurélien Geron
5f6be6fa6f Use pd.cut() for income_cat 2019-03-15 23:49:03 +08:00
Aurélien Geron
90e3175c7d Remove warnings about old 1st edition code changes 2019-01-22 16:54:47 +08:00
Aurélien Geron
1a6bb0b199 Create image directory and check for sklearn >= 0.20 2019-01-21 18:42:31 +08:00
Aurélien Geron
6b8dff91d0 Update all notebooks assuming we are all in the future now: sklearn 0.20+, python 3.5+, TF 2.0 preview 2019-01-18 23:08:37 +08:00
Aurélien Geron
d2518a679b Drop Python 2 (woohoo!) and import matplotlib as mpl 2019-01-16 23:42:00 +08:00
Aurélien Geron
b54ee1b608 Update notebooks 1 to 8 to latest library versions (in particular Scikit-Learn 0.20) 2018-12-21 10:18:31 +08:00
Aurélien Geron
a82e624171 Fix comment in DataFrameSelector 2018-07-31 23:10:23 +01:00
Aurélien Geron
9367c6ef42 Silence gelsd warning 2018-07-31 20:22:05 +01:00
Aurélien Geron
e2d450708a Replace FeatureUnion + DataFrameSelector with new ColumnTransformer 2018-07-31 20:08:33 +01:00
Aurélien Geron
55adea1ff4 Add code to compute a confidence interval 2018-05-08 19:41:47 +02:00
Aurélien Geron
771dccaca4 Clarify future encoders in Scikit-Learn 0.20 2018-05-07 21:09:08 +02:00
Aurélien Geron
77d3d4838d Clarify why we are using OrdinalEncoder and OneHotEncoder 2018-05-07 20:17:30 +02:00
Aurélien Geron
71c40c7aec Use OrdinalEncoder and OneHotEncoder from Scikit-Learn 0.20 instead of CategoricalEncoder 2018-05-07 11:27:59 +02:00
Aurélien Geron
8f6a28e6bc Improve the implementation of the test_set_check() function: faster, supports python 2 and 3, and more fine grain split (32 bits intead of 8) 2018-04-03 16:45:53 +02:00
Aurélien Geron
f9ac449f97 Add cmap when plotting california image, fixes #65 2018-03-15 23:26:18 +01:00
rickiepark
385d635e92 add params for avoiding warn and improving perf. 2018-01-30 17:19:37 +09:00
Aurélien Geron
c8b7f045ee Fix hyperparameter search and comment at the end of the solution of exercise 5, chapter 2 2018-01-14 09:11:47 +01:00
Kxrr
767affca86 Fix incorrect description in chapter 2 2017-11-25 00:02:08 +08:00
Aurélien Geron
7d7ccce9d3 Fix factorize() bug, due to housing_cat being a DataFrame, not a Series, fixes #104 2017-10-20 20:07:40 +02:00
Aurélien Geron
7a9110ea47 Merge branch 'master' of https://github.com/pkourdis/handson-ml into pkourdis-master 2017-10-18 09:01:42 +02:00
pannoos
f53dc95940 Fix HOUSING_URL 2017-10-17 16:41:58 -07:00
Aurélien Geron
830d6e4751 Clarify stratified sampling paragraph in ch02 2017-10-16 14:19:08 +02:00
pannoos
e287581c93 Chapter 2: Improvement of code in "Setup" & "Get the data" 2017-10-15 14:14:05 -07:00
pannoos
bbe33f7039 Chapter 2: Generic way of selecting numerical or categorical attributes 2017-10-15 04:01:07 -07:00
pannoos
7e4f99085f Chapter 2: "Setup" & "Get the data" code improvement 2017-10-15 03:11:53 -07:00
Aurélien Geron
204b6ac7ce Merge branch 'master' of github.com:ageron/handson-ml 2017-09-19 13:40:59 +02:00
Aurélien Geron
7629334e9b Do not use LabelEncoder and LabelBinarizer, use factorize() and CategoricalEncoder instead. 2017-09-19 13:01:23 +02:00
Aurélien Geron
dbaae16e88 Merge pull request #77 from jasrys/master
Fix typos
2017-09-18 08:47:31 +02:00
Aurélien Geron
b59d2016d6 Provide workaround and explanations about the breakage of LabelBinarizer by Scikit-Learn 0.19.0 2017-09-15 14:40:13 +02:00
Jason Rys
dc901e0ada Fix typos 2017-08-19 08:01:55 -07:00
Aurélien Geron
11b984eb92 Make fetch_housing_data() work on Windows 2017-06-18 13:52:10 +02:00
Aurélien Geron
7f4cd72d97 Merge PR #36 by lsshawn: adds helpful notes and fixes the null rows sampling code 2017-06-08 17:11:08 +02:00
Aurélien Geron
8935c61570 Adding missing figure in chapter 02 2017-06-08 14:23:33 +02:00
Aurélien Geron
711a577f1a Fix figure 2-13 x-axis values and legend not showing 2017-06-06 22:28:39 +02:00
Aurélien Geron
bd6c167e09 Make notebook for ch2 output the same result every time 2017-06-06 13:21:19 +02:00
Aurélien Geron
88acd2b4b9 Make notebook code match book examples more closely in chapter 2 2017-06-01 09:53:20 +02:00
Aurélien Geron
168ad47702 Finish exercise solution for chapter 9, and ensure sync between notebook and book for chapter 2 2017-05-28 18:14:49 +02:00
Aurélien Geron
c3da72c4ef Explain the expon() and reciprocal() distributions 2017-05-03 19:46:23 +02:00