scikit-learn 的进度条? [英] A progress bar for scikit-learn?

查看:241
本文介绍了scikit-learn 的进度条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在 scikit-learn 中为 fit 方法设置进度条?

Is there any way to have a progress bar to the fit method in scikit-learn ?

是否可以包含一个像 Pyprind 之类的自定义内容?

Is it possible to include a custom one with something like Pyprind ?

推荐答案

如果在调用 fit 之前用 verbose=1 初始化模型,你应该得到某种输出表示进度.

If you initialize the model with verbose=1 before calling fit you should get some kind of output indicating the progress.

例如 sklearn.ensemble.GradientBoostingClassifer(verbose=1) 提供如下所示的进度输出:

For example sklearn.ensemble.GradientBoostingClassifer(verbose=1) provides progress output that looks like this:

  Iter       Train Loss   Remaining Time
     1           1.2811            0.71s
     2           1.2595            0.58s
     3           1.2402            0.50s
     4           1.2263            0.46s
     5           1.2121            0.43s
     6           1.1999            0.41s
     7           1.1876            0.39s
     8           1.1761            0.38s
     9           1.1673            0.37s
    10           1.1591            0.36s
    20           1.1021            0.29s
    30           1.0511            0.27s
    40           1.0116            0.25s
    50           0.9830            0.22s
    60           0.9581            0.19s
    70           0.9377            0.16s
    80           0.9169            0.14s
    90           0.9049            0.12s
   100           0.8973            0.10s

这篇关于scikit-learn 的进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