Python / fbprophet - Как настроить для сезона - PullRequest
0 голосов
/ 03 декабря 2018

Набор данных:

df = {'date': {0: '01/01/2017', 1: '02/01/2017', 2: '03/01/2017', 3: '04/01/2017', 4: '05/01/2017', 5: '06/01/2017', 6: '07/01/2017', 7: '08/01/2017', 8: '09/01/2017', 9: '10/01/2017', 10: '11/01/2017', 11: '12/01/2017', 12: '13/01/2017', 13: '14/01/2017', 14: '15/01/2017', 15: '16/01/2017', 16: '17/01/2017', 17: '18/01/2017', 18: '19/01/2017', 19: '20/01/2017', 20: '21/01/2017', 21: '22/01/2017', 22: '23/01/2017', 23: '24/01/2017', 24: '25/01/2017', 25: '26/01/2017', 26: '27/01/2017', 27: '28/01/2017', 28: '29/01/2017', 29: '30/01/2017', 30: '31/01/2017', 31: '01/02/2017', 32: '02/02/2017', 33: '03/02/2017', 34: '04/02/2017', 35: '05/02/2017', 36: '06/02/2017', 37: '07/02/2017', 38: '08/02/2017', 39: '09/02/2017', 40: '10/02/2017', 41: '11/02/2017', 42: '12/02/2017', 43: '13/02/2017', 44: '14/02/2017', 45: '15/02/2017', 46: '16/02/2017', 47: '17/02/2017', 48: '18/02/2017', 49: '19/02/2017', 50: '20/02/2017', 51: '21/02/2017', 52: '22/02/2017', 53: '23/02/2017', 54: '24/02/2017', 55: '25/02/2017', 56: '26/02/2017', 57: '27/02/2017', 58: '28/02/2017', 59: '01/03/2017', 60: '02/03/2017', 61: '03/03/2017', 62: '04/03/2017', 63: '05/03/2017', 64: '06/03/2017', 65: '07/03/2017', 66: '08/03/2017', 67: '09/03/2017', 68: '10/03/2017', 69: '11/03/2017', 70: '12/03/2017', 71: '13/03/2017', 72: '14/03/2017', 73: '15/03/2017', 74: '16/03/2017', 75: '17/03/2017', 76: '18/03/2017', 77: '19/03/2017', 78: '20/03/2017', 79: '21/03/2017', 80: '22/03/2017', 81: '23/03/2017', 82: '24/03/2017', 83: '25/03/2017', 84: '26/03/2017', 85: '27/03/2017', 86: '28/03/2017', 87: '29/03/2017', 88: '30/03/2017', 89: '31/03/2017', 90: '01/04/2017', 91: '02/04/2017', 92: '03/04/2017', 93: '04/04/2017', 94: '05/04/2017', 95: '06/04/2017', 96: '07/04/2017', 97: '08/04/2017', 98: '09/04/2017', 99: '10/04/2017', 100: '11/04/2017', 101: '12/04/2017', 102: '13/04/2017', 103: '14/04/2017', 104: '15/04/2017', 105: '16/04/2017', 106: '17/04/2017', 107: '18/04/2017', 108: '19/04/2017', 109: '20/04/2017', 110: '21/04/2017', 111: '22/04/2017', 112: '23/04/2017', 113: '24/04/2017', 114: '25/04/2017', 115: '26/04/2017', 116: '27/04/2017', 117: '28/04/2017', 118: '29/04/2017', 119: '30/04/2017', 120: '01/05/2017', 121: '02/05/2017', 122: '03/05/2017', 123: '04/05/2017', 124: '05/05/2017', 125: '06/05/2017', 126: '07/05/2017', 127: '08/05/2017', 128: '09/05/2017', 129: '10/05/2017', 130: '11/05/2017', 131: '12/05/2017', 132: '13/05/2017', 133: '14/05/2017', 134: '15/05/2017', 135: '16/05/2017', 136: '17/05/2017', 137: '18/05/2017', 138: '19/05/2017', 139: '20/05/2017', 140: '21/05/2017', 141: '22/05/2017', 142: '23/05/2017', 143: '24/05/2017', 144: '25/05/2017', 145: '26/05/2017', 146: '27/05/2017', 147: '28/05/2017', 148: '29/05/2017', 149: '30/05/2017', 150: '31/05/2017', 151: '01/06/2017', 152: '02/06/2017', 153: '03/06/2017', 154: '04/06/2017', 155: '05/06/2017', 156: '06/06/2017', 157: '07/06/2017', 158: '08/06/2017', 159: '09/06/2017', 160: '10/06/2017', 161: '11/06/2017', 162: '12/06/2017', 163: '13/06/2017', 164: '14/06/2017', 165: '15/06/2017', 166: '16/06/2017', 167: '17/06/2017', 168: '18/06/2017', 169: '19/06/2017', 170: '20/06/2017', 171: '21/06/2017', 172: '22/06/2017', 173: '23/06/2017', 174: '24/06/2017', 175: '25/06/2017', 176: '26/06/2017', 177: '27/06/2017', 178: '28/06/2017', 179: '29/06/2017', 180: '30/06/2017', 181: '01/07/2017', 182: '02/07/2017', 183: '03/07/2017', 184: '04/07/2017', 185: '05/07/2017', 186: '06/07/2017', 187: '07/07/2017', 188: '08/07/2017', 189: '09/07/2017', 190: '10/07/2017', 191: '11/07/2017', 192: '12/07/2017', 193: '13/07/2017', 194: '14/07/2017', 195: '15/07/2017', 196: '16/07/2017', 197: '17/07/2017', 198: '18/07/2017', 199: '19/07/2017', 200: '20/07/2017', 201: '21/07/2017', 202: '22/07/2017', 203: '23/07/2017', 204: '24/07/2017', 205: '25/07/2017', 206: '26/07/2017', 207: '27/07/2017', 208: '28/07/2017', 209: '29/07/2017', 210: '30/07/2017', 211: '31/07/2017', 212: '01/08/2017', 213: '02/08/2017', 214: '03/08/2017', 215: '04/08/2017', 216: '05/08/2017', 217: '06/08/2017', 218: '07/08/2017', 219: '08/08/2017', 220: '09/08/2017', 221: '10/08/2017', 222: '11/08/2017', 223: '12/08/2017', 224: '13/08/2017', 225: '14/08/2017', 226: '15/08/2017', 227: '16/08/2017', 228: '17/08/2017', 229: '18/08/2017', 230: '19/08/2017', 231: '20/08/2017', 232: '21/08/2017', 233: '22/08/2017', 234: '23/08/2017', 235: '24/08/2017', 236: '25/08/2017', 237: '26/08/2017', 238: '27/08/2017', 239: '28/08/2017', 240: '29/08/2017', 241: '30/08/2017', 242: '31/08/2017', 243: '01/09/2017', 244: '02/09/2017', 245: '03/09/2017', 246: '04/09/2017', 247: '05/09/2017', 248: '06/09/2017', 249: '07/09/2017', 250: '08/09/2017', 251: '09/09/2017', 252: '10/09/2017', 253: '11/09/2017', 254: '12/09/2017', 255: '13/09/2017', 256: '14/09/2017', 257: '15/09/2017', 258: '16/09/2017', 259: '17/09/2017', 260: '18/09/2017', 261: '19/09/2017', 262: '20/09/2017', 263: '21/09/2017', 264: '22/09/2017', 265: '23/09/2017', 266: '24/09/2017', 267: '25/09/2017', 268: '26/09/2017', 269: '27/09/2017', 270: '28/09/2017', 271: '29/09/2017', 272: '30/09/2017', 273: '01/10/2017', 274: '02/10/2017', 275: '03/10/2017', 276: '04/10/2017', 277: '05/10/2017', 278: '06/10/2017', 279: '07/10/2017', 280: '08/10/2017', 281: '09/10/2017', 282: '10/10/2017', 283: '11/10/2017', 284: '12/10/2017', 285: '13/10/2017', 286: '14/10/2017', 287: '15/10/2017', 288: '16/10/2017', 289: '17/10/2017', 290: '18/10/2017', 291: '19/10/2017', 292: '20/10/2017', 293: '21/10/2017', 294: '22/10/2017', 295: '23/10/2017', 296: '24/10/2017', 297: '25/10/2017', 298: '26/10/2017', 299: '27/10/2017', 300: '28/10/2017', 301: '29/10/2017', 302: '30/10/2017', 303: '31/10/2017', 304: '01/11/2017', 305: '02/11/2017', 306: '03/11/2017', 307: '04/11/2017', 308: '05/11/2017', 309: '06/11/2017', 310: '07/11/2017', 311: '08/11/2017', 312: '09/11/2017', 313: '10/11/2017', 314: '11/11/2017', 315: '12/11/2017', 316: '13/11/2017', 317: '14/11/2017', 318: '15/11/2017', 319: '16/11/2017', 320: '17/11/2017', 321: '18/11/2017', 322: '19/11/2017', 323: '20/11/2017', 324: '21/11/2017', 325: '22/11/2017', 326: '23/11/2017', 327: '24/11/2017', 328: '25/11/2017', 329: '26/11/2017', 330: '27/11/2017', 331: '28/11/2017', 332: '29/11/2017', 333: '30/11/2017', 334: '01/12/2017', 335: '02/12/2017', 336: '03/12/2017', 337: '04/12/2017', 338: '05/12/2017', 339: '06/12/2017', 340: '07/12/2017', 341: '08/12/2017', 342: '09/12/2017', 343: '10/12/2017', 344: '11/12/2017', 345: '12/12/2017', 346: '13/12/2017', 347: '14/12/2017', 348: '15/12/2017', 349: '16/12/2017', 350: '17/12/2017', 351: '18/12/2017', 352: '19/12/2017', 353: '20/12/2017', 354: '21/12/2017', 355: '22/12/2017', 356: '23/12/2017', 357: '24/12/2017', 358: '25/12/2017', 359: '26/12/2017', 360: '27/12/2017', 361: '28/12/2017', 362: '29/12/2017', 363: '30/12/2017', 364: '31/12/2017', 365: '01/01/2018', 366: '02/01/2018', 367: '03/01/2018', 368: '04/01/2018', 369: '05/01/2018', 370: '06/01/2018', 371: '07/01/2018', 372: '08/01/2018', 373: '09/01/2018', 374: '10/01/2018', 375: '11/01/2018', 376: '12/01/2018', 377: '13/01/2018', 378: '14/01/2018', 379: '15/01/2018', 380: '16/01/2018', 381: '17/01/2018', 382: '18/01/2018', 383: '19/01/2018', 384: '20/01/2018', 385: '21/01/2018', 386: '22/01/2018', 387: '23/01/2018', 388: '24/01/2018', 389: '25/01/2018', 390: '26/01/2018', 391: '27/01/2018', 392: '28/01/2018', 393: '29/01/2018', 394: '30/01/2018', 395: '31/01/2018', 396: '01/02/2018', 397: '02/02/2018', 398: '03/02/2018', 399: '04/02/2018', 400: '05/02/2018', 401: '06/02/2018', 402: '07/02/2018', 403: '08/02/2018', 404: '09/02/2018', 405: '10/02/2018', 406: '11/02/2018', 407: '12/02/2018', 408: '13/02/2018', 409: '14/02/2018', 410: '15/02/2018', 411: '16/02/2018', 412: '17/02/2018', 413: '18/02/2018', 414: '19/02/2018', 415: '20/02/2018', 416: '21/02/2018', 417: '22/02/2018', 418: '23/02/2018', 419: '24/02/2018', 420: '25/02/2018', 421: '26/02/2018', 422: '27/02/2018', 423: '28/02/2018', 424: '01/03/2018', 425: '02/03/2018', 426: '03/03/2018', 427: '04/03/2018', 428: '05/03/2018', 429: '06/03/2018', 430: '07/03/2018', 431: '08/03/2018', 432: '09/03/2018', 433: '10/03/2018', 434: '11/03/2018', 435: '12/03/2018', 436: '13/03/2018', 437: '14/03/2018', 438: '15/03/2018', 439: '16/03/2018', 440: '17/03/2018', 441: '18/03/2018', 442: '19/03/2018', 443: '20/03/2018', 444: '21/03/2018', 445: '22/03/2018', 446: '23/03/2018', 447: '24/03/2018', 448: '25/03/2018', 449: '26/03/2018', 450: '27/03/2018', 451: '28/03/2018', 452: '29/03/2018', 453: '30/03/2018', 454: '31/03/2018', 455: '01/04/2018', 456: '02/04/2018', 457: '03/04/2018', 458: '04/04/2018', 459: '05/04/2018', 460: '06/04/2018', 461: '07/04/2018', 462: '08/04/2018', 463: '09/04/2018', 464: '10/04/2018', 465: '11/04/2018', 466: '12/04/2018', 467: '13/04/2018', 468: '14/04/2018', 469: '15/04/2018', 470: '16/04/2018', 471: '17/04/2018', 472: '18/04/2018', 473: '19/04/2018', 474: '20/04/2018', 475: '21/04/2018', 476: '22/04/2018', 477: '23/04/2018', 478: '24/04/2018', 479: '25/04/2018', 480: '26/04/2018', 481: '27/04/2018', 482: '28/04/2018', 483: '29/04/2018', 484: '30/04/2018', 485: '01/05/2018', 486: '02/05/2018', 487: '03/05/2018', 488: '04/05/2018', 489: '05/05/2018', 490: '06/05/2018', 491: '07/05/2018', 492: '08/05/2018', 493: '09/05/2018', 494: '10/05/2018', 495: '11/05/2018', 496: '12/05/2018', 497: '13/05/2018', 498: '14/05/2018', 499: '15/05/2018', 500: '16/05/2018', 501: '17/05/2018', 502: '18/05/2018', 503: '19/05/2018', 504: '20/05/2018', 505: '21/05/2018', 506: '22/05/2018', 507: '23/05/2018', 508: '24/05/2018', 509: '25/05/2018', 510: '26/05/2018', 511: '27/05/2018', 512: '28/05/2018', 513: '29/05/2018', 514: '30/05/2018', 515: '31/05/2018', 516: '01/06/2018', 517: '02/06/2018', 518: '03/06/2018', 519: '04/06/2018', 520: '05/06/2018', 521: '06/06/2018', 522: '07/06/2018', 523: '08/06/2018', 524: '09/06/2018', 525: '10/06/2018', 526: '11/06/2018', 527: '12/06/2018', 528: '13/06/2018', 529: '14/06/2018', 530: '15/06/2018', 531: '16/06/2018', 532: '17/06/2018', 533: '18/06/2018', 534: '19/06/2018', 535: '20/06/2018', 536: '21/06/2018', 537: '22/06/2018', 538: '23/06/2018', 539: '24/06/2018', 540: '25/06/2018', 541: '26/06/2018', 542: '27/06/2018', 543: '28/06/2018', 544: '29/06/2018', 545: '30/06/2018', 546: '01/07/2018', 547: '02/07/2018', 548: '03/07/2018', 549: '04/07/2018', 550: '05/07/2018', 551: '06/07/2018', 552: '07/07/2018', 553: '08/07/2018', 554: '09/07/2018', 555: '10/07/2018', 556: '11/07/2018', 557: '12/07/2018', 558: '13/07/2018', 559: '14/07/2018', 560: '15/07/2018', 561: '16/07/2018', 562: '17/07/2018', 563: '18/07/2018', 564: '19/07/2018', 565: '20/07/2018', 566: '21/07/2018', 567: '22/07/2018', 568: '23/07/2018', 569: '24/07/2018', 570: '25/07/2018', 571: '26/07/2018', 572: '27/07/2018', 573: '28/07/2018', 574: '29/07/2018', 575: '30/07/2018', 576: '31/07/2018', 577: '01/08/2018', 578: '02/08/2018', 579: '03/08/2018', 580: '04/08/2018', 581: '05/08/2018', 582: '06/08/2018', 583: '07/08/2018', 584: '08/08/2018', 585: '09/08/2018', 586: '10/08/2018', 587: '11/08/2018', 588: '12/08/2018', 589: '13/08/2018', 590: '14/08/2018', 591: '15/08/2018', 592: '16/08/2018', 593: '17/08/2018', 594: '18/08/2018', 595: '19/08/2018', 596: '20/08/2018', 597: '21/08/2018', 598: '22/08/2018', 599: '23/08/2018', 600: '24/08/2018', 601: '25/08/2018', 602: '26/08/2018', 603: '27/08/2018', 604: '28/08/2018', 605: '29/08/2018', 606: '30/08/2018', 607: '31/08/2018', 608: '01/09/2018', 609: '02/09/2018', 610: '03/09/2018', 611: '04/09/2018', 612: '05/09/2018', 613: '06/09/2018', 614: '07/09/2018', 615: '08/09/2018', 616: '09/09/2018', 617: '10/09/2018', 618: '11/09/2018', 619: '12/09/2018', 620: '13/09/2018', 621: '14/09/2018', 622: '15/09/2018', 623: '16/09/2018', 624: '17/09/2018', 625: '18/09/2018', 626: '19/09/2018', 627: '20/09/2018', 628: '21/09/2018', 629: '22/09/2018', 630: '23/09/2018', 631: '24/09/2018', 632: '25/09/2018', 633: '26/09/2018', 634: '27/09/2018', 635: '28/09/2018', 636: '29/09/2018', 637: '30/09/2018', 638: '01/10/2018', 639: '02/10/2018', 640: '03/10/2018', 641: '04/10/2018', 642: '05/10/2018', 643: '06/10/2018', 644: '07/10/2018', 645: '08/10/2018', 646: '09/10/2018', 647: '10/10/2018', 648: '11/10/2018', 649: '12/10/2018', 650: '13/10/2018', 651: '14/10/2018', 652: '15/10/2018', 653: '16/10/2018', 654: '17/10/2018', 655: '18/10/2018', 656: '19/10/2018', 657: '20/10/2018', 658: '21/10/2018', 659: '22/10/2018', 660: '23/10/2018', 661: '24/10/2018', 662: '25/10/2018', 663: '26/10/2018', 664: '27/10/2018', 665: '28/10/2018', 666: '29/10/2018', 667: '30/10/2018', 668: '31/10/2018', 669: '01/11/2018', 670: '02/11/2018', 671: '03/11/2018', 672: '04/11/2018', 673: '05/11/2018', 674: '06/11/2018', 675: '07/11/2018', 676: '08/11/2018', 677: '09/11/2018', 678: '10/11/2018', 679: '11/11/2018', 680: '12/11/2018', 681: '13/11/2018', 682: '14/11/2018', 683: '15/11/2018', 684: '16/11/2018', 685: '17/11/2018', 686: '18/11/2018', 687: '19/11/2018', 688: '20/11/2018', 689: '21/11/2018', 690: '22/11/2018', 691: '23/11/2018', 692: '24/11/2018', 693: '25/11/2018', 694: '26/11/2018', 695: '27/11/2018', 696: '28/11/2018', 697: '29/11/2018', 698: '30/11/2018', 699: '01/12/2018', 700: '02/12/2018'}, 'bookings': {0: 1321, 1: 2120, 2: 1598, 3: 1415, 4: 943, 5: 1671, 6: 1322, 7: 1107, 8: 1291, 9: 1319, 10: 1238, 11: 1158, 12: 2205, 13: 1031, 14: 1093, 15: 1510, 16: 902, 17: 1481, 18: 1682, 19: 1363, 20: 1901, 21: 1084, 22: 1149, 23: 1108, 24: 968, 25: 1054, 26: 1252, 27: 1166, 28: 2656, 29: 2962, 30: 1361, 31: 1704, 32: 2320, 33: 1340, 34: 1270, 35: 3102, 36: 2124, 37: 1001, 38: 1621, 39: 1299, 40: 832, 41: 2299, 42: 1342, 43: 1626, 44: 1224, 45: 1151, 46: 2092, 47: 2466, 48: 1843, 49: 2278, 50: 3174, 51: 1923, 52: 2279, 53: 2313, 54: 1802, 55: 2051, 56: 2917, 57: 1951, 58: 1641, 59: 1525, 60: 2671, 61: 2289, 62: 2953, 63: 4476, 64: 2841, 65: 3022, 66: 1796, 67: 1529, 68: 2140, 69: 1431, 70: 2702, 71: 3008, 72: 3014, 73: 2768, 74: 1836, 75: 1553, 76: 2807, 77: 2551, 78: 2816, 79: 1336, 80: 3226, 81: 3238, 82: 2214, 83: 2291, 84: 2819, 85: 2733, 86: 3410, 87: 3034, 88: 3238, 89: 3352, 90: 2503, 91: 4091, 92: 4576, 93: 3694, 94: 2765, 95: 1864, 96: 1804, 97: 2053, 98: 2479, 99: 2725, 100: 1855, 101: 3448, 102: 1946, 103: 2600, 104: 1379, 105: 1601, 106: 5007, 107: 2792, 108: 2180, 109: 2104, 110: 2668, 111: 3399, 112: 4040, 113: 1580, 114: 1909, 115: 4073, 116: 1846, 117: 2814, 118: 1675, 119: 2820, 120: 5138, 121: 3229, 122: 3462, 123: 4080, 124: 3743, 125: 2809, 126: 2205, 127: 3227, 128: 3634, 129: 4114, 130: 2808, 131: 2238, 132: 3453, 133: 2493, 134: 4944, 135: 3092, 136: 4675, 137: 1807, 138: 1587, 139: 1294, 140: 2488, 141: 2208, 142: 1718, 143: 2138, 144: 5008, 145: 2590, 146: 2117, 147: 3936, 148: 3067, 149: 4336, 150: 2973, 151: 3208, 152: 4677, 153: 3654, 154: 2410, 155: 3476, 156: 2430, 157: 4166, 158: 5355, 159: 4226, 160: 4282, 161: 2494, 162: 2271, 163: 3973, 164: 5180, 165: 5509, 166: 4360, 167: 1769, 168: 4512, 169: 5616, 170: 4194, 171: 2671, 172: 2020, 173: 2100, 174: 5045, 175: 5546, 176: 5221, 177: 2460, 178: 3804, 179: 4152, 180: 3742, 181: 4194, 182: 4333, 183: 3531, 184: 6565, 185: 3976, 186: 2867, 187: 4971, 188: 4565, 189: 3473, 190: 5007, 191: 4983, 192: 7335, 193: 4574, 194: 5871, 195: 3800, 196: 6560, 197: 7456, 198: 4926, 199: 5013, 200: 4861, 201: 4058, 202: 5729, 203: 6875, 204: 4808, 205: 6479, 206: 2807, 207: 5219, 208: 3217, 209: 5610, 210: 5116, 211: 3476, 212: 7263, 213: 8130, 214: 3636, 215: 4777, 216: 4531, 217: 6248, 218: 3908, 219: 6257, 220: 4238, 221: 7233, 222: 3041, 223: 4630, 224: 6489, 225: 4684, 226: 2982, 227: 7121, 228: 6694, 229: 5101, 230: 4241, 231: 2372, 232: 5870, 233: 4757, 234: 3924, 235: 4654, 236: 2115, 237: 2983, 238: 2426, 239: 4146, 240: 2756, 241: 2370, 242: 2563, 243: 4367, 244: 1559, 245: 2728, 246: 3223, 247: 4222, 248: 3758, 249: 3289, 250: 1936, 251: 1706, 252: 1856, 253: 3307, 254: 2228, 255: 3591, 256: 3367, 257: 1934, 258: 1992, 259: 2378, 260: 2062, 261: 1879, 262: 1598, 263: 1353, 264: 3018, 265: 892, 266: 1188, 267: 3407, 268: 2440, 269: 1613, 270: 1171, 271: 2144, 272: 1253, 273: 2583, 274: 2607, 275: 1620, 276: 2517, 277: 2056, 278: 2048, 279: 986, 280: 1621, 281: 2404, 282: 1955, 283: 2130, 284: 1566, 285: 1102, 286: 704, 287: 1213, 288: 1151, 289: 1646, 290: 1810, 291: 2229, 292: 1653, 293: 1779, 294: 1951, 295: 2525, 296: 1351, 297: 2146, 298: 1929, 299: 2244, 300: 730, 301: 2306, 302: 2464, 303: 1115, 304: 2007, 305: 1475, 306: 1759, 307: 1624, 308: 1172, 309: 2347, 310: 1201, 311: 1731, 312: 933, 313: 2023, 314: 1044, 315: 1876, 316: 1871, 317: 861, 318: 1604, 319: 1294, 320: 1942, 321: 847, 322: 2130, 323: 1293, 324: 1016, 325: 2143, 326: 1120, 327: 2530, 328: 1692, 329: 1980, 330: 2270, 331: 1279, 332: 2136, 333: 1733, 334: 1752, 335: 1406, 336: 852, 337: 1992, 338: 1500, 339: 1780, 340: 1065, 341: 705, 342: 796, 343: 1300, 344: 2061, 345: 1723, 346: 1490, 347: 1084, 348: 1113, 349: 735, 350: 825, 351: 1607, 352: 998, 353: 796, 354: 1020, 355: 1062, 356: 1345, 357: 661, 358: 660, 359: 1168, 360: 2567, 361: 1090, 362: 943, 363: 1068, 364: 1084, 365: 744, 366: 1488, 367: 1799, 368: 1495, 369: 1667, 370: 1502, 371: 2026, 372: 2519, 373: 1758, 374: 1280, 375: 1417, 376: 1624, 377: 2505, 378: 4017, 379: 2159, 380: 1811, 381: 3177, 382: 1401, 383: 1472, 384: 2824, 385: 3620, 386: 2914, 387: 3280, 388: 1346, 389: 1983, 390: 2816, 391: 1688, 392: 2623, 393: 1696, 394: 3269, 395: 2460, 396: 2750, 397: 3107, 398: 2704, 399: 4018, 400: 1267, 401: 3166, 402: 2545, 403: 2364, 404: 2543, 405: 2455, 406: 4592, 407: 3344, 408: 2117, 409: 1650, 410: 1485, 411: 1711, 412: 2032, 413: 4209, 414: 2958, 415: 1578, 416: 2336, 417: 2178, 418: 1538, 419: 1243, 420: 3055, 421: 1461, 422: 2204, 423: 1549, 424: 2165, 425: 2378, 426: 2302, 427: 4959, 428: 2098, 429: 3720, 430: 2600, 431: 1960, 432: 1809, 433: 2249, 434: 3443, 435: 4136, 436: 3995, 437: 3971, 438: 3638, 439: 3618, 440: 1965, 441: 4234, 442: 4466, 443: 1800, 444: 3112, 445: 3845, 446: 1829, 447: 2142, 448: 3678, 449: 2345, 450: 2341, 451: 2577, 452: 3043, 453: 2292, 454: 3665, 455: 2001, 456: 4137, 457: 2589, 458: 2891, 459: 4068, 460: 4476, 461: 1991, 462: 2503, 463: 4070, 464: 3028, 465: 2360, 466: 4522, 467: 3604, 468: 1828, 469: 5575, 470: 3126, 471: 2040, 472: 2423, 473: 2037, 474: 3521, 475: 2631, 476: 6056, 477: 3930, 478: 1976, 479: 4781, 480: 3594, 481: 3728, 482: 3081, 483: 3578, 484: 3661, 485: 5168, 486: 4970, 487: 5661, 488: 1909, 489: 3595, 490: 4857, 491: 4428, 492: 3438, 493: 5195, 494: 2705, 495: 5214, 496: 3698, 497: 4641, 498: 2668, 499: 5697, 500: 5343, 501: 3455, 502: 4285, 503: 3045, 504: 4246, 505: 7447, 506: 5278, 507: 5044, 508: 3152, 509: 4094, 510: 4439, 511: 6518, 512: 5619, 513: 5687, 514: 5881, 515: 6972, 516: 3180, 517: 2569, 518: 3769, 519: 6369, 520: 7647, 521: 6467, 522: 5384, 523: 5448, 524: 4072, 525: 5603, 526: 7134, 527: 5781, 528: 6482, 529: 3097, 530: 4521, 531: 5614, 532: 4019, 533: 5905, 534: 4993, 535: 6241, 536: 4025, 537: 4956, 538: 4568, 539: 7849, 540: 5183, 541: 7267, 542: 6525, 543: 8567, 544: 4406, 545: 7138, 546: 7716, 547: 7897, 548: 6124, 549: 9031, 550: 9882, 551: 8223, 552: 8084, 553: 7118, 554: 7512, 555: 7330, 556: 5230, 557: 9010, 558: 5061, 559: 3768, 560: 8035, 561: 9365, 562: 5510, 563: 9968, 564: 10214, 565: 5277, 566: 5582, 567: 7743, 568: 4839, 569: 6697, 570: 4830, 571: 5707, 572: 5337, 573: 4359, 574: 8244, 575: 6158, 576: 7791, 577: 4158, 578: 6553, 579: 5652, 580: 7704, 581: 7254, 582: 6902, 583: 10189, 584: 4496, 585: 9339, 586: 6260, 587: 5464, 588: 3512, 589: 5536, 590: 4418, 591: 3674, 592: 6667, 593: 6959, 594: 2898, 595: 2733, 596: 3395, 597: 3602, 598: 6680, 599: 5758, 600: 3332, 601: 3802, 602: 5524, 603: 2718, 604: 2893, 605: 4764, 606: 5732, 607: 3746, 608: 4310, 609: 3332, 610: 2367, 611: 4762, 612: 2391, 613: 4453, 614: 3727, 615: 3722, 616: 2707, 617: 5423, 618: 2059, 619: 3134, 620: 2983, 621: 1555, 622: 2544, 623: 4125, 624: 3496, 625: 1489, 626: 2426, 627: 1744, 628: 2015, 629: 1411, 630: 1741, 631: 4087, 632: 3784, 633: 2350, 634: 2032, 635: 2818, 636: 1310, 637: 2639, 638: 3260, 639: 1482, 640: 2637, 641: 2112, 642: 2423, 643: 1330, 644: 1664, 645: 1158, 646: 2284, 647: 2004, 648: 1416, 649: 2059, 650: 958, 651: 2055, 652: 1126, 653: 1728, 654: 2447, 655: 1261, 656: 1429, 657: 825, 658: 1774, 659: 2144, 660: 2406, 661: 1002, 662: 1903, 663: 2245, 664: 1738, 665: 1027, 666: 1468, 667: 1422, 668: 2128, 669: 2607, 670: 1631, 671: 1872, 672: 1650, 673: 1614, 674: 1769, 675: 913, 676: 1482, 677: 1450, 678: 1780, 679: 846, 680: 1144, 681: 1841, 682: 1115, 683: 1214, 684: 1195, 685: 1254, 686: 1346, 687: 2273, 688: 1235, 689: 854, 690: 1866, 691: 1026, 692: 1681, 693: 2853, 694: 2219, 695: 2283, 696: 1355, 697: 1512, 698: 1008, 699: 862, 700: 1383}}

