#### 神烦小宝

0

7

0

0

3 年

muxuezi.github.io

Python everyday, N books of Python translating...

#### 评论了

• 2018-11-28 11:22

亲，我是16章译者陶俊杰，感谢花宝贵时间阅读拙作，更感谢您愿意手写代码，对您造成了困扰深感歉意。我刚刚在GitHub运行本章notebook代码，没有bug。章节内备注了代码链接https://mybinder.org/v2/gh/muxuezi/btc/master。很好奇您是怎么玩出这个bug的呢？方便share一下吗？邮箱muxuezi@gmail.com

• 2018-11-23 08:41

您运行的scikit-learn是什么版本呢？我在python3.7 的 scikit-learn 0.20.0测试了，没有问题 from sklearn.ensemble import RandomForestRegressor RandomForestRegressor(n_estimators=1000, max_depth=10, min_samples_split=1) RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=10, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, min_samples_leaf=1, min_samples_split=1, min_weight_fraction_leaf=0.0, n_estimators=1000, n_jobs=None, oob_score=False, random_state=None, verbose=0, warm_start=False) 官方文档如下：https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html#sklearn.ensemble.RandomForestRegressor ``` min_samples_split : int, float, optional (default=2) The minimum number of samples required to split an internal node: If int, then consider min_samples_split as the minimum number. If float, then min_samples_split is a fraction and ceil(min_samples_split * n_samples) are the minimum number of samples for each split. ```

• 2018-10-27 22:01

@Ionization 您买的印刷版次是多少呢？如果有，bug在最新版次应该已经修复了

• 2018-10-25 12:50

具体是哪些呢？全书“二进制”只出现过三次，都在第二章，并没有“二进制操作”内容

• 2018-10-16 19:56

好问题，ipython换行在mac的iterm2上似乎是无解的。能用notebook吗？~~