grid.py需要多少时间才能运行? [英] how much time does grid.py take to run?

查看:149
本文介绍了grid.py需要多少时间才能运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用libsvm进行二进制分类..我想尝试grid.py,据说可以改善结果..我在单独的终端中为五个文件运行了此脚本,并且该脚本已经运行了12个以上小时..

I am using libsvm for binary classification.. I wanted to try grid.py , as it is said to improve results.. I ran this script for five files in separate terminals , and the script has been running for more than 12 hours..

这是我现在5个终端的状态:

this is the state of my 5 terminals now :

[root@localhost tools]# python grid.py sarts_nonarts_feat.txt>grid_arts.txt
Warning: empty z range [61.3997:61.3997], adjusting to [60.7857:62.0137]
         line 2: warning: Cannot contour non grid data. Please use "set dgrid3d".
Warning: empty z range [61.3997:61.3997], adjusting to [60.7857:62.0137]
         line 4: warning: Cannot contour non grid data. Please use "set dgrid3d".

[root@localhost tools]# python grid.py sgames_nongames_feat.txt>grid_games.txt
Warning: empty z range [64.5867:64.5867], adjusting to [63.9408:65.2326]
         line 2: warning: Cannot contour non grid data. Please use "set dgrid3d".
Warning: empty z range [64.5867:64.5867], adjusting to [63.9408:65.2326]
         line 4: warning: Cannot contour non grid data. Please use "set dgrid3d".

[root@localhost tools]# python grid.py sref_nonref_feat.txt>grid_ref.txt
Warning: empty z range [62.4602:62.4602], adjusting to [61.8356:63.0848]
         line 2: warning: Cannot contour non grid data. Please use "set dgrid3d".
Warning: empty z range [62.4602:62.4602], adjusting to [61.8356:63.0848]
         line 4: warning: Cannot contour non grid data. Please use "set dgrid3d".

[root@localhost tools]# python grid.py sbiz_nonbiz_feat.txt>grid_biz.txt
Warning: empty z range [67.9762:67.9762], adjusting to [67.2964:68.656]
         line 2: warning: Cannot contour non grid data. Please use "set dgrid3d".
Warning: empty z range [67.9762:67.9762], adjusting to [67.2964:68.656]
         line 4: warning: Cannot contour non grid data. Please use "set dgrid3d".

[root@localhost tools]# python grid.py snews_nonnews_feat.txt>grid_news.txt
Wrong input format at line 494
Traceback (most recent call last):
  File "grid.py", line 223, in run
    if rate is None: raise "get no rate"
TypeError: exceptions must be classes or instances, not str

我已经将输出重定向到files,但是现在这些文件不包含任何内容. 并且,创建了以下文件:

I had redirected the outputs to files , but those files for now contain nothing.. And , the following files were created :

  • sbiz_nonbiz_feat.txt.out
  • sbiz_nonbiz_feat.txt.png
  • sarts_nonarts_feat.txt.out
  • sarts_nonarts_feat.txt.png
  • sgames_nongames_feat.txt.out
  • sgames_nongames_feat.txt.png
  • sref_nonref_feat.txt.out
  • sref_nonref_feat.txt.png
  • snews_nonnews_feat.txt.out(->为空)

.out文件中只有一行信息..
".png"文件是一些GNU图.

There's just one line of information in .out files..
the ".png" files are some GNU PLOTS .

但是我不明白上述GNUplots/警告所传达的内容..我应该重新运行它们吗?

But i dont understand what the above GNUplots / warnings convey .. Should i re-run them ?

任何人都可以告诉我,如果每个输入文件包含大约144000行,那么此脚本可能需要花费多少时间.

Can anyone please tell me on how much time this script might take if each input file contains about 144000 lines..

感谢和问候

推荐答案

libSVM常见问题解答了您的问题:

The libSVM faq speaks to your question:

问:为什么grid.py/easy.py有时会生成以下警告消息? 警告:空的z范围[62.5:62.5],调整为[61.875:63.125] 注意:不能轮廓化非网格数据! 没错,请忽略此消息.绘制轮廓时来自gnuplot.

Q: Why grid.py/easy.py sometimes generates the following warning message? Warning: empty z range [62.5:62.5], adjusting to [61.875:63.125] Notice: cannot contour non grid data! Nothing is wrong and please disregard the message. It is from gnuplot when drawing the contour.

作为旁注,您可以并行化grid.py操作. libSVM工具目录README文件对此有此说法:

As a side note, you can parallelize your grid.py operations. The libSVM tools directory README file has this to say on the matter:

并行网格搜索

您可以通过将作业调度到 共享相同文件系统的计算机集群.首先,您添加 grid.py中的计算机名称:

You can conduct a parallel grid search by dispatching jobs to a cluster of computers which share the same file system. First, you add machine names in grid.py:

ssh_workers = ["linux1","linux5","linux5"]

ssh_workers = ["linux1", "linux5", "linux5"]

,然后设置您的ssh,以便身份验证在没有 询问密码.

and then setup your ssh so that the authentication works without asking a password.

同一台机器(例如,此处为linux5)可以列出一次以上,如果 它具有多个CPU或更多RAM.如果本地计算机是 最好,您也可以扩大nr_local_worker.例如:

The same machine (e.g., linux5 here) can be listed more than once if it has multiple CPUs or has more RAM. If the local machine is the best, you can also enlarge the nr_local_worker. For example:

nr_local_worker = 2

nr_local_worker = 2

在我的Ubuntu 10.04安装中,grid.py实际上是/usr/bin/svm-grid.py

In my Ubuntu 10.04 installation grid.py is actually /usr/bin/svm-grid.py

这篇关于grid.py需要多少时间才能运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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