Skip to content

Feature calculation is stucked (issue on Multiprocessing lib & Windows) #35

@GGA-PERSO

Description

@GGA-PERSO

What happened + What you expected to happen

As your doc mentions it should be possible to add custom feature (I copy paste your function from README)
=> but nothing happens after a few longs minutes

Could you please check ?

Versions / Dependencies

0.4.2 (the last one)

Reproduction script

import pandas as pd
import numpy as np
from tsfeatures import tsfeatures

periods = 24
ind = pd.date_range(start='2021-01-01', periods=periods, freq='MS')
vals = np.random.rand(periods)
df = pd.DataFrame({'ds':ind, 'y':vals, 'unique_id':1})

def number_zeros(x, freq):
number = (x == 0).sum()
return {'number_zeros': number}

features_df = tsfeatures(df,freq=12, features=[number_zeros])
features_df

Issue Severity

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions