mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
feat(prophet): enable confidence intervals and y_hat without forecast (#17658)
* enable confidence intervals and y_hat without forecast * fix if statement Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
418c0b4e48
commit
cd88b8e81e
@@ -820,8 +820,8 @@ def prophet( # pylint: disable=too-many-arguments
|
||||
freq = PROPHET_TIME_GRAIN_MAP[time_grain]
|
||||
# check type at runtime due to marhsmallow schema not being able to handle
|
||||
# union types
|
||||
if not periods or periods < 0 or not isinstance(periods, int):
|
||||
raise QueryObjectValidationError(_("Periods must be a positive integer value"))
|
||||
if not isinstance(periods, int) or periods < 0:
|
||||
raise QueryObjectValidationError(_("Periods must be a whole number"))
|
||||
if not confidence_interval or confidence_interval <= 0 or confidence_interval >= 1:
|
||||
raise QueryObjectValidationError(
|
||||
_("Confidence interval must be between 0 and 1 (exclusive)")
|
||||
|
||||
Reference in New Issue
Block a user