-1

I am new in Python with no coding and programming experience and I am trying to create a forecast model via Prophet in Python. Inserted below is the sample code from https://facebook.github.io/prophet/docs/saturating_forecasts.html#saturating-minimum for the Saturating Minimum, I would like to ask what does the value "10" means in the first line of the code.

df['y'] = 10 - df['y']
df['cap'] = 6
df['floor'] = 1.5
future['cap'] = 6
future['floor'] = 1.5
m = Prophet(growth='logistic')
m.fit(df)
fcst = m.predict(future)
fig = m.plot(fcst)
autarky
  • 19
  • 3

1 Answers1

0

They are just inverting the data trend. For example if you have a series:

df[y] = 1, 2, 3, 4

10 - df[y] = 9, 8, 7, 6

I think it is just for demonstrative purposes so they can show the use of the floor feature when the trend is downwards instead of upwards.

Sven Eberth
  • 3,057
  • 12
  • 24
  • 29