nabeel-oz / qlik-py-tools

Data Science algorithms for Qlik implemented as a Python Server Side Extension (SSE).
https://nabeel-oz.github.io/qlik-py-tools/
MIT License
186 stars 87 forks source link

2 non-Null rows limit in _prophet.py #128

Open danielsioli opened 2 years ago

danielsioli commented 2 years ago

Shouldn't line 246 in core/_prophet.py be if len(self.input_df) - self.input_df.y.isnull().sum() < 2:

instead of if len(self.input_df) - self.input_df.y.isnull().sum() <= 2:

?

That's the impression I get when reading the comment at 245:

If the input data frame contains less than 2 non-Null rows, prediction is not possible

abx-212 commented 2 years ago

Hello Daniel, I am new to Qlik-python analytics and I'm trying to make forecasting but I keep getting the following as an error, do you have a solution to this?

"""" REQUEST DATA FRAME: (0, 2) rows x cols

Empty DataFrame Columns: [ds, y] Index: [] ... Empty DataFrame Columns: [ds, y] Index: []

REQUEST NULL VALUES DATA FRAME: (1, 2) rows x cols

ds y 0 NaN 0

INPUT DATA FRAME: (0, 2) rows x cols

Empty DataFrame Columns: [ds, y] Index: [] ... Empty DataFrame Columns: [ds, y] Index: []

Forecast cannot be generated as the request contains less than two non-Null rows

"""""

Thanks