- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在研究(我认为是)一个简单的二元分类问题。我从参数网格搜索中得到了这个奇怪的结果,无论参数是什么,模型总是返回 ~0.75 的 f1 分数。我不确定这是否:a)反射(reflect)了我对 f1 分数作为指标的误解,b)是由于数据或模型(我正在使用 XGBoost)存在一些需要纠正的问题,或者c) 只是表明模型参数基本上无关紧要,并且 f1 分数约为 0.75 就已经是我能得到的最好结果了。
更令人困惑的是,对于同一问题,我对两组完全不同的预测变量得到了相同的结果(例如,如果我预测房地产值(value),一组使用社区价格,另一组使用房屋特征 - 不同)同一问题的预测变量集)。对于一组,范围约为 0.67-0.82,具有近似正态方差,对于第二组(如下所示),每个参数组给出几乎完全相同的 f1 分数 0.7477。
更详细地说,当前数据集大约有 30,000 个示例,一类约占示例的 60%(另一类占 40%)。我还没有深入研究这个新数据集,但是对于之前的数据集,当我更仔细地检查一个模型时,我发现合理的精度和召回值,这些值随着不同的参数集而有所变化,这破坏了我对模型的担忧只是猜测更流行的类别。
我正在使用 XGBoost,并使用 scikit-learn 的 GridSearchCV
。跳过导入等网格搜索代码是
grid_values = {'n_estimators':[50,100,200,500,1000],'max_depth':[1,3,5,8], 'min_child_weight':range(1,6,2)}
clf=XGBClassifier()
grid_clf=GridSearchCV(clf,param_grid=grid_values,scoring='f1',verbose=10)
grid_clf.fit(game_records,hora)
print('Grid best score (f1): ', grid_clf.best_score_)
print('Grid best parameter (max. f1): ', grid_clf.best_params_)
完整输出位于https://pastebin.com/NSB0yaNi ,其中一部分(大部分)显示在此处:
Fitting 3 folds for each of 60 candidates, totalling 180 fits
[CV] max_depth=1, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=1, min_child_weight=1, n_estimators=50, score=0.7477603583426652, total= 11.1s
[CV] max_depth=1, min_child_weight=1, n_estimators=50 ................
[Parallel(n_jobs=1)]: Done 1 out of 1 | elapsed: 11.4s remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=50, score=0.74772504549909, total= 11.3s
[CV] max_depth=1, min_child_weight=1, n_estimators=50 ................
[Parallel(n_jobs=1)]: Done 2 out of 2 | elapsed: 23.1s remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=50, score=0.7477773888694436, total= 11.2s
[CV] max_depth=1, min_child_weight=1, n_estimators=100 ...............
[Parallel(n_jobs=1)]: Done 3 out of 3 | elapsed: 34.8s remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=100, score=0.7477603583426652, total= 21.4s
[CV] max_depth=1, min_child_weight=1, n_estimators=100 ...............
[Parallel(n_jobs=1)]: Done 4 out of 4 | elapsed: 56.8s remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=100, score=0.74772504549909, total= 21.3s
[CV] max_depth=1, min_child_weight=1, n_estimators=100 ...............
[Parallel(n_jobs=1)]: Done 5 out of 5 | elapsed: 1.3min remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=100, score=0.7477773888694436, total= 21.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=200 ...............
[Parallel(n_jobs=1)]: Done 6 out of 6 | elapsed: 1.7min remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=200, score=0.7477603583426652, total= 41.3s
[CV] max_depth=1, min_child_weight=1, n_estimators=200 ...............
[Parallel(n_jobs=1)]: Done 7 out of 7 | elapsed: 2.4min remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=200, score=0.74772504549909, total= 41.1s
[CV] max_depth=1, min_child_weight=1, n_estimators=200 ...............
[Parallel(n_jobs=1)]: Done 8 out of 8 | elapsed: 3.1min remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=200, score=0.7477773888694436, total= 41.1s
[CV] max_depth=1, min_child_weight=1, n_estimators=500 ...............
[Parallel(n_jobs=1)]: Done 9 out of 9 | elapsed: 3.7min remaining: 0.0s
[CV] max_depth=1, min_child_weight=1, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=1, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=1, min_child_weight=1, n_estimators=500, score=0.74772504549909, total= 1.8min
[CV] max_depth=1, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=1, min_child_weight=1, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=1, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=1, min_child_weight=1, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=1, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=1, min_child_weight=1, n_estimators=1000, score=0.74772504549909, total= 3.4min
...
[CV] max_depth=3, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=1, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=3, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=100, score=0.7477603583426652, total= 21.2s
[CV] max_depth=3, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=100, score=0.74772504549909, total= 21.0s
[CV] max_depth=3, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=100, score=0.7477773888694436, total= 20.9s
[CV] max_depth=3, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=200, score=0.7477603583426652, total= 41.0s
[CV] max_depth=3, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=200, score=0.74772504549909, total= 41.2s
[CV] max_depth=3, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=200, score=0.7477773888694436, total= 41.4s
[CV] max_depth=3, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=3, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=3, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=1, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=3, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=1, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=3, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=1, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=3, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=1, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=3, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=3, n_estimators=50, score=0.7477603583426652, total= 10.9s
[CV] max_depth=3, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=3, n_estimators=50, score=0.74772504549909, total= 11.0s
[CV] max_depth=3, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=3, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=3, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=100, score=0.7477603583426652, total= 20.9s
[CV] max_depth=3, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=100, score=0.74772504549909, total= 21.0s
[CV] max_depth=3, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=100, score=0.7477773888694436, total= 21.0s
[CV] max_depth=3, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=200, score=0.7477603583426652, total= 41.2s
[CV] max_depth=3, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=200, score=0.74772504549909, total= 41.2s
[CV] max_depth=3, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=200, score=0.7477773888694436, total= 41.2s
[CV] max_depth=3, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=3, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=3, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=3, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=3, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=3, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=3, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=3, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=3, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=3, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=3, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=5, n_estimators=50, score=0.7477603583426652, total= 11.0s
[CV] max_depth=3, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=5, n_estimators=50, score=0.74772504549909, total= 10.9s
[CV] max_depth=3, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=3, min_child_weight=5, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=3, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=100, score=0.7477603583426652, total= 21.2s
[CV] max_depth=3, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=100, score=0.74772504549909, total= 21.0s
[CV] max_depth=3, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=100, score=0.7477773888694436, total= 21.0s
[CV] max_depth=3, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=200, score=0.7477603583426652, total= 41.1s
[CV] max_depth=3, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=200, score=0.74772504549909, total= 41.3s
[CV] max_depth=3, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=200, score=0.7477773888694436, total= 41.0s
[CV] max_depth=3, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=3, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=3, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=3, min_child_weight=5, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=3, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=5, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=3, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=5, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=3, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=3, min_child_weight=5, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=5, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=1, n_estimators=50, score=0.7477603583426652, total= 10.9s
[CV] max_depth=5, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=1, n_estimators=50, score=0.74772504549909, total= 10.9s
[CV] max_depth=5, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=1, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=5, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=100, score=0.7477603583426652, total= 21.0s
[CV] max_depth=5, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=100, score=0.74772504549909, total= 21.1s
[CV] max_depth=5, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=100, score=0.7477773888694436, total= 21.0s
[CV] max_depth=5, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=200, score=0.7477603583426652, total= 41.3s
[CV] max_depth=5, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=200, score=0.74772504549909, total= 41.1s
[CV] max_depth=5, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=200, score=0.7477773888694436, total= 41.1s
[CV] max_depth=5, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=5, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=5, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=1, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=5, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=1, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=5, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=1, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=5, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=1, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=5, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=3, n_estimators=50, score=0.7477603583426652, total= 10.9s
[CV] max_depth=5, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=3, n_estimators=50, score=0.74772504549909, total= 10.9s
[CV] max_depth=5, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=3, n_estimators=50, score=0.7477773888694436, total= 11.0s
[CV] max_depth=5, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=100, score=0.7477603583426652, total= 21.3s
[CV] max_depth=5, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=100, score=0.74772504549909, total= 20.9s
[CV] max_depth=5, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=100, score=0.7477773888694436, total= 20.9s
[CV] max_depth=5, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=200, score=0.7477603583426652, total= 41.1s
[CV] max_depth=5, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=200, score=0.74772504549909, total= 41.4s
[CV] max_depth=5, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=200, score=0.7477773888694436, total= 41.1s
[CV] max_depth=5, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=5, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=5, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=3, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=5, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=3, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=5, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=3, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=5, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=3, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=5, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=5, n_estimators=50, score=0.7477603583426652, total= 11.0s
[CV] max_depth=5, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=5, n_estimators=50, score=0.74772504549909, total= 11.0s
[CV] max_depth=5, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=5, min_child_weight=5, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=5, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=100, score=0.7477603583426652, total= 21.0s
[CV] max_depth=5, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=100, score=0.74772504549909, total= 21.0s
[CV] max_depth=5, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=100, score=0.7477773888694436, total= 21.8s
[CV] max_depth=5, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=200, score=0.7477603583426652, total= 41.2s
[CV] max_depth=5, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=200, score=0.74772504549909, total= 41.6s
[CV] max_depth=5, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=200, score=0.7477773888694436, total= 41.2s
[CV] max_depth=5, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=5, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=5, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=5, min_child_weight=5, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=5, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=5, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=5, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=5, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=5, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=5, min_child_weight=5, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=8, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=1, n_estimators=50, score=0.7477603583426652, total= 10.9s
[CV] max_depth=8, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=1, n_estimators=50, score=0.74772504549909, total= 10.9s
[CV] max_depth=8, min_child_weight=1, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=1, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=8, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=100, score=0.7477603583426652, total= 21.2s
[CV] max_depth=8, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=100, score=0.74772504549909, total= 21.0s
[CV] max_depth=8, min_child_weight=1, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=100, score=0.7477773888694436, total= 20.9s
[CV] max_depth=8, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=200, score=0.7477603583426652, total= 41.0s
[CV] max_depth=8, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=200, score=0.74772504549909, total= 41.4s
[CV] max_depth=8, min_child_weight=1, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=200, score=0.7477773888694436, total= 41.0s
[CV] max_depth=8, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=8, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=8, min_child_weight=1, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=1, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=8, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=1, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=8, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=1, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=8, min_child_weight=1, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=1, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=8, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=3, n_estimators=50, score=0.7477603583426652, total= 10.9s
[CV] max_depth=8, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=3, n_estimators=50, score=0.74772504549909, total= 10.9s
[CV] max_depth=8, min_child_weight=3, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=3, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=8, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=100, score=0.7477603583426652, total= 20.9s
[CV] max_depth=8, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=100, score=0.74772504549909, total= 21.0s
[CV] max_depth=8, min_child_weight=3, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=100, score=0.7477773888694436, total= 20.9s
[CV] max_depth=8, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=200, score=0.7477603583426652, total= 41.3s
[CV] max_depth=8, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=200, score=0.74772504549909, total= 41.1s
[CV] max_depth=8, min_child_weight=3, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=200, score=0.7477773888694436, total= 41.2s
[CV] max_depth=8, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=8, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=8, min_child_weight=3, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=3, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=8, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=3, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=8, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=3, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=8, min_child_weight=3, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=3, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[CV] max_depth=8, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=5, n_estimators=50, score=0.7477603583426652, total= 10.9s
[CV] max_depth=8, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=5, n_estimators=50, score=0.74772504549909, total= 10.9s
[CV] max_depth=8, min_child_weight=5, n_estimators=50 ................
[CV] max_depth=8, min_child_weight=5, n_estimators=50, score=0.7477773888694436, total= 10.9s
[CV] max_depth=8, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=100, score=0.7477603583426652, total= 20.9s
[CV] max_depth=8, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=100, score=0.74772504549909, total= 21.4s
[CV] max_depth=8, min_child_weight=5, n_estimators=100 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=100, score=0.7477773888694436, total= 21.0s
[CV] max_depth=8, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=200, score=0.7477603583426652, total= 41.2s
[CV] max_depth=8, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=200, score=0.74772504549909, total= 41.3s
[CV] max_depth=8, min_child_weight=5, n_estimators=200 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=200, score=0.7477773888694436, total= 41.0s
[CV] max_depth=8, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=500, score=0.7477603583426652, total= 1.7min
[CV] max_depth=8, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=500, score=0.74772504549909, total= 1.7min
[CV] max_depth=8, min_child_weight=5, n_estimators=500 ...............
[CV] max_depth=8, min_child_weight=5, n_estimators=500, score=0.7477773888694436, total= 1.7min
[CV] max_depth=8, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=5, n_estimators=1000, score=0.7477603583426652, total= 3.4min
[CV] max_depth=8, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=5, n_estimators=1000, score=0.74772504549909, total= 3.4min
[CV] max_depth=8, min_child_weight=5, n_estimators=1000 ..............
[CV] max_depth=8, min_child_weight=5, n_estimators=1000, score=0.7477773888694436, total= 3.4min
[Parallel(n_jobs=1)]: Done 180 out of 180 | elapsed: 227.8min finished
Grid best score (f1): 0.7477542636024276
Grid best parameter (max. f1): {'max_depth': 1, 'min_child_weight': 1, 'n_estimators': 50}
最佳答案
假设您的分类器将所有内容预测为多数类,那么您的:
precision = tp/(tp+fp) = 60/(60+40) = 0,6
recall = tp/(tp+fn) = 60/(60+0) = 1
以及您的 f1 分数:
f1 = 2*precision*recall/(precision+recall)= 2*0,6*1/(0,6+1)
= 1,2/1,6= 0,75
所以你的分类器很可能总是预测多数类。
要检查您的confusion_matrix一次,您可以使用以下命令:
from sklearn.metrics import confusion_matrix
print(confusion_matrix(y_true, y_pred))
关于python - f1 分数总是 ~0.75?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56869695/
我不明白 int 63823 为何比 double 1.0 占用更少的空间。在这个特定实例中,int 中是否没有存储更多信息? 最佳答案 I don't understand how an int 6
这可能不是一个直接的代码问题,但它是一个经常出现在 SO 上的问题,我发现阅读它非常有用。 App Store - Help answering “Missing Compliance” (using
我在我们的应用程序中使用 syncfusion 寻呼机和下拉列表请打开以下链接。 https://stackblitz.com/edit/angular-nv6myv?file=src%2Fapp%2
以便解释指针和引用in this question我写了这段代码。 MyClass& MyClass::MyInstance() { static MyClass & myLoca
在 C 和 C++ 中,assert 是一个非常 重量级例程,将错误写入 stdout 并终止程序。在我们的应用程序中,我们实现了一个更强大的 assert 替代品,并为其提供了自己的宏。已尽一切努力
我已经创建了一个 MVC webApi 项目,现在我想使用身份验证和授权。我想我已经实现了这种安全措施,但由于某种原因,有些事情变糟了,当我编写我的凭据并尝试调用一些 webApi 方法时,显示消息“
我发现自己使用一种奇怪的方式向我的函数添加回调函数,我想知道是否有更通用的方式向函数添加回调函数,最好的情况是我的所有函数都检查最后给定的作为函数的参数,如果是,则将其用作回调。 我以前是这样的: v
几乎从来没有我只想获取某个 Remote 的情况;我总是想要所有的 Remote 。我认为这将是一个足够常见的用例,git 会考虑它(与他们有 pull.rebase true 的方式相同)。 那么,
我正在尝试使用 inarray 但它总是返回 true?有任何想法吗? (所有 li 均已显示) $("#select-by-color-list li").hide(); // get the se
我正在尝试为我公司的开发环境设置过期网址。我们使用 lighttpd在此环境中提供上传的文件,我发现 these docs这似乎相当有希望。 问题是我似乎根本无法让它工作,而且我有点不知所措,试图找出
我无法让“文件夹”外部变量工作。我总是得到[:]。 我正在 Windows 下的 Grails 上进行开发(这就是为什么外部配置文件看起来像 file:C:\path\to/file)。 我在另一个项
这个问题是出于对 PL 如何工作的好奇,而不是其他任何事情。 (它实际上是在查看与 Haskell 不同的 SML 时想到的,因为前者使用按值调用 - 但我的问题是关于 Haskell。) Haske
我有一个高速缓存内存模块,我希望它是可字寻址的,但有字节的写使能信号。 always @ (posedge clk) begin //stuff... if(write) begin
我正在处理一些代码,其中一个对象“foo”正在创建另一个对象对象“bar”,并向其传递一个Callable。之后 foo 将返回bar,然后我希望 foo 变得无法访问(即:可用于垃圾收集)。 我最初
我已将我的程序与此方法相关联: public static void CreateFileAssociation(string extension, string key, string descri
所以我正在进行目录遍历,但我无法让 opendir 按照我想要的方式工作。它总是无法打开我发送的目录,它给出了一些未知的错误。我通常传入 argv[1],但我放弃了,只是开始硬编码路径。 char *
这个问题在这里已经有了答案: How do I compare strings in Java? (23 个回答) 关闭 9 年前。 出于某种原因,我的(基本)程序总是打印我为 else 语句保留的
我不想冒为此提出破解的风险,因为它涉及 datetime 对象。基本上,我想按如下方式进行转换: 2010-04-21 06:37:53 -> 2010-04-21 06:40:00 2010-08-
我正在用 C 语言玩文件 I/O。我正在尝试使用 fgets 从一个文件中读取数据并将其输出到另一个文件。问题是它总是返回 NULL,因此没有任何内容被复制到输出文件中。这是我的代码: #includ
class MyClass { // empty class with no base class }; int main() { MyClass* myClass = new MyC
我是一名优秀的程序员,十分优秀!