簡體   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