2018-04-07 02_end_to_end_machine_learning

这本书使用的是jupyter notebook,可以说非常好用。
使用之前先写一个.bat文件,这样双击之后就可以直接在需要的目录下使用了。

F:
cd F:\LiveLessons.Deep.Learning.with.TensorFlow_p30download.com\code\TensorFlow-LiveLessons-master
jupyter notebook

首先需要获取数据,全部代码都在这里,不打算重新再打一遍了。
https://github.com/ageron/handson-ml/blob/master/02_end_to_end_machine_learning_project.ipynb

下载后的数据集。


数据集位置
%matplotlib inline
import matplotlib.pyplot as plt
housing.hist(bins=50, figsize=(20,15))
plt.show()

这里有一个需要注意的地方,如果直接使用matplotlib的话出不了图,需要先写%matplotlib inline来提醒jupyter notebook。


直方图

图出来了,效果还是很不错的。

你可能感兴趣的:(2018-04-07 02_end_to_end_machine_learning)