Использование fbprophet Мне удалось получить прогноз, единственная проблема, с которой я столкнулся, это наличие учетной записи прогноза на конец периода.период с октября по январь / февраль

Результат:

При экспорте результатов в Таблицу я получаю следующий график: As you can see, oct to feb periods look over forecasted

Как вы видите, периоды октябрь-февраль выглядят слишком прогнозируемыми.

Код:

import pandas as pd
import numpy as np
from fbprophet import Prophet

df['floor'] = 0

#holidays
christmas = pd.DataFrame({
  'holiday': 'christmas',
  'ds': pd.to_datetime(['2008-12-25', '2009-12-25', '2010-12-25',
                        '2011-12-25', '2012-12-25', '2013-12-25',
                        '2014-12-25', '2015-12-25', '2016-12-25',
                        '2017-12-25', '2018-12-25', '2019-12-25']),
  'lower_window': -1,
  'upper_window':  1,
})

holidays = christmas

m = Prophet(holidays=holidays,
            seasonality_mode='multiplicative',
            holidays_prior_scale=0.05
           )
m.fit(df)

future = m.make_future_dataframe(periods=365)
future['floor'] = 0

forecast = m.predict(future)
fig = m.plot(forecast)

Любые идеи о том, что я делаюнеправильно и как я могу настроить модель для более точного учета этих периодов?

1 Ответ

0 голосов
/ 03 апреля 2019

Так как у вас есть мультипликативная сезонность, чтобы быть правдой, влияние сезонности фактически умножается период за периодом, если вы чувствуете, что оно превышает прогнозирование, уменьшите порядок фурье сезонности.

https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#prior-scale-for-holidays-and-seasonality

проверьте эту страницу и уменьшите порядок Фурье, так как он может помочь вам в отображении меньших значений

...