ML Time series
ml ts forecastml ts forecastml ts smaml ts emaml ts diffml ts lag_matrixml ts acfml ts pacfml ts adfml ts kalmanml ts decomposeml ts stlml ts stlml ts saxml ts sax_distanceml loessml ts cusumml ts cusumml ts changepointsml ts changepointsml ts grangerml ts varml ts varml ts sarimaxml ts auto_arimaml ts auto_arimaml ts etsml ts etsml ts garchml ts garchml ts dwtml ts denoiseml ts denoise

ml ts forecast <method> <json_values> <horizon>


Description

    Forecast with the default parameters: naive, drift, mean, ses (simple exponential smoothing, alpha estimated), holt (trend, alpha and beta estimated)

Parameters

    method:   naive, drift, mean, ses, holt - String - required
    json_values:   The values - String - required
    horizon:   The number of future steps - Number - required
admin
ml ts forecast "drift" "[10.2, 10.8, 11.1, 11.9, 12.4, 12.8, 13.5, 14.1, 14.4, 15.2, 15.6, 16.3]" 3
mentdb
{"forecast": [16.854545454545455, 17.40909090909091, 17.963636363636365], "lower_95": [16.492078732376076, 16.877135192957873, 17.289259408410878], "upper_95": [17.217012176714835, 17.941046625223947, 18.63801331886185], "fitted": [null, 10.754545454545454, 11.354545454545455, 11.654545454545454, 12.454545454545455, 12.954545454545455, 13.354545454545455, 14.054545454545455, 14.654545454545454, 14.954545454545455, 15.754545454545454, 16.154545454545456], "rmse": 0.17768018441538228}
Holt: level and trend estimated
admin
ml ts forecast "holt" "[10.2, 10.8, 11.1, 11.9, 12.4, 12.8, 13.5, 14.1, 14.4, 15.2, 15.6, 16.3]" 3
mentdb
{"params": {"alpha": 0.7164642290406817, "beta": 0.09579697940946566}, "aic": -28.89114938093148, "forecast": [16.813153153652358, 17.363933409360413, 17.91471366506847], "lower_95": [16.311432115497563, 16.746730676495893, 17.200462710022737], "upper_95": [17.314874191807153, 17.981136142224933, 18.6289646201142], "fitted": [10.8, 10.928940397177376, 11.386528311308883, 11.71154422015861, 12.38980392267144, 12.941046733733183, 13.374248722826177, 14.007232895728588, 14.622952168934935, 14.997167530054238, 15.690363782889428, 16.167293280391437], "rmse": 0.2336811053161429}

ml ts forecast <method> <json_values> <horizon> <json_params>


Description

    Forecast with parameters.
Methods and parameters:
- seasonal_naive {"period"}
- ses {"alpha"}
- holt {"alpha", "beta"}
- holt_winters {"period", "seasonal": "additive" or "multiplicative", "alpha", "beta", "gamma"}
- arima {"p", "d", "q"} (conditional sum of squares)
The smoothing parameters not given are estimated (minimum of the squared one-step errors). The 95% intervals of ses, holt and holt_winters are approximate.

Parameters

    method:   The method - String - required
    json_values:   The values - String - required
    horizon:   The number of future steps - Number - required
    json_params:   The parameters - String - required
