繁体   English   中英

tsfresh extract_features 运行时错误“freeze_support”

[英]tsfresh extract_features runtime error "freeze_support"

我最近安装了tsfresh包来提取我的时间序列数据的特征。 我尝试运行文档中的示例并收到以下错误:

RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

我有点困惑,因为它实际上是示例代码:

from tsfresh.examples import load_robot_execution_failures
from tsfresh import extract_features

df, _ = load_robot_execution_failures()
X = extract_features(df, column_id='id', column_sort='time')

当我用我自己的数据尝试这个函数时,我得到了同样的错误。 我究竟做错了什么?

我认为问题是有解决办法的。 您可以尝试在函数调用周围放置"if __name__ == __main__:"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM