我正在学习算法“热门话题”,我阅读了 Stanislav Nikolov 的文章,趋势或无趋势:一种用于对时间序列进行分类的新型非参数方法。
我尝试在 here 中下载他的项目.当我尝试运行时,出现错误:
hduser@master:~/rumor$ ./test_detection.py
Traceback (most recent call last):
File "./test_detection.py", line 6, in <module>
ts_viral = rumor.parsing.parse_timeseries('data/' + sys.argv[1])
IndexError: list index out of range
我打算在 Hadoop 集群上运行。我该怎么办?
最佳答案
这意味着您的程序需要一些命令行参数。 sys.argv 包含参数列表,由于您没有提供任何参数,因此出现“索引超出范围”错误。仔细阅读手册。
关于algorithm - 运行趋势或无趋势 Twitter 谣言项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16545411/