admin
ml ts forecast "holt_winters" "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 6 "{\"period\": 12, \"seasonal\": \"multiplicative\"}"
mentdb
{"params": {"alpha": 0.5639465653311749, "beta": 2.753966563508764E-11, "gamma": 4.114557697941552E-19, "period": 12, "seasonal": "multiplicative"}, "aic": 151.47986616859245, "forecast": [158.0918480253278, 167.57026469616662, 188.5804299102412, 185.39780052266684, 174.93513092712675, 196.33016456237186], "lower_95": [147.33143034334216, 155.2166878545694, 174.8168862941623, 170.35587893790364, 158.71527651801986, 179.01231396990275], "upper_95": [168.85226570731345, 179.92384153776385, 202.34397352632013, 200.43972210743004, 191.15498533623364, 213.64801515484098], "fitted": [112.9578947368421, 119.44928024260406, 133.83588973143972, 130.88564126888514, 122.80611712308335, 137.03329189621468, 150.23779198775551, 150.24158635580224, 138.06135650544715, 120.80426704390665, 105.57705949509162, 119.78946534066993, 113.69852084585301, 121.57200779631748, 139.91817584612582, 138.43773208858994, 129.06884687853304, 142.59693318536495, 161.55299145127316, 167.58244238317704, 156.41066421140832, 138.66135724454426, 119.28224716492986, 132.96877166304566, 130.92915726363432, 147.3127334026727, 167.6147395591398, 170.63222754529372, 157.04800906673222, 185.7811999312516, 200.12628432936006, 200.75690962425273, 184.73201249464282, 162.29706015032994, 142.58251188845674, 164.97224440526804], "rmse": 5.256380046152388}
ARIMA(1, 1, 1)
admin
ml ts forecast "arima" "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 3 "{\"p\": 1, \"d\": 1, \"q\": 1}"
mentdb
{"params": {"ar": [-0.6976995459303359], "ma": [0.998999999977586], "mean": 0, "d": 1}, "aic": 282.0285924411685, "forecast": [166.6663405825697, 166.20143506067586, 166.5257994322017], "lower_95": [139.19257498372045, 121.11278471870048, 112.38194559373899], "upper_95": [194.14010618141893, 211.29008540265124, 220.6696532706644], "fitted": [null, null, 113.81380272441798, 140.4002174348741, 119.7042814206073, 127.87601922822695, 132.34906314781688, 154.56519181788576, 141.4413733740793, 138.93646255058079, 110.94436619323236, 107.52807136207157, 118.69366306603108, 113.40312923490875, 130.90957888881013, 140.6148375008975, 133.5769746123113, 123.40859782179663, 157.82102167312348, 167.5151088837396, 172.48240622508845, 151.90447073262527, 131.55692238678947, 109.71692590866722, 152.11260282237396, 134.40601205095618, 162.08989623109358, 174.3586063787315, 162.11824541685687, 175.5925769149655, 176.2188183863135, 207.10670996702513, 190.9013967431236, 187.57099784272924, 151.803963166154, 151.3650335320276], "rmse": 14.017484920926506}
Seasonal naive
admin
ml ts forecast "seasonal_naive" "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 4 "{\"period\": 12}"
mentdb
{"forecast": [145, 150, 178, 163], "lower_95": [97.30530569352914, 102.30530569352914, 130.30530569352914, 115.30530569352914], "upper_95": [192.69469430647086, 197.69469430647086, 225.69469430647086, 210.69469430647086], "fitted": [null, null, null, null, null, null, null, null, null, null, null, null, 112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140], "rmse": 24.33447485906911}
Used in use cases (2 recipes)

    Forecaster & econometrician › Seasonal forecast with Holt-Winters
    Forecaster & econometrician › Stationarity test then ARIMA forecast
Often used with

    ml ts adf

ml ts sma <json_values> <window>


Description

    Simple moving average (null before the first full window)

Parameters

    json_values:   The values - String - required
    window:   The window size - Number - required
admin
ml ts sma "[1, 2, 3, 4, 5, 6]" 3
mentdb
[null, null, 2, 3, 4, 5]

ml ts ema <json_values> <alpha>


Description

    Exponential moving average

Parameters

    json_values:   The values - String - required
    alpha:   The smoothing factor in ]0, 1] - Number - required
admin
ml ts ema "[1, 2, 3, 4, 5, 6]" 0.5
mentdb
[1, 1.5, 2.25, 3.125, 4.0625, 5.03125]

ml ts diff <json_values> <lag>


Description

    Differences x(t) - x(t - lag)

Parameters

    json_values:   The values - String - required
    lag:   The lag (12 for a yearly season of monthly data) - Number - required
admin
ml ts diff "[1, 4, 9, 16, 25]" 1
mentdb
[3, 5, 7, 9]

ml ts lag_matrix <json_values> <lags>


Description

    Build a supervised data set from a series: X = the previous values (lag 1 first), y = the value

Parameters

    json_values:   The values - String - required
    lags:   The number of lags - Number - required
admin
ml ts lag_matrix "[1, 2, 3, 4, 5]" 2
mentdb
{"X": [[2, 1], [3, 2], [4, 3]], "y": [3, 4, 5]}

ml ts acf <json_values> <nlags>


Description

    Autocorrelation function and the 95% bound (1.96 / sqrt(n))

Parameters

    json_values:   The values - String - required
    nlags:   The number of lags - Number - required
admin
ml ts acf "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 3
mentdb
{"acf": [1, 0.7850369656059145, 0.539720806355329, 0.37637186021949764], "confidence_bound": 0.326660664090009}

ml ts pacf <json_values> <nlags>


Description

    Partial autocorrelation function (Durbin-Levinson) and the 95% bound

Parameters

    json_values:   The values - String - required
    nlags:   The number of lags - Number - required
admin
ml ts pacf "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 3
mentdb
{"pacf": [1, 0.7850369656059145, -0.1995278772332708, 0.06722308328568581], "confidence_bound": 0.326660664090009}

ml ts adf <json_values> <lags>


Description

    Augmented Dickey-Fuller unit root test with a constant (H0: the series is not stationary): statistic, MacKinnon p-value, critical values

Parameters

    json_values:   The values - String - required
    lags:   The number of lags or auto (AIC) - String - required
admin
ml ts adf "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" "auto"
mentdb
{"statistic": -2.00218944805564, "p_value": 0.2856139284278276, "lags": 0, "nobs": 35, "critical_values": {"1%": -3.6327426647230316, "5%": -2.948510204081633, "10%": -2.6130173469387756}, "stationary_5pct": false}
White noise like series
admin
ml ts adf "[0.5, -1.2, 0.3, 0.9, -0.4, 1.1, -0.8, 0.2, -0.6, 0.7, -1, 0.4, 0.1, -0.3, 0.8, -0.9, 0.6, -0.2, 0.3, -0.7, 1.2, -0.5, 0.2, -0.1, 0.9]" 0
mentdb
{"statistic": -10.833509498328151, "p_value": 1.6846405677065012E-19, "lags": 0, "nobs": 24, "critical_values": {"1%": -3.737709215856481, "5%": -2.9922162731481485, "10%": -2.635746736111111}, "stationary_5pct": true}
Used in use cases (1 recipe)

    Forecaster & econometrician › Stationarity test then ARIMA forecast
Often used with

    ml ts forecast

ml ts kalman <json_values> <q> <r>


Description

    Kalman filter of a local level model (random walk + measurement noise): filtered values, smoothed values (Rauch-Tung-Striebel) and variance

Parameters

    json_values:   The measures - String - required
    q:   The variance of the process - Number - required
    r:   The variance of the measure - Number - required
admin
ml ts kalman "[10.2, 9.8, 10.5, 10.1, 9.7, 10.4]" 0.01 0.25
mentdb
{"filtered": [10.2, 10.05974025974026, 10.183414269704894, 10.163149023777743, 10.061004021687417, 10.131071803013347], "smoothed": [10.131416554817196, 10.125929879202571, 10.13348039875605, 10.12637013425977, 10.12031467513388, 10.131071803013347], "variance": [0.125, 0.08766233766233766, 0.07022786701531565, 0.060736748037374715, 0.05513614238953056, 0.05167301812451083]}
Used in use cases (1 recipe)

    IoT & sensor engineer › Smooth a noisy temperature with a Kalman filter
Often used with

    math abs  ·  math sqrt

ml ts decompose <json_values> <period> <model>


Description

    Classical decomposition: trend (centered moving average), seasonal and residual

Parameters

    json_values:   The values - String - required
    period:   The period - Number - required
    model:   additive or multiplicative - String - required
admin
ml ts decompose "[10, 20, 30, 12, 22, 32, 14, 24, 34]" 3 "additive"
mentdb
{"trend": [null, 20, 20.666666666666668, 21.333333333333332, 22, 22.666666666666668, 23.333333333333332, 24, null], "seasonal": [-9.333333333333332, 0, 9.333333333333332, -9.333333333333332, 0, 9.333333333333332, -9.333333333333332, 0, 9.333333333333332], "residual": [null, 0, 0, 0, 0, 0, 0, 0, null], "seasonal_index": [-9.333333333333332, 0, 9.333333333333332]}

ml ts stl <json_values> <period>


Description

    STL decomposition (seasonal-trend by loess, Cleveland 1990, inner loop): trend, seasonal and residual, with the strength of the trend and of the season (0 to 1)

Parameters

    json_values:   The values - String - required
    period:   The period - Number - required
admin
ml ts stl "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 12
mentdb
{"trend": [123.87433099668847, 124.47879996890329, 125.09145003473009, 125.71390990795011, 126.34778701011012, 126.99450743277497, 127.65454490889435, 128.32805733884874, 129.01516359520537, 129.715491459314, 130.42765004138366, 131.1548757079323, 132.23757795870884, 133.45152120756862, 134.81140804735801, 136.32471245261507, 137.99281600678356, 139.8097627519343, 141.78153372685244, 143.90472051101372, 146.15914284290034, 148.5112516081217, 150.91554539756925, 153.3306340009125, 155.73274992958525, 158.01234921886024, 160.2923010756976, 162.57653916219198, 164.86107232145133, 167.14210184222935, 169.41608797090765, 171.6806075884798, 173.9344476319024, 176.17736938169168, 178.4099209404479, 180.6327988910184], "seasonal": [-12.638690455425314, -5.890529243648389, 6.063199189076499, 3.1289996860676266, -8.087942747163316, 8.512412402183703, 21.66188885453295, 20.797393636038475, 8.241319273710133, -11.03245237001968, -27.852077998926923, -12.686068181583838, -12.991141412530492, -6.492833903968495, 10.510404227197256, 1.2706572269253353, -4.3277377193069135, 9.96048918450009, 26.89182906511327, 25.036902870540985, 10.261825684545393, -13.541798605290367, -32.4943830309975, -13.573141389942226, -13.194830427990265, -8.92266164734586, 15.584480308698557, -0.7894801616613538, 3.567781277259744, 10.765291122494348, 30.542699129643278, 28.343291428793517, 11.494522589502761, -14.026482873839438, -33.04795460516557, -13.040979867769877], "residual": [0.7643594587368483, -0.5882707252549011, 0.8453507761934134, 0.15709040598225954, 2.740155737053186, -0.5069198349586657, -1.3164337634272982, -1.1254509748872152, -1.2564828689154979, 0.31696091070568855, 1.4244279575432586, -0.46880752634845635, -4.246436546178344, -0.9586873036001293, -4.3218122745552705, -2.595369679540397, -8.665078287476632, -0.7702519364343914, 1.326637208034299, 1.058376618445294, 1.5790314725542771, -1.969453002831358, -4.421162366571764, 0.24250738902972557, 2.4620804984050153, 0.9103124284856108, 2.123218615603861, 1.2129409994693674, 3.571146401288928, 0.09260703527630199, -0.9587871005509214, -1.0238990172733224, -1.4289702214051658, -0.150886507852249, 0.6380336647176534, -1.5918190232485472], "trend_strength": 0.9844492921394747, "seasonal_strength": 0.9811252803508086}

ml ts stl <json_values> <period> <json_params>


Description

    STL decomposition with parameters: seasonal_span (7), trend_span (computed from the period), iterations (2)

Parameters

    json_values:   The values - String - required
    period:   The period - Number - required
    json_params:   The parameters - String - required
admin
ml ts stl "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 12 "{\"seasonal_span\": 13}"
mentdb
{"trend": [124.57404426305344, 125.07896918871144, 125.58904732406846, 126.10556787674122, 126.62979372050536, 127.16273627115599, 127.70401817758469, 128.2526958548205, 128.80765180820657, 129.3671980864848, 129.93233912997118, 130.81465376889994, 131.86580872509958, 133.07002728443464, 134.42472318289472, 135.93711596870244, 137.60685889243334, 139.44174854208836, 141.4566975090064, 143.65912277345643, 146.02348190335204, 148.4910072085416, 150.989241931878, 153.46285684815277, 155.88899698179776, 158.25365257597716, 160.45573428767304, 162.66391592375118, 164.87623383818752, 167.08513533728967, 169.2843834476672, 171.47026056499504, 173.64117928196288, 175.79705751714795, 177.93892574543906, 180.06797532420632], "seasonal": [-13.133819420071744, -6.2665363155786, 5.7681265457186495, 2.9167063012873853, -8.21476461496654, 8.469238263944618, 21.698232887813106, 20.90759318209714, 8.423159584930291, -10.77193876515137, -27.49575751489361, -12.505435413398057, -13.087341596779991, -6.629768760437471, 10.430478835368582, 1.2492317099692103, -4.293643849201818, 10.040027754498784, 27.002264596080735, 25.15950451469427, 10.382283138783693, -13.422893515213985, -32.358062694953375, -13.466263029196057, -13.43038230495193, -9.40495619090711, 15.215100758911827, -1.034648628730658, 3.4399379427211274, 10.746213124299068, 30.623774902972677, 28.51496636415838, 11.750491194429207, -13.683971447931267, -32.60836961878783, -12.458411504585865], "residual": [0.5597751570183078, -0.8124328731328347, 0.6428261302128959, -0.02227417802860998, 2.5849708944611933, -0.6319745351006105, -1.4022510653977918, -1.1602890369176464, -1.230811393136861, 0.4047406786665704, 1.5634183849224428, -0.3092183555018835, -3.7784671283195905, -0.440258523997187, -3.8552020182632987, -2.186347678671666, -8.313215043231509, -0.4817762965871566, 1.5410378949128472, 1.181372711849292, 1.5942349578642734, -2.0681136933276036, -4.631179236924623, 0.003406181043288825, 2.5413853231541736, 1.151303614929958, 2.3291649534151304, 1.3707327049794742, 3.6838282190913674, 0.16865153841126812, -0.9081583506398943, -0.9852269291534128, -1.391670476392079, -0.11308606921667774, 0.6694438733487686, -1.6095638196204618], "trend_strength": 0.985032862452029, "seasonal_strength": 0.9819454219219157}
Used in use cases (1 recipe)

    Climate & environment scientist › Seasonal decomposition of a monthly temperature
Often used with

    stat max  ·  stat min

ml ts sax <json_values> <segments> <alphabet>


Description

    SAX symbolic representation (Lin, Keogh et al.): the series is z-normalized, averaged on segments (PAA) and each segment becomes a letter (equiprobable gaussian breakpoints)

Parameters

    json_values:   The values - String - required
    segments:   The number of letters - Number - required
    alphabet:   The number of symbols (2 to 26) - Number - required
admin
ml ts sax "[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118, 115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140, 145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166]" 12 4
mentdb
{"word": "aabaabdbcddc", "symbols": [0, 0, 1, 0, 0, 1, 3, 1, 2, 3, 3, 2], "paa": [-1.0096881118024583, -0.6979723188970013, -0.0609878725249807, -1.2942981835857015, -0.7386309005803219, -0.3727036654304376, 0.8335009245080696, -0.6708665977747876, 0.49467941048039904, 1.0367938329246718, 1.9719412116410424, 0.5082322710415058], "breakpoints": [-0.6744897501960816, 0, 0.6744897501960816]}

ml ts sax_distance <word1> <word2> <n> <alphabet>


Description

    MINDIST between two SAX words: a lower bound of the euclidean distance of the normalized series (fast search of similar series)

Parameters

    word1:   The first word - String - required
    word2:   The second word - String - required
    n:   The length of the original series - Number - required
    alphabet:   The alphabet size - Number - required
admin
ml ts sax_distance "abcd" "dcba" 36 4
mentdb
5.723235314453637

ml loess <json_x> <json_y> <bandwidth>


Description

    LOESS smoothing of y against x (local linear regression with tricube weights and 2 robust iterations); returns the smoothed y in the order of x

Parameters

    json_x:   The x values (distinct) - String - required
    json_y:   The y values - String - required
    bandwidth:   The fraction of the points used in each local fit, ex: 0.3 for a long series, 0.6 to 0.8 for a short one - Number - required
admin
ml loess "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" "[2.1, 3.9, 6.2, 8.1, 25, 12.2, 14.1, 15.9, 18.2, 19.8]" 0.8
mentdb
[2.035159827651176, 4.06367168077873, 6.089462249621122, 8.11692838496488, 10.124168545305777, 12.108017399666993, 14.088442531198822, 16.030535386388713, 17.962958771085876, 19.896013227130457]

ml ts cusum <json_values> <threshold> <drift>


Description

    Two-sided CUSUM: detects the moments where the series drifts above (up) or below (down) its global mean; the values are standardized and the sums restart after each alarm

Parameters

    json_values:   The values - String - required
    threshold:   The alarm threshold h, ex: 5 - Number - required
    drift:   The drift k, ex: 0.5 - Number - required
admin
ml ts cusum "[0, 0.1, -0.1, 0, 0.2, -0.2, 0, 2, 2.1, 1.9, 2, 2.2, 1.8, 2]" 3 0.5
mentdb
{"changes": [{"index": 6, "direction": "down"}, {"index": 13, "direction": "up"}], "cusum_pos": [0, 0, 0, 0, 0, 0, 0, 0.4568139619311994, 1.009309320055519, 1.3704418857935985, 1.827255847724798, 2.4754326020422375, 2.740883771587197, 3.1976977335183965], "cusum_neg": [0.4568139619311994, 0.817946527669279, 1.3704418857935985, 1.827255847724798, 2.0927070172697575, 2.740883771587197, 3.1976977335183965, 0, 0, 0, 0, 0, 0, 0]}

ml ts cusum <json_values> <threshold> <drift> <target> <sigma>


Description

    Two-sided CUSUM against a target and a known standard deviation (quality control): z = (x - target) / sigma, alarm when a cumulative sum exceeds h, the sums restart after each alarm

Parameters

    json_values:   The values - String - required
    threshold:   The alarm threshold h, ex: 4 or 5 - Number - required
    drift:   The allowance k, ex: 0.5 - Number - required
    target:   The target value - Number - required
    sigma:   The known standard deviation - Number - required
admin
ml ts cusum "[500.2, 499.8, 500.1, 499.9, 500.3, 499.7, 500.0, 500.2, 500.6, 500.8, 500.7, 500.9]" 4 0.5 500 0.2
mentdb
{"changes": [{"index": 9, "direction": "up"}, {"index": 11, "direction": "up"}], "cusum_pos": [0.49999999999994316, 0, 1.1368683772161603E-13, 0, 1.0000000000000568, 0, 0, 0.49999999999994316, 3.000000000000057, 6.500000000000114, 2.999999999999943, 6.9999999999998295], "cusum_neg": [0, 0.49999999999994316, 0, 1.1368683772161603E-13, 0, 1.0000000000000568, 0.5000000000000568, 0, 0, 0, 0, 0]}
Used in use cases (1 recipe)

    Industrial quality engineer › Detect the drift of a filling line with CUSUM
Often used with

    stat mean

ml ts changepoints <json_series>


Description

    Change points of a series (PELT, optimal and fast): positions where the mean changes and the segments with their mean and standard deviation; penalty MBIC (3 ln n)

Parameters

    json_series:   The series - String - required
admin
ml ts changepoints "[10.1, 11.3, 9.1, 11.0, 9.7, 9.7, 11.9, 10.2, 10.0, 10.7, 11.1, 10.0, 10.6, 9.0, 9.6, 9.6, 8.7, 8.5, 8.4, 9.8, 13.8, 13.7, 14.1, 12.7, 13.9, 14.2, 14.8, 13.2, 13.6, 12.0, 13.5, 11.8, 12.6, 15.1, 11.8, 9.8, 9.3, 8.7, 9.5, 9.5, 10.0, 8.8, 8.4, 8.4, 8.0, 9.0, 8.2, 10.1, 7.1, 7.9]"
mentdb
{"changepoints": [20, 35], "segments": [{"start": 0, "end": 19, "length": 20, "mean": 9.95, "sd": 0.951729727225231}, {"start": 20, "end": 34, "length": 15, "mean": 13.386666666666672, "sd": 1.0273868840527676}, {"start": 35, "end": 49, "length": 15, "mean": 8.846666666666662, "sd": 0.8617811013631684}], "penalty": 11.736069016284437, "method": "pelt", "cost": "mean"}

ml ts changepoints <json_series> <json_params>


Description

    Change points with parameters: cost (mean, or meanvar for a change of mean or variance), penalty (mbic, bic, aic or a number), min_size, method (pelt or binseg), max_changes (binseg)

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts changepoints "[10.1, 11.3, 9.1, 11.0, 9.7, 9.7, 11.9, 10.2, 10.0, 10.7, 11.1, 10.0, 10.6, 9.0, 9.6, 9.6, 8.7, 8.5, 8.4, 9.8, 13.8, 13.7, 14.1, 12.7, 13.9, 14.2, 14.8, 13.2, 13.6, 12.0, 13.5, 11.8, 12.6, 15.1, 11.8, 9.8, 9.3, 8.7, 9.5, 9.5, 10.0, 8.8, 8.4, 8.4, 8.0, 9.0, 8.2, 10.1, 7.1, 7.9]" "{\"method\": \"binseg\", \"max_changes\": 3}"
mentdb
{"changepoints": [20, 35], "segments": [{"start": 0, "end": 19, "length": 20, "mean": 9.95, "sd": 0.951729727225231}, {"start": 20, "end": 34, "length": 15, "mean": 13.386666666666672, "sd": 1.0273868840527676}, {"start": 35, "end": 49, "length": 15, "mean": 8.846666666666662, "sd": 0.8617811013631684}], "penalty": 11.736069016284437, "method": "binseg", "cost": "mean"}
Used in use cases (1 recipe)

    Climate & environment scientist › Shifts in a temperature record

ml ts granger <json_x> <json_y> <max_lag>


Description

    Granger causality: does the past of x improve the prediction of y (F test of the lags of x), and the reverse, for each number of lags up to max_lag

Parameters

    json_x:   The first series - String - required
    json_y:   The second series - String - required
    max_lag:   The maximum number of lags - Number - required
admin
ml ts granger "[-0.95, -2.09, 1.9, -2.41, -0.28, -0.53, 1.66, -1.99, 1.07, -0.73, -0.16, -0.67, 0.64, -1.14, -0.08, 0.35, 1.84, -2.41, 1.53, 0.95, -0.48, 0.3, -0.47, 1.65, 0.21, -0.22, -0.23, -0.2, -0.18, -0.88, 2.06, -1.91, -3.61, -0.12, -0.15, 0.37, -0.2, -0.15, 0.33, 0.97, -0.45, -0.37, 1.94, 0.53, -0.99, 2.32, 0.78, -0.59, -1.17, 0.3, -0.83, -1.06, -1.3, -0.51, 1.11, -0.43, -1.45, 0.67, 0.07, 0.84]" "[0.0, -0.16, -1.84, 0.53, -1.69, -1.64, -0.91, 1.56, -0.73, 0.37, -0.53, -0.78, -1.33, -0.35, -1.51, -1.04, -1.03, 1.13, -1.34, -0.02, -0.4, -0.59, 0.5, -0.49, 0.83, 0.3, 0.3, -0.49, 0.09, -0.25, -0.37, 1.48, -0.9, -4.08, -2.48, -1.49, -0.12, -0.1, -0.52, 0.21, 1.37, 0.25, -0.39, 1.16, 1.41, 0.18, 1.48, 1.55, 0.06, -1.28, 0.22, -0.14, -1.28, -1.64, -0.98, 0.08, -0.36, -1.01, -0.86, -0.21]" 2
mentdb
[{"lag": 1, "x_to_y": {"f": 318.45673493581484, "p_value": 0, "causal_at_5_percent": true}, "y_to_x": {"f": 0.3060093925493954, "p_value": 0.5823411613115622, "causal_at_5_percent": false}}, {"lag": 2, "x_to_y": {"f": 168.8648262940986, "p_value": 0, "causal_at_5_percent": true}, "y_to_x": {"f": 0.058035272294269066, "p_value": 0.9436765436391845, "causal_at_5_percent": false}}]

ml ts var <json_series>


Description

    Vector autoregression VAR(p) of several series (rows = time, columns = series): order chosen by AIC, coefficients of each equation, residual covariance

Parameters

    json_series:   The series - String - required
admin
ml ts var "[[0.0, 0.0], [0.74, 0.5], [-0.87, 0.4], [-1.22, 1.07], [0.21, 1.22], [-0.42, 0.08], [0.66, -0.72], [0.68, -0.12], [0.04, 2.12], [0.51, 3.41], [-1.08, -0.35], [0.37, 0.75], [0.02, 0.29], [-1.84, -0.46], [-2.05, 0.05], [-0.13, 0.7], [0.45, -0.24], [-0.26, -0.17], [-0.45, 1.24], [-0.85, 2.77], [-0.85, 2.98], [-0.6, 3.69], [0.57, 2.79], [1.59, 0.87], [-0.07, -1.98], [0.79, -1.86], [-0.57, -1.38], [1.43, -2.39], [0.49, -2.26], [0.32, -3.3], [-0.9, -1.24], [0.86, 1.12], [-0.2, 0.47], [-0.12, -1.03], [-1.71, 0.17], [-0.58, 0.47], [1.02, -0.55], [0.93, -0.63], [0.28, -0.17], [0.28, 0.08]]"
mentdb
{"p": 1, "aic": 0.07279337822213897, "equations": [{"variable": 0, "intercept": -0.048155776705271984, "coefficients": [0.1868706156301474, -0.015260924015506883]}, {"variable": 1, "intercept": 0.0433521366295464, "coefficients": [-0.5314834324876891, 0.6264498467091396]}], "residual_covariance": [[0.6990047714223381, -0.09405819530324769], [-0.09405819530324769, 1.143765727891006]]}

ml ts var <json_series> <json_params>


Description

    VAR with parameters: p (order or auto), max_p, horizon (forecast of h steps), irf (number of steps of the orthogonalized impulse responses, Cholesky order of the columns, and of the forecast error variance decomposition)

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts var "[[0.0, 0.0], [0.74, 0.5], [-0.87, 0.4], [-1.22, 1.07], [0.21, 1.22], [-0.42, 0.08], [0.66, -0.72], [0.68, -0.12], [0.04, 2.12], [0.51, 3.41], [-1.08, -0.35], [0.37, 0.75], [0.02, 0.29], [-1.84, -0.46], [-2.05, 0.05], [-0.13, 0.7], [0.45, -0.24], [-0.26, -0.17], [-0.45, 1.24], [-0.85, 2.77], [-0.85, 2.98], [-0.6, 3.69], [0.57, 2.79], [1.59, 0.87], [-0.07, -1.98], [0.79, -1.86], [-0.57, -1.38], [1.43, -2.39], [0.49, -2.26], [0.32, -3.3], [-0.9, -1.24], [0.86, 1.12], [-0.2, 0.47], [-0.12, -1.03], [-1.71, 0.17], [-0.58, 0.47], [1.02, -0.55], [0.93, -0.63], [0.28, -0.17], [0.28, 0.08]]" "{\"p\": 1, \"horizon\": 3}"
mentdb
{"p": 1, "aic": 0.07279337822213897, "equations": [{"variable": 0, "intercept": -0.048155776705271984, "coefficients": [0.1868706156301474, -0.015260924015506883]}, {"variable": 1, "intercept": 0.0433521366295464, "coefficients": [-0.5314834324876891, 0.6264498467091396]}], "residual_covariance": [[0.6990047714223381, -0.09405819530324769], [-0.09405819530324769, 1.143765727891006]], "forecast": [[0.0029471217499287437, -0.0553472367302754], [-0.0467603962753168, 0.0071135222804796575], [-0.057002479667355097, 0.07266077748860486]]}
Impulse responses and variance decomposition over 4 steps
admin
ml ts var "[[0.0, 0.0], [0.74, 0.5], [-0.87, 0.4], [-1.22, 1.07], [0.21, 1.22], [-0.42, 0.08], [0.66, -0.72], [0.68, -0.12], [0.04, 2.12], [0.51, 3.41], [-1.08, -0.35], [0.37, 0.75], [0.02, 0.29], [-1.84, -0.46], [-2.05, 0.05], [-0.13, 0.7], [0.45, -0.24], [-0.26, -0.17], [-0.45, 1.24], [-0.85, 2.77], [-0.85, 2.98], [-0.6, 3.69], [0.57, 2.79], [1.59, 0.87], [-0.07, -1.98], [0.79, -1.86], [-0.57, -1.38], [1.43, -2.39], [0.49, -2.26], [0.32, -3.3], [-0.9, -1.24], [0.86, 1.12], [-0.2, 0.47], [-0.12, -1.03], [-1.71, 0.17], [-0.58, 0.47], [1.02, -0.55], [0.93, -0.63], [0.28, -0.17], [0.28, 0.08]]" "{\"p\": 1, \"irf\": 4}"
mentdb
{"p": 1, "aic": 0.07279337822213897, "equations": [{"variable": 0, "intercept": -0.048155776705271984, "coefficients": [0.1868706156301474, -0.015260924015506883]}, {"variable": 1, "intercept": 0.0433521366295464, "coefficients": [-0.5314834324876891, 0.6264498467091396]}], "residual_covariance": [[0.6990047714223381, -0.09405819530324769], [-0.09405819530324769, 1.143765727891006]], "irf": [[[0.8360650521474619, 0], [-0.112501048885677, 1.0635361967938037]], [[0.15795286096035663, -0.016230545087011414], [-0.5148309885273816, 0.6662520874510997]], [[0.03737354496494958, -0.013200634434186764], [-0.4064651225585541, 0.4259997838673767]], [[0.013187050706200909, -0.008967961015647393], [-0.27449343368162227, 0.27388341780194153]], [[0.006653295717984549, -0.005855562424123944], [-0.17896506842623847, 0.17634054780121355]]], "fevd": [[[1, 0], [0.011065627944382308, 0.9889343720556176]], [[0.9996362547666263, 3.637452333737385E-4], [0.14989267332106335, 0.8501073266789367]], [[0.9993969490621512, 6.030509378488941E-4], [0.20138296125106142, 0.7986170387489386]], [[0.9992863895060203, 7.136104939796814E-4], [0.2205623701871738, 0.779437629812826]], [[0.9992392464763605, 7.607535236393738E-4], [0.22806609960608296, 0.771933900393917]]]}
Used in use cases (1 recipe)

    Forecaster & econometrician › How long does an advertising push last? (VAR impulse responses)

ml ts sarimax <json_series> <json_params>


Description

    Seasonal ARIMA with exogenous variables SARIMA(p, d, q)(P, D, Q, s) + X by exact maximum likelihood (Kalman filter, started from the conditional sum of squares, as R arima): coefficients and standard errors, sigma2, log-likelihood, AIC, forecast with intervals; params: order, seasonal, exog (one row per value), exog_future (one row per future step), horizon, level, method (ml or css)

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts sarimax "[4.7185, 4.7707, 4.8828, 4.8598, 4.7958, 4.9053, 4.9972, 4.9972, 4.9127, 4.7791, 4.6444, 4.7707, 4.7449, 4.8363, 4.9488, 4.9053, 4.8283, 5.0039, 5.1358, 5.1358, 5.0626, 4.8903, 4.7362, 4.9416, 4.9767, 5.0106, 5.1818, 5.0938, 5.1475, 5.1818, 5.2933, 5.2933, 5.2149, 5.0876, 4.9836, 5.112, 5.1417, 5.193, 5.2627, 5.1985, 5.2095, 5.3845, 5.4381, 5.4889, 5.3423, 5.2523, 5.1475, 5.2679, 5.2781, 5.2781, 5.4638, 5.4596, 5.4337, 5.4931, 5.5759, 5.6058, 5.4681, 5.3519, 5.193, 5.3033, 5.3181, 5.2364, 5.4596, 5.425, 5.4553, 5.5759, 5.7104, 5.6802, 5.5568, 5.4337, 5.3132, 5.4337, 5.4889, 5.451, 5.5872, 5.5947, 5.5984, 5.7526, 5.8972, 5.8493, 5.743, 5.6131, 5.4681, 5.6276, 5.649, 5.624, 5.7589, 5.7462, 5.7621, 5.9243, 6.0234, 6.0039, 5.8721, 5.7236, 5.6021, 5.7236, 5.7526, 5.7071, 5.8749, 5.8522, 5.8721, 6.045, 6.142, 6.1463, 6.0014, 5.8493, 5.7203, 5.8171, 5.8289, 5.7621, 5.8916, 5.8522, 5.8944, 6.0753, 6.1964, 6.2246, 6.0014, 5.8833, 5.7366, 5.8201, 5.8861, 5.8348, 6.0064, 5.9814, 6.0403, 6.157, 6.3063, 6.3261, 6.1377, 6.0088, 5.8916, 6.0039, 6.0331, 5.9687, 6.0379, 6.1334, 6.157, 6.2823, 6.4329, 6.4069, 6.2305, 6.1334, 5.9661, 6.0684]" "{\"order\": [0, 1, 1], \"seasonal\": [0, 1, 1, 12], \"horizon\": 6}"
mentdb
{"order": [0, 1, 1], "seasonal": [0, 1, 1, 12], "method": "ml", "ar": [], "ma": [-0.40177354423581324], "seasonal_ar": [], "seasonal_ma": [-0.556953037502212], "se": {"ar": [], "ma": [0.08967751538056323], "seasonal_ar": [], "seasonal_ma": [0.07310506829804263]}, "log_likelihood": 244.68432231056397, "sigma2": 0.0013483465754774984, "aic": -483.36864462112794, "n_used": 131, "forecast": [{"step": 1, "forecast": 6.110160499619771, "lower": 6.038190937680568, "upper": 6.182130061558974}, {"step": 2, "forecast": 6.053747225280602, "lower": 5.969882614002615, "upper": 6.137611836558588}, {"step": 3, "forecast": 6.171704623702239, "lower": 6.077434118219904, "upper": 6.265975129184574}, {"step": 4, "forecast": 6.199271708464234, "lower": 6.0956349226062105, "upper": 6.302908494322258}, {"step": 5, "forecast": 6.232549682042248, "lower": 6.12032562685768, "upper": 6.3447737372268165}, {"step": 6, "forecast": 6.368768085434262, "lower": 6.248568693833655, "upper": 6.488967477034868}]}
Conditional sum of squares (faster, approximate)
admin
ml ts sarimax "[4.7185, 4.7707, 4.8828, 4.8598, 4.7958, 4.9053, 4.9972, 4.9972, 4.9127, 4.7791, 4.6444, 4.7707, 4.7449, 4.8363, 4.9488, 4.9053, 4.8283, 5.0039, 5.1358, 5.1358, 5.0626, 4.8903, 4.7362, 4.9416, 4.9767, 5.0106, 5.1818, 5.0938, 5.1475, 5.1818, 5.2933, 5.2933, 5.2149, 5.0876, 4.9836, 5.112, 5.1417, 5.193, 5.2627, 5.1985, 5.2095, 5.3845, 5.4381, 5.4889, 5.3423, 5.2523, 5.1475, 5.2679, 5.2781, 5.2781, 5.4638, 5.4596, 5.4337, 5.4931, 5.5759, 5.6058, 5.4681, 5.3519, 5.193, 5.3033, 5.3181, 5.2364, 5.4596, 5.425, 5.4553, 5.5759, 5.7104, 5.6802, 5.5568, 5.4337, 5.3132, 5.4337, 5.4889, 5.451, 5.5872, 5.5947, 5.5984, 5.7526, 5.8972, 5.8493, 5.743, 5.6131, 5.4681, 5.6276, 5.649, 5.624, 5.7589, 5.7462, 5.7621, 5.9243, 6.0234, 6.0039, 5.8721, 5.7236, 5.6021, 5.7236, 5.7526, 5.7071, 5.8749, 5.8522, 5.8721, 6.045, 6.142, 6.1463, 6.0014, 5.8493, 5.7203, 5.8171, 5.8289, 5.7621, 5.8916, 5.8522, 5.8944, 6.0753, 6.1964, 6.2246, 6.0014, 5.8833, 5.7366, 5.8201, 5.8861, 5.8348, 6.0064, 5.9814, 6.0403, 6.157, 6.3063, 6.3261, 6.1377, 6.0088, 5.8916, 6.0039, 6.0331, 5.9687, 6.0379, 6.1334, 6.157, 6.2823, 6.4329, 6.4069, 6.2305, 6.1334, 5.9661, 6.0684]" "{\"order\": [0, 1, 1], \"seasonal\": [0, 1, 1, 12], \"method\": \"css\"}"
mentdb
{"order": [0, 1, 1], "seasonal": [0, 1, 1, 12], "method": "css", "ar": [], "ma": [-0.37707990272614766], "seasonal_ar": [], "seasonal_ma": [-0.5724068100984927], "sigma2": 0.0013890102408538304, "aic": -855.8704633559953, "n_used": 131}
With an exogenous variable (promotion)
admin
ml ts sarimax "[10, 12, 11, 15, 13, 12, 16, 14, 13, 17, 15, 14, 18, 16, 15, 19, 17, 16]" "{\"order\": [1, 0, 0], \"exog\": [[0], [0], [0], [1], [0], [0], [1], [0], [0], [1], [0], [0], [1], [0], [0], [1], [0], [0]], \"exog_future\": [[1], [0]], \"horizon\": 2}"
mentdb
{"order": [1, 0, 0], "seasonal": [0, 0, 0, 0], "method": "ml", "ar": [0.8844478311169792], "ma": [], "seasonal_ar": [], "seasonal_ma": [], "mean": 13.419664663185912, "exog_coefficients": [3.0043490854542467], "se": {"ar": [0.11489195995155842], "ma": [], "seasonal_ar": [], "seasonal_ma": [], "mean": 1.6132051267546945, "exog_coefficients": [0.35723452345497686]}, "log_likelihood": -27.446259788632677, "sigma2": 1.1354380900389298, "aic": 62.892519577265354, "n_used": 18, "forecast": [{"step": 1, "forecast": 18.706185740839878, "lower": 16.61770814547714, "upper": 20.794663336202618}, {"step": 2, "forecast": 15.438126731922871, "lower": 12.649991178160757, "upper": 18.226262285684985}]}
Used in use cases (1 recipe)

    Forecaster & econometrician › Monthly electricity load: seasonal ARIMA by maximum likelihood

ml ts auto_arima <json_series>


Description

    Automatic ARIMA (as R forecast::auto.arima): the differences by the KPSS test and the seasonal strength, then a stepwise search of the orders on the exact likelihood, best AICc; the ranking of the models tried and the final model (coefficients, standard errors, forecast)

Parameters

    json_series:   The series - String - required
admin
ml ts auto_arima "[2.4, 2.4, 2.4, 2.2, 2.1, 1.5, 2.3, 2.3, 2.5, 2.0, 1.9, 1.7, 2.2, 1.8, 3.2, 3.2, 2.7, 2.2, 2.2, 1.9, 1.9, 1.8, 2.7, 3.0, 2.3, 2.0, 2.0, 2.9, 2.9, 2.7, 2.7, 2.3, 2.6, 2.4, 1.8, 1.7, 1.5, 1.4, 2.1, 3.3, 3.5, 3.5, 3.1, 2.6, 2.1, 3.4, 3.0, 2.9]"
mentdb
{"model_name": "ARIMA(1,0,0)", "order": [1, 0, 0], "seasonal": [0, 0, 0, 0], "aicc": 65.30377931798662, "differences": {"d": 0, "D": 0, "seasonal_strength": 0, "kpss_tests": [{"differences": 0, "kpss": 0.36788911081520875, "stationary": true}]}, "models_tried": 7, "ranking": [{"model": "ARIMA(1,0,0)", "aicc": 65.30377931798662}, {"model": "ARIMA(2,0,0)", "aicc": 65.43398590907482}, {"model": "ARIMA(1,0,1)", "aicc": 66.45429895252725}, {"model": "ARIMA(2,0,1)", "aicc": 66.63178510906768}, {"model": "ARIMA(2,0,2)", "aicc": 68.47519603400318}, {"model": "ARIMA(0,0,1)", "aicc": 68.6493409409141}, {"model": "ARIMA(0,0,0)", "aicc": 82.35957511949782}], "model": {"order": [1, 0, 0], "seasonal": [0, 0, 0, 0], "method": "ml", "ar": [0.5739245503097371], "ma": [], "seasonal_ar": [], "seasonal_ma": [], "mean": 2.4132854035131768, "se": {"ar": [0.1162055610205572], "ma": [], "seasonal_ar": [], "seasonal_ma": [], "mean": 0.14661168126129898}, "log_likelihood": -29.37916238626604, "sigma2": 0.19748955048993064, "aic": 64.75832477253208, "n_used": 48}}

ml ts auto_arima <json_series> <json_params>


Description

    Automatic ARIMA with parameters: period (season), d and D (forced), max_p, max_q (5), max_P, max_Q (2), max_order (5), stepwise (true; false = every model), ic (aicc, aic, bic), exog, exog_future, horizon, level

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts auto_arima "[4.7185, 4.7707, 4.8828, 4.8598, 4.7958, 4.9053, 4.9972, 4.9972, 4.9127, 4.7791, 4.6444, 4.7707, 4.7449, 4.8363, 4.9488, 4.9053, 4.8283, 5.0039, 5.1358, 5.1358, 5.0626, 4.8903, 4.7362, 4.9416, 4.9767, 5.0106, 5.1818, 5.0938, 5.1475, 5.1818, 5.2933, 5.2933, 5.2149, 5.0876, 4.9836, 5.112, 5.1417, 5.193, 5.2627, 5.1985, 5.2095, 5.3845, 5.4381, 5.4889, 5.3423, 5.2523, 5.1475, 5.2679, 5.2781, 5.2781, 5.4638, 5.4596, 5.4337, 5.4931, 5.5759, 5.6058, 5.4681, 5.3519, 5.193, 5.3033, 5.3181, 5.2364, 5.4596, 5.425, 5.4553, 5.5759, 5.7104, 5.6802, 5.5568, 5.4337, 5.3132, 5.4337, 5.4889, 5.451, 5.5872, 5.5947, 5.5984, 5.7526, 5.8972, 5.8493, 5.743, 5.6131, 5.4681, 5.6276, 5.649, 5.624, 5.7589, 5.7462, 5.7621, 5.9243, 6.0234, 6.0039, 5.8721, 5.7236, 5.6021, 5.7236, 5.7526, 5.7071, 5.8749, 5.8522, 5.8721, 6.045, 6.142, 6.1463, 6.0014, 5.8493, 5.7203, 5.8171, 5.8289, 5.7621, 5.8916, 5.8522, 5.8944, 6.0753, 6.1964, 6.2246, 6.0014, 5.8833, 5.7366, 5.8201, 5.8861, 5.8348, 6.0064, 5.9814, 6.0403, 6.157, 6.3063, 6.3261, 6.1377, 6.0088, 5.8916, 6.0039, 6.0331, 5.9687, 6.0379, 6.1334, 6.157, 6.2823, 6.4329, 6.4069, 6.2305, 6.1334, 5.9661, 6.0684]" "{\"period\": 12, \"horizon\": 3}"
mentdb
{"forecast_values": [6.110160499619771, 6.053747225280602, 6.171704623702239], "model_name": "ARIMA(0,1,1)(0,1,1)[12]", "order": [0, 1, 1], "seasonal": [0, 1, 1, 12], "aicc": -483.1796682431752, "differences": {"d": 1, "D": 1, "seasonal_strength": 0.9333091620115703, "kpss_tests": [{"differences": 0, "kpss": 0.5366081658553555, "stationary": false}, {"differences": 1, "kpss": 0.058584751577820955, "stationary": true}]}, "models_tried": 11, "ranking": [{"model": "ARIMA(0,1,1)(0,1,1)[12]", "aicc": -483.1796682431752}, {"model": "ARIMA(0,1,1)(0,1,2)[12]", "aicc": -481.6118333858033}, {"model": "ARIMA(0,1,1)(1,1,1)[12]", "aicc": -481.5623682856098}, {"model": "ARIMA(1,1,1)(0,1,1)[12]", "aicc": -481.5568855144914}, {"model": "ARIMA(1,1,2)(0,1,1)[12]", "aicc": -481.5329396002908}, {"model": "ARIMA(0,1,2)(0,1,1)[12]", "aicc": -481.2712429021769}, {"model": "ARIMA(0,1,1)(1,1,2)[12]", "aicc": -480.3914015511996}, {"model": "ARIMA(1,1,0)(1,1,0)[12]", "aicc": -474.5795055934182}, {"model": "ARIMA(0,1,0)(0,1,1)[12]", "aicc": -467.44847985975116}, {"model": "ARIMA(0,1,1)(0,1,0)[12]", "aicc": -449.8626789880856}], "model": {"order": [0, 1, 1], "seasonal": [0, 1, 1, 12], "method": "ml", "ar": [], "ma": [-0.40177354423581324], "seasonal_ar": [], "seasonal_ma": [-0.556953037502212], "se": {"ar": [], "ma": [0.08967751538056323], "seasonal_ar": [], "seasonal_ma": [0.07310506829804263]}, "log_likelihood": 244.68432231056397, "sigma2": 0.0013483465754774984, "aic": -483.36864462112794, "n_used": 131, "forecast": [{"step": 1, "forecast": 6.110160499619771, "lower": 6.038190937680568, "upper": 6.182130061558974}, {"step": 2, "forecast": 6.053747225280602, "lower": 5.969882614002615, "upper": 6.137611836558588}, {"step": 3, "forecast": 6.171704623702239, "lower": 6.077434118219904, "upper": 6.265975129184574}]}}
Used in use cases (1 recipe)

    Forecaster & econometrician › Choose the forecasting model automatically: ARIMA or exponential smoothing?
Often used with

    ml metrics mae  ·  ml ts ets

ml ts ets <json_series>


Description

    Exponential smoothing state space model ETS (Hyndman, as R forecast::ets): error A or M, trend N, A or Ad (damped), season N, A or M, chosen by AICc; smoothing parameters, initial states, log-likelihood, ranking of the models

Parameters

    json_series:   The series - String - required
admin
ml ts ets "[2.4, 2.4, 2.4, 2.2, 2.1, 1.5, 2.3, 2.3, 2.5, 2.0, 1.9, 1.7, 2.2, 1.8, 3.2, 3.2, 2.7, 2.2, 2.2, 1.9, 1.9, 1.8, 2.7, 3.0, 2.3, 2.0, 2.0, 2.9, 2.9, 2.7, 2.7, 2.3, 2.6, 2.4]"
mentdb
{"model": "ETS(A,N,N)", "parameters": {"alpha": 1.0000001675608889E-4}, "initial_states": {"level": 2.332350972629586}, "sigma2": 0.18546889236205083, "log_likelihood": -18.57053373638206, "aicc": 43.94106747276412, "rmse": 0.4178025341201562, "mae": 0.33614617684288584, "ranking": [{"model": "ETS(A,N,N)", "aicc": 43.94106747276412}, {"model": "ETS(M,N,N)", "aicc": 43.94260039679942}, {"model": "ETS(M,A,N)", "aicc": 46.53620338676469}, {"model": "ETS(A,A,N)", "aicc": 48.441918319854075}, {"model": "ETS(A,Ad,N)", "aicc": 52.015017138021356}, {"model": "ETS(M,Ad,N)", "aicc": 54.33022838081851}], "fitted": [2.332350972629586, 2.3323577375334565, 2.3323645017608365, 2.3323712653117936, 2.3323580281830445, 2.332334792376333, 2.3322515588831485, 2.33224833372672, 2.3322451088928067, 2.3322618843847285, 2.3322286581907226, 2.332185435317661, 2.3321222167635365, 2.3321090045396464, 2.3320557936302766, 2.332142588065457, 2.332229373821192, 2.3322661508899722, 2.332252924272667, 2.3322396989780234, 2.332196475000883, 2.3321532553461406, 2.332100040011689, 2.3321368300138525, 2.332203616342042, 2.3322003959798683, 2.332167175934704, 2.3321339592115446, 2.3321907458251387, 2.3322475267600704, 2.3322843020135564, 2.3323210735895166, 2.332317841481616, 2.3323446097019533]}

ml ts ets <json_series> <json_params>


Description

    ETS with parameters: period (season, <= 24), model (3 letters, Z = automatic, ex: MAM, AZN), damped (true, false or auto), ic, horizon, level, simulations (of the intervals, 2000), seed

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts ets "[112, 98, 135, 160, 118, 104, 141, 170, 125, 109, 150, 178, 131, 115, 158, 189]" "{\"period\": 4, \"horizon\": 4}"
mentdb
{"model": "ETS(M,A,M)", "parameters": {"alpha": 0.11556167820936644, "beta": 0.11556167360093567, "gamma": 1.302428170952635E-4}, "initial_states": {"level": 121.64621228802869, "trend": 1.7221169819614022, "season": [0.9065374041821795, 0.7838660665218751, 1.0605764517279677, 1.2490200775679776]}, "sigma2": 3.052199285873772E-5, "log_likelihood": -12.382914106431173, "aicc": 72.76582821286235, "rmse": 0.5963434379186087, "mae": 0.4905631281399545, "ranking": [{"model": "ETS(M,A,M)", "aicc": 72.76582821286235}, {"model": "ETS(M,N,M)", "aicc": 93.6813995052904}, {"model": "ETS(M,Ad,M)", "aicc": 96.77786620749241}, {"model": "ETS(A,N,A)", "aicc": 106.01177626753088}, {"model": "ETS(M,N,A)", "aicc": 107.61799864666109}, {"model": "ETS(M,A,A)", "aicc": 109.02390255656935}, {"model": "ETS(A,A,A)", "aicc": 111.17024134028907}, {"model": "ETS(M,Ad,A)", "aicc": 127.83291543354441}, {"model": "ETS(A,Ad,A)", "aicc": 131.30892958136567}, {"model": "ETS(M,N,N)", "aicc": 158.89207729650073}], "forecast_values": [138.2106371045568, 121.10184591274158, 166.00787575217683, 198.04356076940718], "forecast": [{"step": 1, "forecast": 138.2106371045568, "lower": 136.73133928582797, "upper": 139.69135791544275}, {"step": 2, "forecast": 121.10184591274158, "lower": 119.77494562385633, "upper": 122.41418494062357}, {"step": 3, "forecast": 166.00787575217683, "lower": 164.14401519645764, "upper": 167.99203088890965}, {"step": 4, "forecast": 198.04356076940718, "lower": 195.54364660206554, "upper": 200.59986680077378}], "fitted": [111.83800497470922, 98.08653045650466, 134.53306345677288, 160.724862404454, 118.14679852856723, 103.4733828200441, 141.96278761549985, 169.13874996683484, 124.41722822067263, 109.06761569439608, 149.4801554384724, 178.44446333496163, 131.13416614003057, 114.79485812213566, 157.30227582554858, 187.74049529898446]}
Used in use cases (1 recipe)

    Forecaster & econometrician › Choose the forecasting model automatically: ARIMA or exponential smoothing?
Often used with

    ml metrics mae  ·  ml ts auto_arima

ml ts garch <json_series>


Description

    Volatility model GARCH(1,1) by maximum likelihood (returns, normal errors): mu, omega, alpha, beta with standard errors, persistence, half-life of the shocks, unconditional volatility, conditional volatility of each period, forecast of the volatility and Value at Risk 99 % for 10 steps

Parameters

    json_series:   The returns (or the prices with input = prices) - String - required
admin
ml ts garch "[-1.4152, 0.2752, -0.2479, -0.427, 0.9169, 0.0907, -0.2105, 1.5471, -0.4346, -1.1147, -1.2587, -0.4864, 0.6531, 0.8157, 1.0703, 1.7552, 1.8252, 0.7897, 1.5244, 0.8151, -0.5539, 0.95, 0.1407, -0.1299, 1.9632, 0.9259, -0.4328, 0.0052, 2.3509, -0.1993, 0.9123, 0.7664, 0.6293, 0.6856, -0.3928, -0.358, -0.0661, -0.2346, 0.7554, 1.3729, -0.733, 0.5758, -0.7878, -0.5341, -0.1292, 0.1655, -0.2766, -1.9588, 1.4508, -0.1951, -0.5447, 0.7349, -0.4798, -1.22, 0.5518, 0.4686, -0.6602, 0.8198, 0.4081, -0.8914, 1.602, 0.3444, -0.9769, 0.5094, 0.1956, 0.9263, -1.1159, 1.0411, 0.965, 0.7367, 0.6462, 1.2703, 0.7657, 0.2006, -0.6708, 1.0609, 0.9712, 0.3529, 0.2115, 0.6873, -2.0392, 0.4166, -2.41, 0.39, 1.3176, 2.306, -0.525, 0.6325, 0.006, -2.4101, 1.0555, 0.0718, 0.1702, -0.9808, 0.0376, 0.1664, 1.3535, 0.3838, 3.531, -0.4986, -0.2692, 0.0236, -0.8976, 1.8716, 0.9038, -1.4607, 0.2221, 1.4268, -1.5976, 0.2719, -0.1908, 2.6425, 0.6459, -0.4274, -0.5861, 2.2462, -0.511, 2.8837, -2.1985, -0.1945, -0.2484, -0.8618, -0.1853, 0.9345, -0.7038, -1.5546, 1.6883, 1.9104, -0.8143, 0.4736, -2.9832, 1.6413, -1.8677, -0.7364, 3.1923, -2.0121, 0.144, -1.5877, -2.787, -1.8899, 0.5731, -1.9921, -0.8567, 1.2271, -0.1386, -1.7371, 2.2299, 0.2813, 2.0781, -1.4483, 2.5564, -2.0336, -2.7226, -0.6331, -0.5057, 0.5051, -0.7154, 0.9646, 1.8537, -0.8021, -1.7126, -0.4504, 1.1313, 1.1043, -0.3385, -1.0567, 0.0607, 1.1169, -0.6911, 1.4328, 0.3237, 0.3749, -0.543, 1.3702, 0.1179, -1.3479, 0.9013, -0.3445, 1.1009, 0.236, -0.5092, 0.2235, -0.3558, -0.6246, 0.0834, 0.7301, 0.1225, -0.0029, -0.3525, 0.4832, 0.2611, 0.7459, 0.3302, 1.5945, -1.2865, 0.0208, 0.5409, 0.8407, -1.2603, -1.0629, 0.0308, 1.0221, 1.0814, -1.3581, 0.2031, 1.1866, 0.0988, -0.8898, -0.6009, -1.1506, 1.2054, -0.182, -0.3311, -0.7171, -0.0564, -0.7082, -0.7658, 0.0305, -0.1241, 0.4256, 0.176, 0.9485, 0.0272, 0.2597, 0.2278, -0.5209, 0.9192, -0.3662, -1.1196, 1.0774, 0.6212, -0.4088, 0.8435, 0.8635, 0.6557, -0.9101, 0.2164, -0.7879, -0.4449, -0.3944, -0.611, 0.4539, -0.5521, 0.5433, 0.1928, -0.3905, 0.1852, 0.5515, 0.8789, -0.1332, 1.3251, 0.5337, 1.0668, -1.0764, -0.8704, 1.147, -0.1401, 0.4772, 1.095, -1.2189, 0.4924, 1.8253, 0.9032, 0.1639, 0.6169, 0.0765, 0.7608, 1.2239, -0.1428, 0.5777, 0.3294, 0.6865, 0.7588, -0.8279, 1.0485, 0.819, -0.8899, -0.1863, -1.1756, -0.1937, 0.3485, -0.9021, -0.5967, -0.6765, -0.5204, -0.5762, -0.811, 0.5366, -0.1124, -0.5844, 0.8349, -0.3892, 0.7608, -0.9162, 1.2162, -0.3262, -0.7368, 0.4105, -1.0346, -0.8649]"
mentdb
{"model": "GARCH(1,1) normal", "n": 300, "scale": 1, "parameters": [{"parameter": "mu", "estimate": 0.09991928675034337, "se": 0.053595366343314965}, {"parameter": "omega", "estimate": 0.02240056220393314, "se": 0.018997961649204354}, {"parameter": "alpha", "estimate": 0.07804903835885581, "se": 0.02917890704919364}, {"parameter": "beta", "estimate": 0.900335664245457, "se": 0.0355468364973057}], "persistence": 0.9783847026043128, "half_life": 31.71960085989977, "unconditional_volatility": 1.0180025164431938, "log_likelihood": -420.6639365720654, "aic": 849.3278731441308, "bic": 864.1430030427556, "volatility": [1.0421599611372847, 1.0860115503684395, 1.0424362602640829, 1.005093815123651, 0.9765253280766841, 0.9659485554914894, 0.9286933511204826, 0.8980173078131952, 0.9549468205940524, 0.930450002917596, 0.9576013750901745, 0.9960297457990427, 0.9707894917341071, 0.9459331990353186, 0.9316648373364981, 0.9366885010641987, 1.0130116859496254, 1.0856512745912752, 1.058634281581777, 1.090772877729465, 1.064672553403003, 1.0374585797217484, 1.0236460612192164, 0.9828266489760207, 0.9466786703200197, 1.0489297700096656, 1.0325922104776046, 1.002262437140651, 0.9630757896211735, 1.1193494330386875, 1.0758521594600663, 1.0564140258572905, 1.0304629127537428, 1.0001490847152885, 0.9745651483086198, 0.946819422136757, 0.9197216421374096, 0.8866424446953666, 0.8596043946582339, 0.8492411270043857, 0.8934254232906624, 0.8917418097588189, 0.8694974238124433, 0.8744047815510515, 0.8614851963029301, 0.8334794428188269, 0.8051016104842282, 0.7855269818110141, 0.9532849827755099, 0.9914699481880359, 0.9561563797185982, 0.9369903892179523, 0.9188691752764021, 0.8993346225543614, 0.9415787536839529, 0.914630505776301, 0.8866703331893229, 0.8805257435955294, 0.872296425412268, 0.8455055604685403, 0.8618190566078437, 0.9312392902597985, 0.8988006795536664, 0.916641198065699, 0.889931123774481, 0.857998011948662, 0.8593557352377624, 0.895915664923279, 0.9023335672789607, 0.9021464861673988, 0.887019324635453, 0.8683773467316074, 0.8990193800531802, 0.8858219035962663, 0.8542057738784804, 0.8518849743237196, 0.8647880652154009, 0.8688921235268877, 0.840907384408839, 0.8124175992510932, 0.8022283983555896, 0.9792697192507395, 0.9453158187006216, 1.1483228812742685, 1.1028107990132379, 1.110454056320369, 1.2298212500037937, 1.1893706524647594, 1.1481096158284363, 1.0999416340829813, 1.2662604055457254, 1.2398717329618292, 1.1859730218198357, 1.1354016937187477, 1.1288110051008136, 1.0816303646054946, 1.0373379570797634, 1.05540328553879, 1.0156538644351647, 1.3674655998746474, 1.316796618631188, 1.2626063111114616, 1.2075377856900131, 1.1886484121759753, 1.240748074043809, 1.2078347092419965, 1.235297308885491, 1.1821342543750435, 1.1907900721834943, 1.2344890953494114, 1.1818576822271751, 1.134272790066849, 1.2981966822516318, 1.250206162455522, 1.2047165099801853, 1.1686860309028433, 1.2695030062513752, 1.2257835345067183, 1.4071359611870264, 1.4890956085526548, 1.4232271522682314, 1.3621922965490652, 1.328616703270049, 1.272022989780347, 1.2383638491787214, 1.205621317873295, 1.242864852056228, 1.2688872612239597, 1.314473541929731, 1.2819010509307984, 1.2299569009923748, 1.4581933299748473, 1.456791839109064, 1.4950919683821333, 1.4455139923113052, 1.6278913827510353, 1.6602605004939297, 1.5824967308925848, 1.5809477324488133, 1.7097309763551793, 1.72141501185411, 1.6455434006158052, 1.6738955636737038, 1.6175596010185092, 1.573941588837762, 1.502409842931313, 1.5225168090353394, 1.569561916952582, 1.4976539526214911, 1.5320722846851633, 1.5240707334369967, 1.6076889616413341, 1.644608564875523, 1.7548101588846123, 1.6842785143070043, 1.614030324736294, 1.5429429412771603, 1.4891903998871365, 1.4413255500527309, 1.4604226661890602, 1.4163937063492062, 1.4439656240116494, 1.3868203703304298, 1.3553649571613773, 1.3247883942926995, 1.2718291770888455, 1.2582327071778014, 1.2032816009115002, 1.1860466753094512, 1.156609255352131, 1.1685374301938711, 1.1205798422430742, 1.076500325458925, 1.0478637313321242, 1.066267619883411, 1.0227616511400008, 1.0619763760514473, 1.0430328460384384, 1.0086163056499962, 1.0082263651779508, 0.9690487314190823, 0.9470078750299866, 0.9116112645813441, 0.887028933311522, 0.878506178867185, 0.8469219049436603, 0.8361733107761302, 0.8074294243365507, 0.7811482336551953, 0.7666511700031031, 0.7503613723871051, 0.7289411354209532, 0.7303203049445659, 0.7118633621155925, 0.8080772733533326, 0.8719703874986162, 0.8410965912253516, 0.8212885493240997, 0.8200733193043214, 0.8788063413319432, 0.9073390921604993, 0.8740638336576496, 0.8812605076027877, 0.8926389534162469, 0.9516880357851147, 0.9157917955195111, 0.9325531527914322, 0.8974310094402658, 0.9077265906400419, 0.8958691585375763, 0.9311532218126459, 0.947848116230485, 0.9151392210547812, 0.8893330387269711, 0.886897573665172, 0.8558623437188752, 0.8560766358434599, 0.8606523392157064, 0.8304670502653082, 0.8045227740678716, 0.7832161435370666, 0.7583818378174628, 0.7722853097006172, 0.7481949150735752, 0.7269092898886845, 0.7066906703195049, 0.7086043494002284, 0.72585491823867, 0.7167382600170533, 0.7752367492812952, 0.7987919069009317, 0.7861837846406114, 0.7740046546485472, 0.7777729806426021, 0.7826546274373603, 0.7733099968844265, 0.8002685006727291, 0.7746361647581104, 0.7900487985780068, 0.7794463510269278, 0.7671107138506736, 0.769192771535501, 0.7515787755398559, 0.7511023104098368, 0.7386965041922459, 0.7171905697085075, 0.7101203809586379, 0.6906383444984225, 0.6839298352181596, 0.7006444185951157, 0.6845576862088467, 0.7493143938597101, 0.7366138985645609, 0.7641253287390598, 0.8099962254922344, 0.8286072527066708, 0.8521345300883907, 0.8250215621402572, 0.8039484519732144, 0.8255909102604572, 0.8785323756015351, 0.8540021172679312, 0.954662358541266, 0.945151094752535, 0.9093950976119366, 0.8876022467877756, 0.8554307639013552, 0.8457663731866103, 0.8746606484751338, 0.8460399261745062, 0.8274434266724335, 0.8018334692001216, 0.7925367297408783, 0.7885412884786935, 0.8058630853156283, 0.8229953053056556, 0.8201063518090494, 0.8392921094501544, 0.8142487464547228, 0.863889962340826, 0.8372903538866412, 0.8114236498416332, 0.8327986763293205, 0.8274703317812536, 0.8282009957883354, 0.818528533157336, 0.8132002478183652, 0.826166310457233, 0.8073466046483444, 0.7827933616772257, 0.7814377502222151, 0.7838034349090882, 0.7708385625564315, 0.769065568536649, 0.7971827056872243, 0.8317569762802909, 0.8120606152636921, 0.8190007195358132, 0.7961408880844434, 0.8327839899533986], "level": 0.99, "forecast": [{"step": 1, "volatility": 0.8482120066939591, "var": 1.8733169117580641, "cumulative_volatility": 0.8482120066939591, "cumulative_var": 1.8733169117580641}, {"step": 2, "volatility": 0.8522398433803432, "var": 1.8826870610704176, "cumulative_volatility": 1.2024044074040752, "cumulative_var": 2.597372363401121}, {"step": 3, "volatility": 0.8561622782752197, "var": 1.8918120091491772, "cumulative_volatility": 1.47607256111824, "cumulative_var": 3.134100404236407}, {"step": 4, "volatility": 0.8599826141573302, "var": 1.900699439406647, "cumulative_volatility": 1.7083209014523693, "cumulative_var": 3.574471550271879}, {"step": 5, "volatility": 0.8637040183261275, "var": 1.9093567200831751, "cumulative_volatility": 1.9142478767421254, "cumulative_var": 3.9536100446945213}, {"step": 6, "volatility": 0.8673295301205081, "var": 1.9177909217383422, "cumulative_volatility": 2.1015721370989855, "cumulative_var": 4.289472152781632}, {"step": 7, "volatility": 0.8708620678946598, "var": 1.9260088334792091, "cumulative_volatility": 2.2748639934573145, "cumulative_var": 4.592690007659078}, {"step": 8, "volatility": 0.8743044354991203, "var": 1.934016978037513, "cumulative_volatility": 2.4370913882458316, "cumulative_var": 4.870168075886186}, {"step": 9, "volatility": 0.8776593283101375, "var": 1.9418216257960577, "cumulative_volatility": 2.590308925829465, "cumulative_var": 5.126686081959301}, {"step": 10, "volatility": 0.8809293388460139, "var": 1.949428807854285, "cumulative_volatility": 2.7360074618449914, "cumulative_var": 5.365712274719541}]}

ml ts garch <json_series> <json_params>


Description

    GARCH with parameters: input (returns or prices: log returns x 100), model (garch or gjr: the negative returns raise the volatility more), dist (normal or t), horizon (10), level (VaR, 0.99), scale

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts garch "[-1.4152, 0.2752, -0.2479, -0.427, 0.9169, 0.0907, -0.2105, 1.5471, -0.4346, -1.1147, -1.2587, -0.4864, 0.6531, 0.8157, 1.0703, 1.7552, 1.8252, 0.7897, 1.5244, 0.8151, -0.5539, 0.95, 0.1407, -0.1299, 1.9632, 0.9259, -0.4328, 0.0052, 2.3509, -0.1993, 0.9123, 0.7664, 0.6293, 0.6856, -0.3928, -0.358, -0.0661, -0.2346, 0.7554, 1.3729, -0.733, 0.5758, -0.7878, -0.5341, -0.1292, 0.1655, -0.2766, -1.9588, 1.4508, -0.1951, -0.5447, 0.7349, -0.4798, -1.22, 0.5518, 0.4686, -0.6602, 0.8198, 0.4081, -0.8914, 1.602, 0.3444, -0.9769, 0.5094, 0.1956, 0.9263, -1.1159, 1.0411, 0.965, 0.7367, 0.6462, 1.2703, 0.7657, 0.2006, -0.6708, 1.0609, 0.9712, 0.3529, 0.2115, 0.6873, -2.0392, 0.4166, -2.41, 0.39, 1.3176, 2.306, -0.525, 0.6325, 0.006, -2.4101, 1.0555, 0.0718, 0.1702, -0.9808, 0.0376, 0.1664, 1.3535, 0.3838, 3.531, -0.4986, -0.2692, 0.0236, -0.8976, 1.8716, 0.9038, -1.4607, 0.2221, 1.4268, -1.5976, 0.2719, -0.1908, 2.6425, 0.6459, -0.4274, -0.5861, 2.2462, -0.511, 2.8837, -2.1985, -0.1945, -0.2484, -0.8618, -0.1853, 0.9345, -0.7038, -1.5546, 1.6883, 1.9104, -0.8143, 0.4736, -2.9832, 1.6413, -1.8677, -0.7364, 3.1923, -2.0121, 0.144, -1.5877, -2.787, -1.8899, 0.5731, -1.9921, -0.8567, 1.2271, -0.1386, -1.7371, 2.2299, 0.2813, 2.0781, -1.4483, 2.5564, -2.0336, -2.7226, -0.6331, -0.5057, 0.5051, -0.7154, 0.9646, 1.8537, -0.8021, -1.7126, -0.4504, 1.1313, 1.1043, -0.3385, -1.0567, 0.0607, 1.1169, -0.6911, 1.4328, 0.3237, 0.3749, -0.543, 1.3702, 0.1179, -1.3479, 0.9013, -0.3445, 1.1009, 0.236, -0.5092, 0.2235, -0.3558, -0.6246, 0.0834, 0.7301, 0.1225, -0.0029, -0.3525, 0.4832, 0.2611, 0.7459, 0.3302, 1.5945, -1.2865, 0.0208, 0.5409, 0.8407, -1.2603, -1.0629, 0.0308, 1.0221, 1.0814, -1.3581, 0.2031, 1.1866, 0.0988, -0.8898, -0.6009, -1.1506, 1.2054, -0.182, -0.3311, -0.7171, -0.0564, -0.7082, -0.7658, 0.0305, -0.1241, 0.4256, 0.176, 0.9485, 0.0272, 0.2597, 0.2278, -0.5209, 0.9192, -0.3662, -1.1196, 1.0774, 0.6212, -0.4088, 0.8435, 0.8635, 0.6557, -0.9101, 0.2164, -0.7879, -0.4449, -0.3944, -0.611, 0.4539, -0.5521, 0.5433, 0.1928, -0.3905, 0.1852, 0.5515, 0.8789, -0.1332, 1.3251, 0.5337, 1.0668, -1.0764, -0.8704, 1.147, -0.1401, 0.4772, 1.095, -1.2189, 0.4924, 1.8253, 0.9032, 0.1639, 0.6169, 0.0765, 0.7608, 1.2239, -0.1428, 0.5777, 0.3294, 0.6865, 0.7588, -0.8279, 1.0485, 0.819, -0.8899, -0.1863, -1.1756, -0.1937, 0.3485, -0.9021, -0.5967, -0.6765, -0.5204, -0.5762, -0.811, 0.5366, -0.1124, -0.5844, 0.8349, -0.3892, 0.7608, -0.9162, 1.2162, -0.3262, -0.7368, 0.4105, -1.0346, -0.8649]" "{\"model\": \"gjr\", \"dist\": \"t\", \"horizon\": 3}"
mentdb
{"model": "GJR-GARCH(1,1) t", "n": 300, "scale": 1, "parameters": [{"parameter": "mu", "estimate": 0.10853582780429824, "se": 0.054475884741744834}, {"parameter": "omega", "estimate": 0.02095265413528621, "se": 0.018526869927619146}, {"parameter": "alpha", "estimate": 0.10142993007974008, "se": 0.048622916208158486}, {"parameter": "beta", "estimate": 0.9010555369887322, "se": 0.037127620819294875}, {"parameter": "gamma", "estimate": -0.045001133890947925, "se": 0.06326664647217804}, {"parameter": "nu", "estimate": 199.9999988721405, "se": 3.999999977442811E-152}], "persistence": 0.9799849001229982, "half_life": 34.283471248937765, "unconditional_volatility": 1.0231531396766267, "log_likelihood": -420.44187918049124, "aic": 852.8837583609825, "bic": 875.1064532089197, "volatility": [1.0421599611372847, 1.0632974426856705, 1.0210312267345607, 0.9836037956743393, 0.9533553096850865, 0.9519398007301336, 0.9151489317522477, 0.883927607337139, 0.9668911360420354, 0.9380705591392405, 0.9477842467594768, 0.9673937020593293, 0.9403078708388842, 0.9207203702274043, 0.9140700510175351, 0.9314654780571718, 1.0381527632278764, 1.1362142469580443, 1.1096223665131568, 1.1548686455279944, 1.1284267974979525, 1.0922779894037693, 1.080645522287416, 1.036004588671363, 0.9956247257895005, 1.1238493105582004, 1.1076024173550847, 1.0690596427129406, 1.0253590815847358, 1.2158524600937128, 1.1654732480644256, 1.1447309702256034, 1.1160651027845465, 1.0820424840723049, 1.0534226664741133, 1.0173672122300816, 0.9827815937237234, 0.9449692040149866, 0.9122551073580866, 0.9018099471385296, 0.9570233697561883, 0.9413743462766723, 0.9173881050691184, 0.9080846561253738, 0.8872897198117871, 0.8564622955408239, 0.8259727288034451, 0.8025276874280334, 0.917849580152893, 0.9812178825210206, 0.9453470418634625, 0.9221106351095647, 0.9093424001425707, 0.8863243942229604, 0.9101609403587743, 0.8873048894877831, 0.8622718045764762, 0.8510262770121455, 0.8513820195661834, 0.8265507605943425, 0.8324439202456999, 0.933586409605799, 0.9010774712190791, 0.9050077366213889, 0.8804835432925092, 0.8486848411840525, 0.8589425814610112, 0.877687880884249, 0.8962585320240647, 0.9050712411209006, 0.8939122534915823, 0.8776610742716111, 0.9229980270105199, 0.9123533998719933, 0.8785447204641867, 0.8664276900453308, 0.8884643971897824, 0.8987218897835452, 0.8687881879986069, 0.8379369377667161, 0.8292129069632624, 0.9491080485986712, 0.917744532122818, 1.066677245067569, 1.0267470210204193, 1.0578883932716308, 1.2325334872841252, 1.1884568868573662, 1.1495550169078002, 1.10103126862224, 1.2129438070471823, 1.1989876551794476, 1.1473275353239198, 1.098841313186879, 1.0843871760989408, 1.0396075181957316, 0.9975662825738304, 1.0367437377417443, 0.99856216015846, 1.4517210999694659, 1.3930981187429212, 1.3333052150211055, 1.2740363749288222, 1.2412256766170386, 1.3131794376944033, 1.2802023040320833, 1.2793219726511502, 1.2235140279886407, 1.2434177505276864, 1.256312895542567, 1.2024206671868372, 1.1527223473629749, 1.3673061599118612, 1.317113686015787, 1.2650301533973407, 1.2207132972101542, 1.3517201792605613, 1.299604838808831, 1.524459631211542, 1.5541308120121027, 1.484073561453042, 1.418694314451413, 1.373911188213303, 1.3140342122501745, 1.2829613238783757, 1.2414981312351763, 1.2513387405911582, 1.2980767852984048, 1.366948524336586, 1.323886190473902, 1.2703257858739734, 1.4192970582006943, 1.4402564659008974, 1.452731954547337, 1.4010185086069453, 1.6595632875569934, 1.6602291311367117, 1.5826289379233167, 1.5621130646486479, 1.6409790100856956, 1.6348358274487522, 1.5655937321487199, 1.5743306292527783, 1.5188178461946227, 1.4921200182345344, 1.4249663542625812, 1.4292619080075049, 1.5225219479523466, 1.453510462814774, 1.5225213764302916, 1.498810287438543, 1.6287679373748931, 1.634101212971078, 1.6968573200541053, 1.62678251509334, 1.5578238158412359, 1.4911736900251036, 1.4362613454463038, 1.3978642842924824, 1.4458741618371067, 1.3969431629772426, 1.4023073057603044, 1.3455394500907156, 1.3260440709692207, 1.3061143762013436, 1.2527455478086043, 1.229496251712786, 1.1760834673048364, 1.1706414969581367, 1.1365923121111707, 1.1674113713927723, 1.119665723617655, 1.0759919002702079, 1.0431257774172236, 1.0783585909735185, 1.03380874091352, 1.0505533278252284, 1.0388261906016174, 1.0024555574776637, 1.0130773182128356, 0.9733329389226636, 0.9466388145147989, 0.9109070551001174, 0.8836127380455444, 0.8687927945572532, 0.837320640245505, 0.8317900038544973, 0.8027389871455428, 0.7760698772923961, 0.758708484824209, 0.7442264564608538, 0.7227612812737253, 0.7299683048471763, 0.7113840134354564, 0.8372058800816368, 0.8731164299848494, 0.8416001183890394, 0.823482332352307, 0.8284637872658236, 0.8632064829019331, 0.8773751406889763, 0.8455262313708022, 0.8659005651269116, 0.890252400485852, 0.9254529313394928, 0.890831366313031, 0.9240654258577738, 0.8890256142137086, 0.8884581823081706, 0.8721287552917747, 0.8920575805579151, 0.9273694708842646, 0.894782860671102, 0.8679153328606978, 0.8591642223556829, 0.8292247805991787, 0.8235120313169695, 0.8216818628249131, 0.7935073504480612, 0.7689991515081761, 0.7509975373068332, 0.7277411591647559, 0.7547986506624694, 0.7312155797840442, 0.7106640288066162, 0.6909902352862006, 0.688137986052201, 0.7171403921428883, 0.7050350373973476, 0.7442827723427896, 0.7844173553504621, 0.7759123287700216, 0.760609278700809, 0.7726750802892407, 0.7853146174500815, 0.779113429089845, 0.7914928514463153, 0.7659039444129383, 0.7712754570059623, 0.7577885253276789, 0.7434051682517638, 0.7403628167162473, 0.7259151613860961, 0.7213835168732494, 0.7134626716068901, 0.6930629384655026, 0.6839701194027294, 0.6656396967648369, 0.6633937183315658, 0.6911541023005174, 0.6742988629959866, 0.7620779626649954, 0.7500580963292207, 0.7880450515972864, 0.8122510731701874, 0.8182311737515473, 0.8565011373925467, 0.8279191892582765, 0.8076923989787126, 0.8411148552217416, 0.8705507359400424, 0.84780375103291, 0.9836400507656617, 0.9781712600251466, 0.9398992641273817, 0.9182416058206454, 0.8836014052263106, 0.8761314295591428, 0.9158554223022995, 0.8833542088890751, 0.863936194855766, 0.8357245463996572, 0.8271419227321734, 0.8248097869159662, 0.8267006143544389, 0.8522800088618058, 0.8524436480434492, 0.8555502510947279, 0.8278889612908525, 0.8553289399251202, 0.8278334860418175, 0.802679322458398, 0.811870019766757, 0.8018312282072488, 0.7968985442412695, 0.7845294902284345, 0.7758850270557165, 0.7817282477021916, 0.7682270186196246, 0.7453090088968537, 0.7406556627484773, 0.7541620182687153, 0.7398763682927954, 0.7465648170818675, 0.7631638352590426, 0.8186519138255461, 0.7971804687555833, 0.7961746528657782, 0.7754837479863093, 0.7978495055190741], "level": 0.99, "forecast": [{"step": 1, "volatility": 0.8049861289896659, "var": 1.7698042636778504, "cumulative_volatility": 0.8049861289896659, "cumulative_var": 1.7698042636778504}, {"step": 2, "volatility": 0.8099293079541919, "var": 1.781338588176204, "cumulative_volatility": 1.1419230060511625, "cumulative_var": 2.447470858116191}, {"step": 3, "volatility": 0.8147444525988856, "var": 1.7925741597055735, "cumulative_volatility": 1.4027817630656527, "cumulative_var": 2.947618141571823}]}
Used in use cases (1 recipe)

    Renewable energy engineer › Volatility of the electricity prices and Value at Risk (GARCH)

ml ts dwt <json_series> <wavelet> <levels>


Description

    Discrete wavelet transform (periodic, symmetric padding to a multiple of 2^levels): approximation, details of each level, energy of each level; wavelets haar, db2, db4

Parameters

    json_series:   The series - String - required
    wavelet:   haar, db2 or db4 - String - required
    levels:   The number of levels - Number - required
admin
ml ts dwt "[4, 6, 10, 12, 8, 6, 5, 5]" "haar" 2
mentdb
{"wavelet": "haar", "levels": 2, "padded_length": 8, "approximation": [15.999999999999996, 11.999999999999996], "details": [{"level": 1, "detail": [-1.414213562373095, -1.414213562373095, 1.414213562373095, 0]}, {"level": 2, "detail": [-5.999999999999999, 1.9999999999999991]}], "energy": [0.01345291479820628, 0.08968609865470853, 0.8968609865470851]}

ml ts denoise <json_series>


Description

    Wavelet denoising: soft thresholding of the details with the universal threshold (sigma from the finest details); keeps the jumps that a moving average would smooth

Parameters

    json_series:   The series - String - required
admin
ml ts denoise "[0.07, 0.68, 0.31, 0.82, 0.87, 0.75, 1.13, 0.77, 1.29, 0.77, 0.79, 0.89, 0.88, 0.74, 0.56, 0.09, -0.3, -0.12, -0.37, -0.85, -0.51, -0.82, -1.19, -0.88, -1.33, -1.18, -0.78, -1.16, -0.62, -0.8, -0.1, -0.26, 0.16, 0.94, 1.41, 1.89, 1.91, 1.44, 2.2, 2.22, 1.9, 2.3, 1.59, 1.71, 1.86, 1.74, 1.54, 0.75, 0.38, 0.73, 0.1, 0.27, -0.15, 0.34, 0.22, 0.14, 0.03, 0.09, 0.1, 0.4, 0.53, 0.76, 0.73, 1.51]"
mentdb
{"denoised": [0.6291422529675812, 0.6409118977858602, 0.6620213555080567, 0.709747649657772, 0.748410642409926, 0.7738607844977108, 0.8187296251934018, 0.8747874190977201, 0.8784231918642753, 0.8273656289100405, 0.7457697055640768, 0.6165898996966889, 0.48381034211243634, 0.3489134383443943, 0.17487369012751694, -0.029710718642581374, -0.19733832273864654, -0.3264834470256791, -0.4438147242737036, -0.5318614827338671, -0.6402957039474175, -0.7716827477446877, -0.8863461313831743, -0.9948060378958629, -1.0327105391794178, -0.9884152148759021, -0.8989014065353093, -0.7437525241986537, -0.549208545083353, -0.31617246328338466, -0.012118322534767953, 0.3593594884040234, 0.6747590540164974, 0.9284077910586003, 1.178330565530973, 1.3924279948706668, 1.578033735971486, 1.7336240136153673, 1.8262601862660488, 1.8522650140412884, 1.8799018085280372, 1.9047826247835067, 1.8858991326648966, 1.8355224716139455, 1.6973842282512857, 1.4609769091176226, 1.1600136417369153, 0.7767397341620229, 0.5194028742566199, 0.40829334366084, 0.32860302430282323, 0.3377325516577861, 0.31584603540519474, 0.2520487118206278, 0.2554688312164633, 0.30012373681159926, 0.32381463881782135, 0.3354555647088629, 0.34778056206415436, 0.3485277197214388, 0.40134552816707325, 0.5097769934054389, 0.6335460255948593, 0.7878319780661833], "sigma": 0.20126392313929362, "threshold": 0.6269641122307369, "levels": 4}

ml ts denoise <json_series> <json_params>


Description

    Wavelet denoising with parameters: wavelet (db4), levels, threshold (universal or a number), mode (soft or hard)

Parameters

    json_series:   The series - String - required
    json_params:   The parameters - String - required
admin
ml ts denoise "[0.07, 0.68, 0.31, 0.82, 0.87, 0.75, 1.13, 0.77, 1.29, 0.77, 0.79, 0.89, 0.88, 0.74, 0.56, 0.09, -0.3, -0.12, -0.37, -0.85, -0.51, -0.82, -1.19, -0.88, -1.33, -1.18, -0.78, -1.16, -0.62, -0.8, -0.1, -0.26, 0.16, 0.94, 1.41, 1.89, 1.91, 1.44, 2.2, 2.22, 1.9, 2.3, 1.59, 1.71, 1.86, 1.74, 1.54, 0.75, 0.38, 0.73, 0.1, 0.27, -0.15, 0.34, 0.22, 0.14, 0.03, 0.09, 0.1, 0.4, 0.53, 0.76, 0.73, 1.51]" "{\"wavelet\": \"haar\", \"mode\": \"hard\", \"levels\": 3}"
mentdb
{"denoised": [0.6749999999999997, 0.6749999999999997, 0.6749999999999997, 0.6749999999999997, 0.6749999999999997, 0.6749999999999997, 0.6749999999999997, 0.6749999999999997, 0.7512499999999996, 0.7512499999999996, 0.7512499999999996, 0.7512499999999996, 0.7512499999999996, 0.7512499999999996, 0.7512499999999996, 0.7512499999999996, -0.6299999999999997, -0.6299999999999997, -0.6299999999999997, -0.6299999999999997, -0.6299999999999997, -0.6299999999999997, -0.6299999999999997, -0.6299999999999997, -0.7787499999999996, -0.7787499999999996, -0.7787499999999996, -0.7787499999999996, -0.7787499999999996, -0.7787499999999996, -0.7787499999999996, -0.7787499999999996, 0.5499999999999995, 0.5499999999999995, 1.649999999999999, 1.649999999999999, 1.9424999999999992, 1.9424999999999992, 1.9424999999999992, 1.9424999999999992, 1.673749999999999, 1.673749999999999, 1.673749999999999, 1.673749999999999, 1.673749999999999, 1.673749999999999, 1.673749999999999, 1.673749999999999, 0.2537499999999999, 0.2537499999999999, 0.2537499999999999, 0.2537499999999999, 0.2537499999999999, 0.2537499999999999, 0.2537499999999999, 0.2537499999999999, 0.15499999999999994, 0.15499999999999994, 0.15499999999999994, 0.15499999999999994, 0.8824999999999994, 0.8824999999999994, 0.8824999999999994, 0.8824999999999994], "sigma": 0.32498606696490684, "threshold": 1.0123751827146596, "levels": 3}