Value
@@ -82,7 +82,7 @@
Value
Examples
if (FALSE) { # \dontrun{
- response <- .make_request(url, api_key, payload_list_element)
+ response <- .make_request(base_url, api_key, payload_list)
} # }
diff --git a/search.json b/search.json
index 84d4c78..48471d3 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement ops@nixtla.io. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://nixtla.github.io/nixtlar/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache License","title":"Apache License","text":"Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS CONDITIONS USE, REPRODUCTION, DISTRIBUTION Definitions. “License” shall mean terms conditions use, reproduction, distribution defined Sections 1 9 document. “Licensor” shall mean copyright owner entity authorized copyright owner granting License. “Legal Entity” shall mean union acting entity entities control, controlled , common control entity. purposes definition, “control” means () power, direct indirect, cause direction management entity, whether contract otherwise, (ii) ownership fifty percent (50%) outstanding shares, (iii) beneficial ownership entity. “” (“”) shall mean individual Legal Entity exercising permissions granted License. “Source” form shall mean preferred form making modifications, including limited software source code, documentation source, configuration files. “Object” form shall mean form resulting mechanical transformation translation Source form, including limited compiled object code, generated documentation, conversions media types. “Work” shall mean work authorship, whether Source Object form, made available License, indicated copyright notice included attached work (example provided Appendix ). “Derivative Works” shall mean work, whether Source Object form, based (derived ) Work editorial revisions, annotations, elaborations, modifications represent, whole, original work authorship. purposes License, Derivative Works shall include works remain separable , merely link (bind name) interfaces , Work Derivative Works thereof. “Contribution” shall mean work authorship, including original version Work modifications additions Work Derivative Works thereof, intentionally submitted Licensor inclusion Work copyright owner individual Legal Entity authorized submit behalf copyright owner. purposes definition, “submitted” means form electronic, verbal, written communication sent Licensor representatives, including limited communication electronic mailing lists, source code control systems, issue tracking systems managed , behalf , Licensor purpose discussing improving Work, excluding communication conspicuously marked otherwise designated writing copyright owner “Contribution.” “Contributor” shall mean Licensor individual Legal Entity behalf Contribution received Licensor subsequently incorporated within Work. Grant Copyright License. Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable copyright license reproduce, prepare Derivative Works , publicly display, publicly perform, sublicense, distribute Work Derivative Works Source Object form. Grant Patent License. Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable (except stated section) patent license make, made, use, offer sell, sell, import, otherwise transfer Work, license applies patent claims licensable Contributor necessarily infringed Contribution(s) alone combination Contribution(s) Work Contribution(s) submitted. institute patent litigation entity (including cross-claim counterclaim lawsuit) alleging Work Contribution incorporated within Work constitutes direct contributory patent infringement, patent licenses granted License Work shall terminate date litigation filed. Redistribution. may reproduce distribute copies Work Derivative Works thereof medium, without modifications, Source Object form, provided meet following conditions: must give recipients Work Derivative Works copy License; must cause modified files carry prominent notices stating changed files; must retain, Source form Derivative Works distribute, copyright, patent, trademark, attribution notices Source form Work, excluding notices pertain part Derivative Works; Work includes “NOTICE” text file part distribution, Derivative Works distribute must include readable copy attribution notices contained within NOTICE file, excluding notices pertain part Derivative Works, least one following places: within NOTICE text file distributed part Derivative Works; within Source form documentation, provided along Derivative Works; , within display generated Derivative Works, wherever third-party notices normally appear. contents NOTICE file informational purposes modify License. may add attribution notices within Derivative Works distribute, alongside addendum NOTICE text Work, provided additional attribution notices construed modifying License. may add copyright statement modifications may provide additional different license terms conditions use, reproduction, distribution modifications, Derivative Works whole, provided use, reproduction, distribution Work otherwise complies conditions stated License. Submission Contributions. Unless explicitly state otherwise, Contribution intentionally submitted inclusion Work Licensor shall terms conditions License, without additional terms conditions. Notwithstanding , nothing herein shall supersede modify terms separate license agreement may executed Licensor regarding Contributions. Trademarks. License grant permission use trade names, trademarks, service marks, product names Licensor, except required reasonable customary use describing origin Work reproducing content NOTICE file. Disclaimer Warranty. Unless required applicable law agreed writing, Licensor provides Work (Contributor provides Contributions) “” BASIS, WITHOUT WARRANTIES CONDITIONS KIND, either express implied, including, without limitation, warranties conditions TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS PARTICULAR PURPOSE. solely responsible determining appropriateness using redistributing Work assume risks associated exercise permissions License. Limitation Liability. event legal theory, whether tort (including negligence), contract, otherwise, unless required applicable law (deliberate grossly negligent acts) agreed writing, shall Contributor liable damages, including direct, indirect, special, incidental, consequential damages character arising result License use inability use Work (including limited damages loss goodwill, work stoppage, computer failure malfunction, commercial damages losses), even Contributor advised possibility damages. Accepting Warranty Additional Liability. redistributing Work Derivative Works thereof, may choose offer, charge fee , acceptance support, warranty, indemnity, liability obligations /rights consistent License. However, accepting obligations, may act behalf sole responsibility, behalf Contributor, agree indemnify, defend, hold Contributor harmless liability incurred , claims asserted , Contributor reason accepting warranty additional liability. END TERMS CONDITIONS","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"anomaly-detection","dir":"Articles","previous_headings":"","what":"1. Anomaly detection","title":"Anomaly Detection","text":"Anomaly detection plays crucial role time series analysis forecasting. Anomalies, also known outliers, unusual observations don’t follow expected time series patterns. can caused variety factors, including errors data collection process, unexpected events, sudden changes patterns time series. Anomalies can provide critical information system, like potential problem malfunction. identifying , important understand caused , decide whether remove, replace, keep . TimeGPT method detecting anomalies, users can call nixtlar. vignette explain . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Anomaly Detection","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"detect-anomalies","dir":"Articles","previous_headings":"","what":"3. Detect Anomalies","title":"Anomaly Detection","text":"detect anomalies, use nixtlar::nixtla_client_detect_anomalies, requires following parameter: df: time series data, provided data frame, tibble, tsibble. must include least two columns: one timestamps one observations. default names columns ds y. column names different, specify time_col target_col, respectively. working multiple series, must also include column unique identifiers. default name column unique_id; different, specify id_col. anomaly_detection method TimeGPT evaluates observation uses prediction interval determine anomaly . default, nixtlar::nixtla_client_detect_anomalies uses 99% prediction interval. Observations fall outside interval considered anomalies value True anomaly column (False otherwise). change prediction interval, example 95%, use argument level=c(95). Keep mind multiple levels allowed, given several values, nixtlar::nixtla_client_detect_anomalies use maximum.","code":"nixtla_client_anomalies <- nixtlar::nixtla_client_detect_anomalies(df) #> Frequency chosen: h head(nixtla_client_anomalies) #> unique_id ds y anomaly TimeGPT TimeGPT-lo-99 #> 1 BE 2016-10-27 00:00:00 52.58 FALSE 56.07623 -28.58337 #> 2 BE 2016-10-27 01:00:00 44.86 FALSE 52.41973 -32.23986 #> 3 BE 2016-10-27 02:00:00 42.31 FALSE 52.81474 -31.84486 #> 4 BE 2016-10-27 03:00:00 39.66 FALSE 52.59026 -32.06934 #> 5 BE 2016-10-27 04:00:00 38.98 FALSE 52.67297 -31.98662 #> 6 BE 2016-10-27 05:00:00 42.31 FALSE 54.10659 -30.55301 #> TimeGPT-hi-99 #> 1 140.7358 #> 2 137.0793 #> 3 137.4743 #> 4 137.2499 #> 5 137.3326 #> 6 138.7662"},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"plot-anomalies","dir":"Articles","previous_headings":"","what":"4. Plot anomalies","title":"Anomaly Detection","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). using nixtlar::nixtla_client_plot output nixtlar::nixtla_client_detect_anomalies, set plot_anomalies=TRUE plot anomalies.","code":"nixtlar::nixtla_client_plot(df, nixtla_client_anomalies, plot_anomalies = TRUE)"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"set-up-a-timegen-1-endpoint-account-and-generate-your-api-key-on-azure-","dir":"Articles","previous_headings":"","what":"1. Set up a TimeGEN-1 endpoint account and generate your API key on Azure.","title":"TimeGEN-1 Quickstart (Azure)","text":"Go ml.azure.com Sign create account. don’t one already, create workspace. might require subscription. Click Models sidebar select TimeGEN model catalog. Click Deploy. create Endpoint. Go Endpoint sidebar. find Base URL API key.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"install-nixtlar","dir":"Articles","previous_headings":"","what":"2. Install nixtlar","title":"TimeGEN-1 Quickstart (Azure)","text":"favorite R IDE, install nixtlar CRAN GitHub.","code":"install.packages(\"nixtlar\") # CRAN version library(devtools) devtools::install_github(\"Nixtla/nixtlar\")"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"set-up-the-base-url-and-api-key","dir":"Articles","previous_headings":"","what":"3. Set up the Base URL and API key","title":"TimeGEN-1 Quickstart (Azure)","text":", use nixtla_client_setup function.","code":"nixtla_client_setup( base_url = \"Base URL here\", api_key = \"API key here\" )"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"start-making-forecasts","dir":"Articles","previous_headings":"","what":"4. Start making forecasts!","title":"TimeGEN-1 Quickstart (Azure)","text":"Now can start making forecasts! use electricity dataset included nixtlar. dataset contains prices different electricity markets. can plot forecasts nixtla_client_plot function. learn data requirements TimeGPT’s capabilities, please read nixtlar vignettes.","code":"df <- nixtlar::electricity nixtla_client_fcst <- nixtla_client_forecast(df, h = 8, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700 nixtla_client_plot(df, nixtla_client_fcst, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"discover-the-power-of-timegen-on-azure-via-nixtlar-","dir":"Articles","previous_headings":"","what":"Discover the power of TimeGEN on Azure via nixtlar.","title":"TimeGEN-1 Quickstart (Azure)","text":"Deploying TimeGEN via nixtlar Azure allows implement robust scalable forecasting solutions. simplifies integration advanced analytics workflows also ensures power Azure’s cutting-edge technology disposal pay---go service. learn , read .","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"time-series-cross-validation","dir":"Articles","previous_headings":"","what":"1. Time series cross-validation","title":"Cross-Validation","text":"Cross-validation method evaluating performance forecasting model. Given time series, carried defining sliding window across historical data predicting period following . accuracy model computed averaging accuracy across cross-validation windows. method results better estimation model’s predictive abilities, since considers multiple periods instead just one, respecting sequential nature data. TimeGPT method performing time series cross-validation, users can call nixtlar. vignette explain . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Cross-Validation","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"perform-time-series-cross-validation","dir":"Articles","previous_headings":"","what":"3. Perform time series cross-validation","title":"Cross-Validation","text":"perform time series cross-validation using TimeGPT, use nixtlar::nixtla_client_cross_validation. key parameters method : df: time series data, provided data frame, tibble, tsibble. must include least two columns: one timestamps one observations. default names columns ds y. column names different, specify time_col target_col, respectively. working multiple series, must also include column unique identifiers. default name column unique_id; different, specify id_col. h: forecast horizon. n_windows: number windows evaluate. Default value 1. step_size: gap cross-validation window. Default value NULL.","code":"nixtla_client_cv <- nixtla_client_cross_validation(df, h = 8, n_windows = 5) #> Frequency chosen: h head(nixtla_client_cv) #> unique_id ds cutoff y TimeGPT #> 1 BE 2016-12-29 08:00:00 2016-12-29 07:00:00 53.30 51.79829 #> 2 BE 2016-12-29 09:00:00 2016-12-29 07:00:00 53.93 55.48120 #> 3 BE 2016-12-29 10:00:00 2016-12-29 07:00:00 56.63 55.86470 #> 4 BE 2016-12-29 11:00:00 2016-12-29 07:00:00 55.66 54.45249 #> 5 BE 2016-12-29 12:00:00 2016-12-29 07:00:00 48.00 54.76038 #> 6 BE 2016-12-29 13:00:00 2016-12-29 07:00:00 46.53 53.56611"},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"plot-cross-validation-results","dir":"Articles","previous_headings":"","what":"4. Plot cross-validation results","title":"Cross-Validation","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_anomaly_detection nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). using nixtlar::nixtla_client_plot output nixtlar::nixtla_client_cross_validation, cross-validation window visually represented vertical dashed lines. given pair lines, data first line forms training set. set used forecast data two lines.","code":"nixtla_client_plot(df, nixtla_client_cv, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"input-requirements","dir":"Articles","previous_headings":"","what":"1. Input Requirements","title":"Data Requirements","text":"nixtlar now supports following data structures: data frames, tibbles, tsibbles. output format always data frame. Regardless data structure, following two columns must always included using core functions nixtlar: Date Column: column must contain timestamps formatted YYYY-MM-DD YYYY-MM-DD hh:mm:ss, either characters date-time objects. date-time objects, recommend using .POSIX* functions base R, although .Date also supported. default name column ds. dataset uses different name, please specify setting parameter time_col=\"your_time_column_name\". Target Column: column contain numeric target variable forecasting. default name column y. dataset uses different name, specify setting parameter target_col=\"your_target_column_name\".","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"multiple-series","dir":"Articles","previous_headings":"","what":"2. Multiple Series","title":"Data Requirements","text":"working multiple series, must include column unique identifier series. column can contain characters integers, default name unique_id. dataset uses different name identifier column, please specify setting parameter id_col=\"your_id_column_name\". dataset contains one series need identifier, set id_col NULL. Please aware earlier versions nixtlar, default name id_col NULL, now unique_id.","code":"# sample valid input df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 str(df) #> 'data.frame': 8400 obs. of 3 variables: #> $ unique_id: chr \"BE\" \"BE\" \"BE\" \"BE\" ... #> $ ds : chr \"2016-10-22 00:00:00\" \"2016-10-22 01:00:00\" \"2016-10-22 02:00:00\" \"2016-10-22 03:00:00\" ... #> $ y : num 70 37.1 37.1 44.8 37.1 ..."},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"exogenous-variables","dir":"Articles","previous_headings":"","what":"3. Exogenous Variables","title":"Data Requirements","text":"using exogenous variables, nixtlar distinguishes historical future exogenous variables: Historical Exogenous Variables: included input data immediately following id_col, ds, y columns. dataset contains additional columns exogenous variables, must remove using core functions nixtlar. Future Exogenous Variables: correspond X_df parameter cover entire forecast horizon. dataset must include columns appropriate timestamps , applicable, unique identifiers, formatted described previous sections. learn use exogenous variables, please refer Exogenous variables vignette.","code":"# sample valid input with exogenous variables df <- nixtlar::electricity_exo_vars head(df) #> unique_id ds y Exogenous1 Exogenous2 day_0 day_1 day_2 #> 1 BE 2016-10-22 00:00:00 70.00 49593 57253 0 0 0 #> 2 BE 2016-10-22 01:00:00 37.10 46073 51887 0 0 0 #> 3 BE 2016-10-22 02:00:00 37.10 44927 51896 0 0 0 #> 4 BE 2016-10-22 03:00:00 44.75 44483 48428 0 0 0 #> 5 BE 2016-10-22 04:00:00 37.10 44338 46721 0 0 0 #> 6 BE 2016-10-22 05:00:00 35.61 44504 46303 0 0 0 #> day_3 day_4 day_5 day_6 #> 1 0 0 1 0 #> 2 0 0 1 0 #> 3 0 0 1 0 #> 4 0 0 1 0 #> 5 0 0 1 0 #> 6 0 0 1 0 future_exo_vars <- nixtlar::electricity_future_exo_vars head(future_exo_vars) #> unique_id ds Exogenous1 Exogenous2 day_0 day_1 day_2 day_3 #> 1 BE 2016-12-31 00:00:00 64108 70318 0 0 0 0 #> 2 BE 2016-12-31 01:00:00 62492 67898 0 0 0 0 #> 3 BE 2016-12-31 02:00:00 61571 68379 0 0 0 0 #> 4 BE 2016-12-31 03:00:00 60381 64972 0 0 0 0 #> 5 BE 2016-12-31 04:00:00 60298 62900 0 0 0 0 #> 6 BE 2016-12-31 05:00:00 60339 62364 0 0 0 0 #> day_4 day_5 day_6 #> 1 0 1 0 #> 2 0 1 0 #> 3 0 1 0 #> 4 0 1 0 #> 5 0 1 0 #> 6 0 1 0"},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"missing-values","dir":"Articles","previous_headings":"","what":"4. Missing values","title":"Data Requirements","text":"using TimeGPT via nixtlar, ensure following: Missing Values Target Column: target column must contain missing values (NA). Continuous Date Sequence: dates must continuous, without gaps, start date end date, matching frequency data. Currently, nixtlar provide functionality fill missing values dates. learn , please refer vignette Special Topics.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"minimum-data-requirements","dir":"Articles","previous_headings":"","what":"5. Minimum data requirements","title":"Data Requirements","text":"minimum size per series obtain results nixtlar::nixtla_client_forecast one, regardless frequency data. Keep mind, however, produce results limited accuracy. certain scenarios, one observation may necessary: using parameters level, quantiles, finetune_steps. incorporating exogenous variables. including historical forecasts setting add_history=TRUE. minimum data requirement varies frequency data, detailed official TimeGPT documentation. using nixtlar::nixtla_client_cross_validation, also need consider forecast horizon (h), number windows (n_windows) step size (step_size). formula minimum data points required per series : Min per series=Min per frequency+h+step_size*(n_windows−1)\\begin{equation} \\text{Min per series} = \\text{Min per frequency}+h+\\text{step_size}*(\\text{n_windows}-1) \\end{equation} , Min per frequency\\text{Min per frequency} refers values specified table official documentation.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"exogenous-variables","dir":"Articles","previous_headings":"","what":"1. Exogenous variables","title":"Exogenous Variables","text":"Exogenous variables external factors provide additional information behavior target variable time series forecasting. variables, correlated target, can significantly improve predictions. Examples exogenous variables include weather data, economic indicators, holiday markers, promotional sales. TimeGPT allows include exogenous variables generating forecast. vignette show include . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Exogenous Variables","text":"vignette, use electricity consumption dataset exogenous variables included nixtlar. dataset contains hourly prices five different electricity markets, along two exogenous variables related prices binary variables indicating day week. using exogenous variables, nixtlar distinguishes historical future exogenous variables: Historical Exogenous Variables: included input data immediately following id_col, ds, y columns. dataset contains additional columns exogenous variables, must remove using core functions nixtlar. Future Exogenous Variables: correspond X_df parameter cover entire forecast horizon. dataset must include columns appropriate timestamps , applicable, unique identifiers.","code":"df_exo_vars <- nixtlar::electricity_exo_vars head(df_exo_vars) #> unique_id ds y Exogenous1 Exogenous2 day_0 day_1 day_2 #> 1 BE 2016-10-22 00:00:00 70.00 49593 57253 0 0 0 #> 2 BE 2016-10-22 01:00:00 37.10 46073 51887 0 0 0 #> 3 BE 2016-10-22 02:00:00 37.10 44927 51896 0 0 0 #> 4 BE 2016-10-22 03:00:00 44.75 44483 48428 0 0 0 #> 5 BE 2016-10-22 04:00:00 37.10 44338 46721 0 0 0 #> 6 BE 2016-10-22 05:00:00 35.61 44504 46303 0 0 0 #> day_3 day_4 day_5 day_6 #> 1 0 0 1 0 #> 2 0 0 1 0 #> 3 0 0 1 0 #> 4 0 0 1 0 #> 5 0 0 1 0 #> 6 0 0 1 0 future_exo_vars <- nixtlar::electricity_future_exo_vars head(future_exo_vars) #> unique_id ds Exogenous1 Exogenous2 day_0 day_1 day_2 day_3 #> 1 BE 2016-12-31 00:00:00 64108 70318 0 0 0 0 #> 2 BE 2016-12-31 01:00:00 62492 67898 0 0 0 0 #> 3 BE 2016-12-31 02:00:00 61571 68379 0 0 0 0 #> 4 BE 2016-12-31 03:00:00 60381 64972 0 0 0 0 #> 5 BE 2016-12-31 04:00:00 60298 62900 0 0 0 0 #> 6 BE 2016-12-31 05:00:00 60339 62364 0 0 0 0 #> day_4 day_5 day_6 #> 1 0 1 0 #> 2 0 1 0 #> 3 0 1 0 #> 4 0 1 0 #> 5 0 1 0 #> 6 0 1 0"},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"forecast-with-exogenous-variables","dir":"Articles","previous_headings":"","what":"3. Forecast with exogenous variables","title":"Exogenous Variables","text":"generate forecast exogenous variables, use nixtla_client_forecast function forecasts without . difference must add future exogenous variables using X_df argument. comparison, also generate forecast without exogenous variables.","code":"fcst_exo_vars <- nixtla_client_forecast(df_exo_vars, h = 24, X_df = future_exo_vars) #> Frequency chosen: h #> Using historical exogenous features: Exogenous1, Exogenous2, day_0, day_1, day_2, day_3, day_4, day_5, day_6 #> Using future exogenous features: Exogenous1, Exogenous2, day_0, day_1, day_2, day_3, day_4, day_5, day_6 head(fcst_exo_vars) #> unique_id ds TimeGPT #> 1 BE 2016-12-31 00:00:00 74.54077 #> 2 BE 2016-12-31 01:00:00 43.34429 #> 3 BE 2016-12-31 02:00:00 44.42921 #> 4 BE 2016-12-31 03:00:00 38.09440 #> 5 BE 2016-12-31 04:00:00 37.38914 #> 6 BE 2016-12-31 05:00:00 39.08574 df <- nixtlar::electricity # same dataset but without exogenous variables fcst <- nixtla_client_forecast(df, h = 24) #> Frequency chosen: h head(fcst) #> unique_id ds TimeGPT #> 1 BE 2016-12-31 00:00:00 45.19045 #> 2 BE 2016-12-31 01:00:00 43.24445 #> 3 BE 2016-12-31 02:00:00 41.95839 #> 4 BE 2016-12-31 03:00:00 39.79649 #> 5 BE 2016-12-31 04:00:00 39.20454 #> 6 BE 2016-12-31 05:00:00 40.10878"},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"plot-timegpt-forecast","dir":"Articles","previous_headings":"","what":"4. Plot TimeGPT forecast","title":"Exogenous Variables","text":"nixtlar includes function plot historical data output nixtla_client_forecast, nixtla_client_historic, nixtla_client_anomaly_detection nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full).","code":"nixtla_client_plot(df_exo_vars, fcst_exo_vars, max_insample_length = 500)"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"setting-up-your-api-key","dir":"Articles","previous_headings":"","what":"1. Setting up your API key","title":"Get Started","text":"First, need set API key. API key string characters allows authenticate requests using TimeGPT via nixtlar. API key needs provided Nixtla, don’t one, please request one . using nixtlar, two ways setting API key:","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"a--using-the-nixtla_client_setup-function","dir":"Articles","previous_headings":"1. Setting up your API key","what":"a. Using the nixtla_client_setup function","title":"Get Started","text":"nixtlar function easily set API key current R session. Simply call Keep mind close R session re-start , ’ll need set API key . using Azure, also need add base_ur parameter nixtla_client_setup function.","code":"nixtla_client_setup(api_key = \"Your API key here\") nixtla_client_setup( base_url = \"Base ULR\", api_key = \"Your API key here\" )"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"b--using-an-environment-variable","dir":"Articles","previous_headings":"1. Setting up your API key","what":"b. Using an environment variable","title":"Get Started","text":"persistent method can used across different projects, set API key environment variable. , first load usethis package. open .Reviron file. Place API key named NIXTLA_API_KEY. ’ll need restart R changes take effect. Keep mind modifying .Renviron file affects R sessions, ’re comfortable , use nixtla_client_setup function instead. using Azure, also need specify NIXTLA_BASE_URL. details set API key, check Setting API Key vignette. learn use Azure, please refer TimeGEN-1 Quickstart (Azure).","code":"library(usethis) usethis::edit_r_environ() # Inside the .Renviron file NIXTLA_API_KEY=\"Your API key here\" # Inside the .Renviron file NIXTLA_BASE_URL=\"Base URL\" NIXTLA_API_KEY=\"Your API key here\""},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"validate-your-api-key","dir":"Articles","previous_headings":"1. Setting up your API key","what":"Validate your API key","title":"Get Started","text":"want validate API key, call nixtla_validate_api_key. don’t need validate API key every time set , want check ’s valid. nixtla_validate_api_key return TRUE API key valid, FALSE otherwise.","code":"nixtla_validate_api_key()"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"generate-timegpt-forecast","dir":"Articles","previous_headings":"","what":"2. Generate TimeGPT forecast","title":"Get Started","text":"API key set , ’re ready use TimeGPT. ’ll show done using dataset contains prices different electricity markets. generate forecast dataset, use nixtla_client_forecast. Default names time target columns ds y. time target columns different names, specify time_col target_col. Since multiple ids (one every electricity market), ’ll need specify name column contains ids, case unique_id. , simply use id_col=\"unique_id\". can also choose confidence levels (0-100) prediction intervals level.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 nixtla_client_fcst <- nixtla_client_forecast(df, h = 8, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"plot-timegpt-forecast","dir":"Articles","previous_headings":"","what":"3. Plot TimeGPT forecast","title":"Get Started","text":"nixtlar includes function plot historical data output nixtla_client_forecast, nixtla_client_historic, nixtla_client_anomaly_detection nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full).","code":"nixtla_client_plot(df, nixtla_client_fcst, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"timegpt-historical-forecast","dir":"Articles","previous_headings":"","what":"1. TimeGPT Historical Forecast","title":"Historical Forecast","text":"generating forecast, sometimes might interested forecasting historical observations. predictions, known fitted values, can help better understand evaluate model’s performance time. TimeGPT method generating fitted values, users can call nixtlar. vignette explain . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Historical Forecast","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"forecast-historical-data","dir":"Articles","previous_headings":"","what":"3. Forecast historical data","title":"Historical Forecast","text":"generate forecast historical data, use nixtlar::nixtla_client_historic, include following parameters: df: time series data, provided data frame, tibble, tsibble. must include least two columns: one timestamps one observations. default names columns ds y. column names different, specify time_col target_col, respectively. working multiple series, must also include column unique identifiers. default name column unique_id; different, specify id_col. level: prediction intervals forecast. Notice fitted values initial observations. TimeGPT requires minimum number values generate forecast historical data. fitted values generated using rolling window, meaning fitted value observation TT generated using first T−1T-1 observations.","code":"nixtla_client_fitted_values <- nixtla_client_historic(df, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fitted_values) #> ds TimeGPT TimeGPT-lo-80 TimeGPT-lo-95 TimeGPT-hi-80 #> 1 2016-10-27 00:00:00 56.07623 25.27245 8.965920 86.88000 #> 2 2016-10-27 01:00:00 52.41973 21.61596 5.309425 83.22350 #> 3 2016-10-27 02:00:00 52.81474 22.01096 5.704433 83.61852 #> 4 2016-10-27 03:00:00 52.59026 21.78649 5.479953 83.39404 #> 5 2016-10-27 04:00:00 52.67297 21.86920 5.562667 83.47675 #> 6 2016-10-27 05:00:00 54.10659 23.30282 6.996284 84.91036 #> TimeGPT-hi-95 #> 1 103.18653 #> 2 99.53004 #> 3 99.92505 #> 4 99.70057 #> 5 99.78328 #> 6 101.21690"},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"fitted-values-from-nixtlarnixtla_client_forecast","dir":"Articles","previous_headings":"3. Forecast historical data","what":"3.1 Fitted values from nixtlar::nixtla_client_forecast","title":"Historical Forecast","text":"nixtlar::nixtla_client_historic dedicated function calls TimeGPT’s method generating fitted values. However, can also use nixtlar::nixtla_client_forecast add_history=TRUE. generate forecast historical data next hh future observations.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"long-horizon-forecasting","dir":"Articles","previous_headings":"","what":"1. Long-horizon forecasting","title":"Long-Horizon Forecasting","text":"cases, necessary forecast long horizons. “long horizons” refer predictions exceed two seasonal periods. example, mean forecasting 48 hours ahead hourly data 7 days daily data. specific definition “long horizon” varies depending data frequency. specialized TimeGPT model designed long-horizon forecasting, trained predict far future, uncertainty increases forecast extends . explain use long horizon model TimeGPT via nixtlar. vignette assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Long-Horizon Forecasting","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets. every unique_id, ’ll try predict last 96 hours. Hence, first separate data training test sets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 test <- df |> dplyr::group_by(unique_id) |> dplyr::slice_tail(n = 96) |> dplyr::ungroup() train <- df[df$ds %in% setdiff(df$ds, test$ds), ]"},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"forecast-with-a-long-horizon","dir":"Articles","previous_headings":"","what":"3. Forecast with a long-horizon","title":"Long-Horizon Forecasting","text":"use long-horizon model TimeGPT, set model argument timegpt-1-long-horizon.","code":"fcst_long_horizon <- nixtlar::nixtla_client_forecast(train, h=96, model=\"timegpt-1-long-horizon\") #> Frequency chosen: h head(fcst_long_horizon) #> unique_id ds TimeGPT #> 1 BE 2016-12-27 00:00:00 42.73139 #> 2 BE 2016-12-27 01:00:00 38.03034 #> 3 BE 2016-12-27 02:00:00 35.11705 #> 4 BE 2016-12-27 03:00:00 34.53508 #> 5 BE 2016-12-27 04:00:00 34.11482 #> 6 BE 2016-12-27 05:00:00 38.36356"},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"plot-the-long-horizon-forecast","dir":"Articles","previous_headings":"","what":"4. Plot the long-horizon forecast","title":"Long-Horizon Forecasting","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full).","code":"nixtlar::nixtla_client_plot(train, fcst_long_horizon, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"evaluate-the-long-horizon-model","dir":"Articles","previous_headings":"","what":"5. Evaluate the long-horizon model","title":"Long-Horizon Forecasting","text":"evaluate long-horizon forecast, generate forecast default model TimeGPT, timegpt-1, compute compare Mean Absolute Error (MAE) two models. rename TimeGPT long-horizon model merge default TimeGPT model. , combine actual values test set compute MAE. Note output nixtla_client_forecast function, ds column contains dates. nixtla_client_plot uses dates plotting. However, merge actual values, convert dates characters. can see, long-horizon version TimeGPT produced model lower MAE default TimeGPT model.","code":"fcst <- nixtlar::nixtla_client_forecast(train, h=96) #> Frequency chosen: h #> The specified horizon h exceeds the model horizon. This may lead to less accurate forecasts. Please consider using a smaller horizon. head(fcst) #> unique_id ds TimeGPT #> 1 BE 2016-12-27 00:00:00 45.21921 #> 2 BE 2016-12-27 01:00:00 42.56666 #> 3 BE 2016-12-27 02:00:00 41.55990 #> 4 BE 2016-12-27 03:00:00 39.12502 #> 5 BE 2016-12-27 04:00:00 36.47087 #> 6 BE 2016-12-27 05:00:00 37.22281 names(fcst_long_horizon)[which(names(fcst_long_horizon) == \"TimeGPT\")] <- \"TimeGPT-long-horizon\" res <- merge(fcst, fcst_long_horizon) # merge TimeGPT and TimeGPT-long-horizon res$ds <- as.character(res$ds) res <- merge(test, res) # merge with actual values head(res) #> unique_id ds y TimeGPT TimeGPT-long-horizon #> 1 BE 2016-12-27 01:00:00 38.33 42.56666 38.03034 #> 2 BE 2016-12-27 02:00:00 41.04 41.55990 35.11705 #> 3 BE 2016-12-27 03:00:00 34.62 39.12502 34.53508 #> 4 BE 2016-12-27 04:00:00 29.69 36.47087 34.11482 #> 5 BE 2016-12-27 05:00:00 28.35 37.22281 38.36356 #> 6 BE 2016-12-27 06:00:00 30.99 42.28119 47.14343 print(paste0(\"MAE TimeGPT: \", mean(abs(res$y-res$TimeGPT)))) #> [1] \"MAE TimeGPT: 8.89928793765217\" print(paste0(\"MAE TimeGPT long-horizon: \", mean(abs(res$y-res$`TimeGPT-long-horizon`)))) #> [1] \"MAE TimeGPT long-horizon: 7.09785456847826\""},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"uncertainty-quantification-via-prediction-intervals","dir":"Articles","previous_headings":"","what":"1. Uncertainty quantification via prediction intervals","title":"Prediction Intervals","text":"uncertainty quantification, TimeGPT can generate prediction intervals quantiles, offering measure range potential outcomes rather just single point forecast. real-life scenarios, forecasting often requires considering multiple alternatives, just one prediction. vignette explain use prediction intervals TimeGPT via nixtlar package. prediction interval range values forecast can take given probability, often referred confidence level. Hence, 95% prediction interval contain range values includes actual future value probability 95%. Prediction intervals part probabilistic forecasting, , unlike point forecasting, aims generate full forecast distribution instead just mean median distribution. vignette assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Prediction Intervals","text":"vignette, use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"forecast-with-prediction-intervals","dir":"Articles","previous_headings":"","what":"3. Forecast with prediction intervals","title":"Prediction Intervals","text":"TimeGPT can generate prediction intervals using following functions: functions, simply set level argument desired confidence level prediction intervals. Keep mind level vector numbers 0 100. can use either quantiles level uncertainty quantification, . Note level argument nixtlar::nixtla_client_detect_anomalies() function uses maximum value multiple values provided. Therefore, setting level = c(90, 95, 99), example, equivalent setting level = c(99), default value.","code":"- nixtlar::nixtla_client_forecast() - nixtlar::nixtla_client_historic() - nixtlar::nixtla_client_detect_anomalies() - nixtlar::nixtla_client_cross_validation() fcst <- nixtla_client_forecast(df, h = 8, level=c(80,95)) #> Frequency chosen: h head(fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700 anomalies <- nixtla_client_detect_anomalies(df) # level=c(90,95,99) #> Frequency chosen: h head(anomalies) # only the 99% confidence level is used #> unique_id ds y anomaly TimeGPT TimeGPT-lo-99 #> 1 BE 2016-10-27 00:00:00 52.58 FALSE 56.07623 -28.58337 #> 2 BE 2016-10-27 01:00:00 44.86 FALSE 52.41973 -32.23986 #> 3 BE 2016-10-27 02:00:00 42.31 FALSE 52.81474 -31.84486 #> 4 BE 2016-10-27 03:00:00 39.66 FALSE 52.59026 -32.06934 #> 5 BE 2016-10-27 04:00:00 38.98 FALSE 52.67297 -31.98662 #> 6 BE 2016-10-27 05:00:00 42.31 FALSE 54.10659 -30.55301 #> TimeGPT-hi-99 #> 1 140.7358 #> 2 137.0793 #> 3 137.4743 #> 4 137.2499 #> 5 137.3326 #> 6 138.7662"},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"plot-prediction-intervals","dir":"Articles","previous_headings":"","what":"4. Plot prediction intervals","title":"Prediction Intervals","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). available, nixtlar::nixtla_client_plot automatically plot prediction intervals.","code":"nixtla_client_plot(df, fcst, max_insample_length = 100) nixtlar::nixtla_client_plot(df, anomalies, plot_anomalies = TRUE)"},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"uncertainty-quantification-via-quantiles","dir":"Articles","previous_headings":"","what":"1. Uncertainty quantification via quantiles","title":"Quantile Forecasts","text":"uncertainty quantification, TimeGPT can generate prediction intervals quantiles, offering measure range potential outcomes rather just single point forecast. real-life scenarios, forecasting often requires considering multiple alternatives, just one prediction. vignette explain use quantiles TimeGPT via nixtlar package. Quantiles represent cumulative proportion forecast distribution. instance, 90th quantile value 90% data points expected fall. Notably, 50th quantile corresponds median forecast value provided TimeGPT. quantiles produced using conformal prediction, framework creating distribution-free uncertainty intervals predictive models. vignette assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Quantile Forecasts","text":"vignette, use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"forecast-with-quantiles","dir":"Articles","previous_headings":"","what":"3. Forecast with quantiles","title":"Quantile Forecasts","text":"TimeGPT can generate quantiles using following functions: functions, simply set quantiles argument desired values vector. Keep mind quantiles numbers 0 1. can use either quantiles level uncertainty quantification, .","code":"- nixtlar::nixtla_client_forecast() - nixtlar::nixtla_client_historic() - nixtlar::nixtla_client_cross_validation() fcst <- nixtla_client_forecast(df, h = 8, quantiles = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)) #> Frequency chosen: h head(fcst) #> unique_id ds TimeGPT TimeGPT-q-10 TimeGPT-q-20 TimeGPT-q-30 #> 1 BE 2016-12-31 00:00:00 45.19045 35.50842 38.47870 40.71582 #> 2 BE 2016-12-31 01:00:00 43.24445 35.37463 37.77037 39.31913 #> 3 BE 2016-12-31 02:00:00 41.95839 35.34079 37.21802 39.44543 #> 4 BE 2016-12-31 03:00:00 39.79649 32.32625 34.98683 35.96071 #> 5 BE 2016-12-31 04:00:00 39.20454 30.99895 32.74554 34.72325 #> 6 BE 2016-12-31 05:00:00 40.10878 32.43504 34.25011 35.10687 #> TimeGPT-q-40 TimeGPT-q-50 TimeGPT-q-60 TimeGPT-q-70 TimeGPT-q-80 TimeGPT-q-90 #> 1 43.92545 45.19045 46.45545 49.66508 51.90221 54.87248 #> 2 42.58400 43.24445 43.90489 47.16976 48.71852 51.11427 #> 3 40.85600 41.95839 43.06078 44.47135 46.69876 48.57599 #> 4 37.46390 39.79649 42.12907 43.63226 44.60614 47.26672 #> 5 36.01405 39.20454 42.39502 43.68583 45.66353 47.41012 #> 6 38.76697 40.10878 41.45059 45.11069 45.96745 47.78252"},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"plot-quantiles","dir":"Articles","previous_headings":"","what":"4. Plot quantiles","title":"Quantile Forecasts","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). available, nixtlar::nixtla_client_plot automatically plot quantiles.","code":"nixtla_client_plot(df, fcst, max_insample_length = 100)"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"what-is-an-api-key","dir":"Articles","previous_headings":"","what":"1. What is an API key?","title":"Setting Up Your API Key","text":"API key unique string characters used authenticate requests using nixtlar. necessary valid API key use core functions nixtlar interact TimeGPT:","code":"# core functions that interact with TimeGPT - nixtlar::nixtla_client_forecast() - nixtlar::nixtla_client_historic() - nixtlar::nixtla_client_detect_anomalies() - nixtlar::nixtla_client_cross_validation()"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"how-can-i-get-one","dir":"Articles","previous_headings":"","what":"2. How can I get one?","title":"Setting Up Your API Key","text":"obtain API key, please sign : https://dashboard.nixtla.io/sign_in registering, access developer dashboard. API keys, find personal API key. Please note API key shared others, responsibility keep safe.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"how-do-i-set-up-my-api-key","dir":"Articles","previous_headings":"","what":"3. How do I set up my API key?","title":"Setting Up Your API Key","text":"several methods set API key.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"using-the-nixtlarnixtla_client_setup-function","dir":"Articles","previous_headings":"3. How do I set up my API key?","what":"3.1 Using the nixtlar::nixtla_client_setup function","title":"Setting Up Your API Key","text":"nixtlar provides function directly set API key: Keep mind close R session restart , need set API key . earlier versions nixtlar, function set API key called nixtla_set_api_key. However, nixtla_client_setup now provides functionality, along ability set Azure endpoints. nixtla_set_api_key function still available, now simply calls nixtla_client_setup. addition api_key parameter, nixtla_client_setup base_url parameter. ’s default value NULL, case, uses TimeGPT URL. can leave NULL unless working Azure. See Section 5 information.","code":"nixtlar::nixtla_client_setup(api_key = \"Your API key here\")"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"a--using-options","dir":"Articles","previous_headings":"3. How do I set up my API key? > 3.2 Using an environment variable","what":"a. Using options","title":"Setting Up Your API Key","text":"can set API key using options. make API key globally available throughout R session. Although appear list variables, persist close restart session explicitly change . verify set correctly, use:","code":"options(NIXTLA_API_KEY=\"Your API key here\") getOption(\"NIXTLA_API_KEY\")"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"b--using--renviron","dir":"Articles","previous_headings":"3. How do I set up my API key? > 3.2 Using an environment variable","what":"b. Using .Renviron","title":"Setting Up Your API Key","text":"persistent method can used across different projects, set API key environment variable. , first need load usethis package. open .Reviron file. Place API key , named NIXTLA_API_KEY. need restart R changes take effect. Note modifying .Renviron file affects R sessions, comfortable , set API key using nixtlar::nixtla_client_setup function.","code":"library(usethis) usethis::edit_r_environ() # Inside the .Renviron file NIXTLA_API_KEY=\"paste your API key here\""},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"validate-your-api-key-optional","dir":"Articles","previous_headings":"","what":"4. Validate your API key (optional)","title":"Setting Up Your API Key","text":"nixtlar includes function validate API key. nixtla_validate_api_key function return TRUE key valid, FALSE otherwise. need validate API key every time set , unsure status. Alternatively, dashboard, API keys, label next API key indicating status, example, active.","code":"nixtlar::nixtla_validate_api_key()"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"azure-endpoints","dir":"Articles","previous_headings":"","what":"5. Azure endpoints","title":"Setting Up Your API Key","text":"working Azure, need specify Base URL API key, shown . can also use one secure permanent method described , specifying NIXTLA_BASE_URL addition NIXTLA_API_KEY. learn , please refer TimeGEN-1 Quickstart (Azure) vignette.","code":"nixtlar::nixtla_client_setup( base_url = \"Base URL here\", api_key = \"Your API key here\" )"},{"path":"https://nixtla.github.io/nixtlar/articles/special-topics.html","id":"special-topics","dir":"Articles","previous_headings":"","what":"Special topics","title":"Special Topics","text":"vignette explains special topics regarding use TimeGPT via nixtlar.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/special-topics.html","id":"handling-missing-values","dir":"Articles","previous_headings":"","what":"1. Handling missing values","title":"Special Topics","text":"using TimeGPT, need ensure : target column contains missing values (NA). Given frequency data, dates continuous, missing dates start end dates. Regarding second point, worth mentioning possible multiple time series start end different dates, series must contain uninterrupted data given time frame. several ways check missing values R. One method .na functions base R. find missing values data, need decide fill , context-dependent. example, dealing daily retail data, missing value likely indicates sales day, can probably fill zero. However, working hourly temperature data, missing value likely means thermometer functioning correctly, might prefer use interpolation fill missing values. Whatever decide , always keep mind nature data. Checking missing dates complicated since depends frequency data. Sometimes plotting can help spot large gaps. nixtlar plotting function called nixtla_client_plot can used . However, method ineffective missing dates continuous. One possible solution compare dates every unique id vector dates generated using start date, end date, frequency data. requires knowing information, can become tricky working hundreds thousands time series.","code":"df <- nixtlar::electricity # load data # create some missing values at random index <- sample(nrow(df), 10) df$y[index] <- NA # check for missing values any(is.na(df)) # will return TRUE if there are missing values #> [1] TRUE"},{"path":"https://nixtla.github.io/nixtlar/articles/special-topics.html","id":"specifying-the-frequency-of-your-data","dir":"Articles","previous_headings":"","what":"2. Specifying the frequency of your data","title":"Special Topics","text":"frequency parameter crucial working time series data informs model expected intervals data points. core functions nixtlar interface TimeGPT, nixtla_client_forecast, nixtla_client_historic, nixtla_client_detect_anomalies, nixtla_client_cross_validation, include frequency parameter called freq, default value NULL. know frequency data, please specify . don’t, nixtlar try deduce data using nixtlar::infer_frequency function. freq parameter supports following aliases: table, QS MS stand quarter month start, QE stand quarter month end. quarter-end, following dates used. month-end, last day month used. Hourly sub-hourly frequencies can preceded integer, “6h”, “10min” “30s”. aliases “min” “s” allowed minute second-level frequencies.","code":"df <- nixtlar::electricity # infer the frequency when `freq` is not specified fcst <- nixtlar::nixtla_client_forecast(df, h = 8, level = c(80,95)) # freq = \"h\" #> Frequency chosen: h"},{"path":"https://nixtla.github.io/nixtlar/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Mariana Menchero. Author, maintainer. First author maintainer Nixtla. Copyright holder. Copyright held 'Nixtla'","code":""},{"path":"https://nixtla.github.io/nixtlar/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Menchero M (2024). nixtlar: Software Development Kit 'Nixtla”s 'TimeGPT'. R package version 0.6.2, https://docs.nixtla.io/, https://github.com/Nixtla/nixtlar, https://nixtla.github.io/nixtlar/.","code":"@Manual{, title = {nixtlar: A Software Development Kit for 'Nixtla''s 'TimeGPT'}, author = {Mariana Menchero}, year = {2024}, note = {R package version 0.6.2, https://docs.nixtla.io/, https://github.com/Nixtla/nixtlar}, url = {https://nixtla.github.io/nixtlar/}, }"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"version-062-of-nixtlar-is-now-available-2024-10-28","dir":"","previous_headings":"","what":"Version 0.6.2 of nixtlar is now available! (2024-10-28)","title":"A Software Development Kit for Nixtla's TimeGPT","text":"happy announce release nixtlar version 0.6.2, introducing support TimeGEN-1, TimeGPT optimized Azure. Key updates include: Azure Integration: can now use TimeGEN-1, version TimeGPT optimized Azure infrastructure, directly nixtlar. Simply configure API key Base URL get started. setup instructions, please check Azure Quickstart vignette. Enhanced Date Support: response user feedback, ’ve improved support date objects created .Date function. optimal performance, nixtlar now requires dates format YYYY-MM-DD YYYY-MM-DD hh:mm:ss, either characters date-objects, update resolves issues latter format. Business-Day Frequency Inference: nixtlar now supports inferring business-day frequency, users previously specify directly. Bug Fixes: version also includes fixes minor bugs reported users, ensuring overall stability performance. Thank continued support feedback, help us make nixtlar better. encourage update latest version take advantage improvements.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"timegpt-1","dir":"","previous_headings":"","what":"TimeGPT-1","title":"A Software Development Kit for Nixtla's TimeGPT","text":"first foundation model time series forecasting anomaly detection TimeGPT production-ready, generative pretrained transformer time series forecasting, developed Nixtla. capable accurately predicting various domains retail, electricity, finance, IoT, just lines code. Additionally, can detect anomalies time series data. TimeGPT initially developed Python now available R users nixtlar package.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of Contents","title":"A Software Development Kit for Nixtla's TimeGPT","text":"Installation Forecast Using TimeGPT 3 Easy Steps Anomaly Detection Using TimeGPT 3 Easy Steps Features Capabilities Documentation API Support Cite License Get Touch","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"A Software Development Kit for Nixtla's TimeGPT","text":"nixtlar available CRAN, can install latest stable version using install.packages. Alternatively, can install development version nixtlar GitHub devtools::install_github.","code":"# Install nixtlar from CRAN install.packages(\"nixtlar\") # Then load it library(nixtlar) # install.packages(\"devtools\") devtools::install_github(\"Nixtla/nixtlar\")"},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"forecast-using-timegpt-in-3-easy-steps","dir":"","previous_headings":"","what":"Forecast Using TimeGPT in 3 Easy Steps","title":"A Software Development Kit for Nixtla's TimeGPT","text":"Set API key. Get dashboard.nixtla.io Load sample data Forecast next 8 steps ahead Optionally, plot results","code":"library(nixtlar) nixtla_set_api_key(api_key = \"Your API key here\") df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 nixtla_client_fcst <- nixtla_client_forecast(df, h = 8, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700 nixtla_client_plot(df, nixtla_client_fcst, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"anomaly-detection-using-timegpt-in-3-easy-steps","dir":"","previous_headings":"","what":"Anomaly Detection Using TimeGPT in 3 Easy Steps","title":"A Software Development Kit for Nixtla's TimeGPT","text":"anomaly detection TimeGPT, also 3 easy steps! Follow steps 1 2 previous section use nixtla_client_detect_anomalies nixtla_client_plot functions.","code":"nixtla_client_anomalies <- nixtlar::nixtla_client_detect_anomalies(df) #> Frequency chosen: h head(nixtla_client_anomalies) #> unique_id ds y anomaly TimeGPT TimeGPT-lo-99 #> 1 BE 2016-10-27 00:00:00 52.58 FALSE 56.07623 -28.58337 #> 2 BE 2016-10-27 01:00:00 44.86 FALSE 52.41973 -32.23986 #> 3 BE 2016-10-27 02:00:00 42.31 FALSE 52.81474 -31.84486 #> 4 BE 2016-10-27 03:00:00 39.66 FALSE 52.59026 -32.06934 #> 5 BE 2016-10-27 04:00:00 38.98 FALSE 52.67297 -31.98662 #> 6 BE 2016-10-27 05:00:00 42.31 FALSE 54.10659 -30.55301 #> TimeGPT-hi-99 #> 1 140.7358 #> 2 137.0793 #> 3 137.4743 #> 4 137.2499 #> 5 137.3326 #> 6 138.7662 nixtlar::nixtla_client_plot(df, nixtla_client_anomalies, plot_anomalies = TRUE)"},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"features-and-capabilities","dir":"","previous_headings":"","what":"Features and Capabilities","title":"A Software Development Kit for Nixtla's TimeGPT","text":"nixtlar provides access TimeGPT’s features capabilities, : Zero-shot Inference: TimeGPT can generate forecasts detect anomalies straight box, requiring prior training data. allows immediate deployment quick insights time series data. Fine-tuning: Enhance TimeGPT’s capabilities fine-tuning model specific datasets, enabling model adapt nuances unique time series data improving performance tailored tasks. Add Exogenous Variables: Incorporate additional variables might influence predictions enhance forecast accuracy. (E.g. Special Dates, events prices) Multiple Series Forecasting: Simultaneously forecast multiple time series data, optimizing workflows resources. Custom Loss Function: Tailor fine-tuning process custom loss function meet specific performance metrics. Cross Validation: Implement box cross-validation techniques ensure model robustness generalizability. Prediction Intervals: Provide intervals predictions quantify uncertainty effectively. Irregular Timestamps: Handle data irregular timestamps, accommodating non-uniform interval series without preprocessing.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"A Software Development Kit for Nixtla's TimeGPT","text":"comprehensive documentation, please refer vignettes, cover wide range topics help effectively use nixtlar. current documentation includes guides : Get started set API key anomaly detection Perform time series cross-validation Use exogenous variables Generate historical forecasts documentation ongoing effort, working expanding coverage.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"api-support","dir":"","previous_headings":"","what":"API Support","title":"A Software Development Kit for Nixtla's TimeGPT","text":"Python user? yes, check Python SDK TimeGPT. can also refer API reference support programming languages.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"how-to-cite","dir":"","previous_headings":"","what":"How to Cite","title":"A Software Development Kit for Nixtla's TimeGPT","text":"find TimeGPT useful research, please consider citing TimeGPT-1 paper. associated reference shown . Garza, ., Challu, C., & Mergenthaler-Canseco, M. (2024). TimeGPT-1. arXiv preprint arXiv:2310.03589. Available https://arxiv.org/abs/2310.03589","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"license","dir":"","previous_headings":"","what":"License","title":"A Software Development Kit for Nixtla's TimeGPT","text":"TimeGPT closed source. However, SDK open source available Apache 2.0 License, feel free contribute!","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"get-in-touch","dir":"","previous_headings":"","what":"Get in Touch","title":"A Software Development Kit for Nixtla's TimeGPT","text":"welcome input contributions nixtlar package! Report Issues: encounter bug suggestion improve package, please open issue GitHub. Contribute: can contribute opening pull request repository. Whether fixing bug, adding new feature, improving documentation, appreciate help making nixtlar better.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"Generate output dates forecast method. private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"","code":".generate_output_dates(df_info, freq, h)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"df_info data frame created forecast method last dates every unique id. freq frequency data, period offset alias. h forecast horizon.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"data frame dates forecast.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"","code":"if (FALSE) { # \\dontrun{ dates_df <- .generate_output_dates(df_info, freq, h) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":null,"dir":"Reference","previous_headings":"","what":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"Get NIXTLA_API_KEY options .Renviron private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"","code":".get_client_steup()"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"available, NIXTLA_API_KEY. Otherwise returns error message asking user set 'API' key.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"","code":"if (FALSE) { # \\dontrun{ .get_api_key() } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"Retrieve parameters 'TimeGPT' model private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"","code":".get_model_params(model, freq)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". freq Frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"list model's input size horizon","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"","code":"if (FALSE) { # \\dontrun{ .get_model_params(model, freq) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"Obtain level quantiles private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"","code":".level_from_quantiles(quantiles)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"quantiles vector quantiles.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"list containing level vector data frame quantiles corresponding levels.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"","code":".level_from_quantiles(c(0.1, 0.5, 0.9)) #> $level #> [1] 80 #> #> $ql_df #> quantiles level name level_col quantiles_col #> 1 0.1 80 lo TimeGPT-lo-80 TimeGPT-q-10 #> 2 0.5 0
TimeGPT-q-50 #> 3 0.9 -80 hi TimeGPT-hi-80 TimeGPT-q-90 #>"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":null,"dir":"Reference","previous_headings":"","what":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"Make requests 'TimeGPT' API private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"","code":".make_request(base_url, api_key, payload_list)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"api_key user's API key. payload_list List containing information sent 'TimeGPT' API. url String specifying API endpoint request sent.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"List representing JSON response API endpoint.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"","code":"if (FALSE) { # \\dontrun{ response <- .make_request(url, api_key, payload_list_element) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"Convert period offset aliases character string recognized R. private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"","code":".r_frequency(freq)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"freq period offset alias used 'TimeGPT'.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"character string recognized R generating regular sequence times.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"","code":".r_frequency(\"MS\") # Returns \"month\" #> [1] \"month\" .r_frequency(\"10h\") # Returns \"10 h\" #> [1] \"10 h\" .r_frequency(\"h\") # Returns \"h\" (unchanged) #> [1] \"h\""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":null,"dir":"Reference","previous_headings":"","what":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"function used httr2::req_retry() determine response represents transient error private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"","code":".transient_errors(resp)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"resp response HTTP request","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"TRUE response status 500 502, FALSE otherwise.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"","code":"if (FALSE) { # \\dontrun{ .transient_errors(resp) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"Validate future exogenous variables (applicable) private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"","code":".validate_exogenous(df, h, X_df)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"df tsibble data frame time series data. h Forecast horizon. X_df tsibble data frame future exogenous variables.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"Returns vector exogenous variable names validation successful. validation fails, stops execution returns error message, indicating went wrong.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"","code":"if (FALSE) { # \\dontrun{ df <- nixtlar::electricity_exo_vars X_df <- nixtlar::electricity_future_exo_vars .validate_exogenous(df, h=24, X_df) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":null,"dir":"Reference","previous_headings":"","what":"Electricity dataset — electricity","title":"Electricity dataset — electricity","text":"Contains prices different electricity markets.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Electricity dataset — electricity","text":"","code":"electricity"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":"electricity","dir":"Reference","previous_headings":"","what":"electricity","title":"Electricity dataset — electricity","text":"data frame 8400 rows 3 columns: unique_id Unique identifiers electricity markets. ds Date format YYYY:MM:DD hh:mm:ss. y Price given market date.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Electricity dataset — electricity","text":"https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Electricity dataset with exogenous variables — electricity_exo_vars","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"Contains prices different electricity markets exogenous variables.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"","code":"electricity_exo_vars"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":"electricity-exo-vars","dir":"Reference","previous_headings":"","what":"electricity_exo_vars","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"data frame 8400 rows 12 columns: unique_id Unique identifiers electricity markets. ds Date format YYYY:MM:DD hh:mm:ss. y Price given market date. Exogenous1 external factor influencing prices. markets, form day-ahead load forecast. Exogenous2 external factor influencing prices. \"\" \"FR\" markets, day-ahead generation forecast. \"NP\", day-ahead wind generation forecast. \"PJM\", day-ahead load forecast specific zone. \"DE\", aggregated day-ahead wind solar generation forecasts. day_0 Binary variable indicating weekday. day_1 Binary variable indicating weekday. day_2 Binary variable indicating weekday. day_3 Binary variable indicating weekday. day_4 Binary variable indicating weekday. day_5 Binary variable indicating weekday. day_6 Binary variable indicating weekday.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"Contains future values exogenous variables electricity dataset (24 steps-ahead). used electricity_exo_vars.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"","code":"electricity_future_exo_vars"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":"electricity-future-exo-vars","dir":"Reference","previous_headings":"","what":"electricity_future_exo_vars","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"data frame 120 rows 11 columns: unique_id Unique identifiers electricity markets. ds Date format YYYY:MM:DD hh:mm:ss. Exogenous1 external factor influencing prices. markets, form day-ahead load forecast. Exogenous2 external factor influencing prices. \"\" \"FR\" markets, day-ahead generation forecast. \"NP\", day-ahead wind generation forecast. \"PJM\", day-ahead load forecast specific zone. \"DE\", aggregated day-ahead wind solar generation forecasts. day_0 Binary variable indicating weekday. day_1 Binary variable indicating weekday. day_2 Binary variable indicating weekday. day_3 Binary variable indicating weekday. day_4 Binary variable indicating weekday. day_5 Binary variable indicating weekday. day_6 Binary variable indicating weekday.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short-future-ex-vars.csv","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":null,"dir":"Reference","previous_headings":"","what":"Infer frequency of a data frame. — infer_frequency","title":"Infer frequency of a data frame. — infer_frequency","text":"Infer frequency data frame.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infer frequency of a data frame. — infer_frequency","text":"","code":"infer_frequency(df, freq)"},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infer frequency of a data frame. — infer_frequency","text":"df data frame time series data. freq frequency data specified user; NULL otherwise.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infer frequency of a data frame. — infer_frequency","text":"inferred frequency.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Infer frequency of a data frame. — infer_frequency","text":"","code":"df <- nixtlar::electricity freq <- NULL infer_frequency(df, freq) #> Frequency chosen: h #> [1] \"h\""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtlaR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"nixtlar: A Software Development Kit for 'Nixtla”s 'TimeGPT' — nixtlar-package","title":"nixtlar: A Software Development Kit for 'Nixtla”s 'TimeGPT' — nixtlar-package","text":"Software Development Kit working 'Nixtla”s 'TimeGPT', foundation model time series forecasting. 'API' acronym 'application programming interface'; package allows users interact 'TimeGPT' via 'API'. can set validate 'API' keys generate forecasts via 'API' calls. compatible 'tsibble' base R. details visit https://docs.nixtla.io/.","code":""},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/nixtlaR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"nixtlar: A Software Development Kit for 'Nixtla”s 'TimeGPT' — nixtlar-package","text":"Maintainer: Mariana Menchero mariana@nixtla.io (First author maintainer) contributors: Nixtla (Copyright held 'Nixtla') [copyright holder]","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"Sequential version 'nixtla_client_cross_validation' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"","code":"nixtla_client_cross_validation( df, h = 8, freq = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", level = NULL, quantiles = NULL, n_windows = 1, step_size = NULL, finetune_steps = 0, finetune_loss = \"default\", clean_ex_first = TRUE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"df data frame time series data. h Forecast horizon. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. level confidence levels (0-100) prediction intervals. quantiles Quantiles forecast. 0 1. n_windows Number windows evaluate. step_size Step size cross validation window. NULL, equal forecast horizon (h). finetune_steps Number steps used finetune 'TimeGPT' new data. finetune_loss Loss function use finetuning. Options : \"default\", \"mae\", \"mse\", \"rmse\", \"mape\", \"smape\". clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"data frame 'TimeGPT”s cross validation result.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_cross_validation(df, h = 8, id_col = \"unique_id\", n_windows = 5) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"Sequential version 'nixtla_client_detect_anomalies' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"","code":"nixtla_client_detect_anomalies( df, freq = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", level = c(99), clean_ex_first = TRUE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"df data frame time series data. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. level confidence level (0-100) prediction interval used anomaly detection. Default 99. clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"data frame anomalies detected historical period.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_anomaly_detection(df, id_col=\"unique_id\") } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"Sequential version 'nixtla_client_forecast' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"","code":"nixtla_client_forecast( df, h = 8, freq = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", X_df = NULL, level = NULL, quantiles = NULL, finetune_steps = 0, finetune_loss = \"default\", clean_ex_first = TRUE, add_history = FALSE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"df data frame time series data. h Forecast horizon. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. X_df tsibble data frame future exogenous variables. level confidence levels (0-100) prediction intervals. quantiles Quantiles forecast. 0 1. finetune_steps Number steps used finetune 'TimeGPT' new data. finetune_loss Loss function use finetuning. Options : \"default\", \"mae\", \"mse\", \"rmse\", \"mape\", \"smape\". clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. add_history Return fitted values model. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"'TimeGPT”s forecast.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_forecast(df, h=8, id_col=\"unique_id\", level=c(80,95)) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"Sequential version 'nixtla_client_historic' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"","code":"nixtla_client_historic( df, freq = NULL, id_col = NULL, time_col = \"ds\", target_col = \"y\", level = NULL, quantiles = NULL, finetune_steps = 0, finetune_loss = \"default\", clean_ex_first = TRUE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"df tsibble data frame time series data. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. level confidence levels (0-100) prediction intervals. quantiles Quantiles forecast. 0 1. finetune_steps Number steps used finetune 'TimeGPT' new data. finetune_loss Loss function use finetuning. Options : \"default\", \"mae\", \"mse\", \"rmse\", \"mape\", \"smape\". clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"'TimeGPT”s forecast -sample period.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_historic(df, id_col=\"unique_id\", level=c(80,95)) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"Plot output following nixtla_client functions: forecast, historic, anomaly_detection, cross_validation.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"","code":"nixtla_client_plot( df, fcst = NULL, h = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", unique_ids = NULL, max_insample_length = NULL, plot_anomalies = FALSE )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"df tsibble data frame time series data (insample values). fcst tsibble data frame 'TimeGPT' point forecast prediction intervals (available). h Forecast horizon. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. unique_ids Time series plot. NULL (default), selection random. max_insample_length Max number insample observations plotted. plot_anomalies Whether plot anomalies.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"Plot historical data 'TimeGPT”s output (available).","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_forecast(df, h=8, id_col=\"unique_id\", level=c(80,95)) nixtlar::timegpt_plot(df, fcst, h=8, id_col=\"unique_id\") } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":null,"dir":"Reference","previous_headings":"","what":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"Set base 'ULR' 'API' key global environment","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"","code":"nixtla_client_setup(base_url = NULL, api_key = NULL)"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"base_url Custom base 'URL'. NULL, defaults \"https://api.nixtla.io/\". api_key user's 'API' key. Get : https://dashboard.nixtla.io/","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"message indicating configuration status.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_client_setup( base_url = \"Base URL\", api_key = \"Your API key\" ) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Set 'API' key in global environment — nixtla_set_api_key","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"function deprecated future versions. Please use nixtla_client_setup instead.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"","code":"nixtla_set_api_key(api_key)"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"api_key user's 'API' key. Get : https://dashboard.nixtla.io/","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"message indicating 'API' key set global environment.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"Your API key\") } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate 'API' key — nixtla_validate_api_key","title":"Validate 'API' key — nixtla_validate_api_key","text":"Validate 'API' key","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate 'API' key — nixtla_validate_api_key","text":"","code":"nixtla_validate_api_key()"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate 'API' key — nixtla_validate_api_key","text":"TRUE API key valid, FALSE otherwise.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate 'API' key — nixtla_validate_api_key","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_client_setup(api_key = \"Your API key\") nixtlar::nixtla_validate_api_key() } # }"},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-062","dir":"Changelog","previous_headings":"","what":"nixtlar 0.6.2","title":"nixtlar 0.6.2","text":"Current version nixtlar. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-061-2024-10-07","dir":"Changelog","previous_headings":"","what":"nixtlar 0.6.1 (2024-10-07)","title":"nixtlar 0.6.1 (2024-10-07)","text":"CRAN release: 2024-10-10 excited announce release nixtlar version 0.6.0, integrates latest release TimeGPT API—v2. update focuses matters users: speed, scalability, reliability. Key updates include: Data Structures: nixtlar now extends support tibbles, addition previously supported data frames tsibbles. broadens range data structures can used workflows. Date Formats: efficiency, nixtlar now strictly requires dates format YYYY-MM-DD YYYY-MM-DD hh:mm:ss, either character strings date-time objects. details, please refer Get Started guide Data Requirements vignette. Default ID Column: alignment Python SDK, nixtlar now defaults id_col unique_id. means longer need specify column already named unique_id. dataset contains one series, simply set id_col=NULL. id_col accepts characters integers. changes leverage capabilities TimeGPT’s new API align nixtlar closely Python SDK, ensuring better user experience. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-060","dir":"Changelog","previous_headings":"","what":"nixtlar 0.6.0","title":"nixtlar 0.6.0","text":"New version uses TimeGPT API—v2. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-054","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.4","title":"nixtlar 0.5.4","text":"Development version. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-053","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.3","title":"nixtlar 0.5.3","text":"Development version. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-052","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.2","title":"nixtlar 0.5.2","text":"CRAN release: 2024-06-01","code":""},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-050","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.0","title":"nixtlar 0.5.0","text":"Initial CRAN submission.","code":""}]
+[{"path":[]},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement ops@nixtla.io. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://nixtla.github.io/nixtlar/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://nixtla.github.io/nixtlar/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache License","title":"Apache License","text":"Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS CONDITIONS USE, REPRODUCTION, DISTRIBUTION Definitions. “License” shall mean terms conditions use, reproduction, distribution defined Sections 1 9 document. “Licensor” shall mean copyright owner entity authorized copyright owner granting License. “Legal Entity” shall mean union acting entity entities control, controlled , common control entity. purposes definition, “control” means () power, direct indirect, cause direction management entity, whether contract otherwise, (ii) ownership fifty percent (50%) outstanding shares, (iii) beneficial ownership entity. “” (“”) shall mean individual Legal Entity exercising permissions granted License. “Source” form shall mean preferred form making modifications, including limited software source code, documentation source, configuration files. “Object” form shall mean form resulting mechanical transformation translation Source form, including limited compiled object code, generated documentation, conversions media types. “Work” shall mean work authorship, whether Source Object form, made available License, indicated copyright notice included attached work (example provided Appendix ). “Derivative Works” shall mean work, whether Source Object form, based (derived ) Work editorial revisions, annotations, elaborations, modifications represent, whole, original work authorship. purposes License, Derivative Works shall include works remain separable , merely link (bind name) interfaces , Work Derivative Works thereof. “Contribution” shall mean work authorship, including original version Work modifications additions Work Derivative Works thereof, intentionally submitted Licensor inclusion Work copyright owner individual Legal Entity authorized submit behalf copyright owner. purposes definition, “submitted” means form electronic, verbal, written communication sent Licensor representatives, including limited communication electronic mailing lists, source code control systems, issue tracking systems managed , behalf , Licensor purpose discussing improving Work, excluding communication conspicuously marked otherwise designated writing copyright owner “Contribution.” “Contributor” shall mean Licensor individual Legal Entity behalf Contribution received Licensor subsequently incorporated within Work. Grant Copyright License. Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable copyright license reproduce, prepare Derivative Works , publicly display, publicly perform, sublicense, distribute Work Derivative Works Source Object form. Grant Patent License. Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable (except stated section) patent license make, made, use, offer sell, sell, import, otherwise transfer Work, license applies patent claims licensable Contributor necessarily infringed Contribution(s) alone combination Contribution(s) Work Contribution(s) submitted. institute patent litigation entity (including cross-claim counterclaim lawsuit) alleging Work Contribution incorporated within Work constitutes direct contributory patent infringement, patent licenses granted License Work shall terminate date litigation filed. Redistribution. may reproduce distribute copies Work Derivative Works thereof medium, without modifications, Source Object form, provided meet following conditions: must give recipients Work Derivative Works copy License; must cause modified files carry prominent notices stating changed files; must retain, Source form Derivative Works distribute, copyright, patent, trademark, attribution notices Source form Work, excluding notices pertain part Derivative Works; Work includes “NOTICE” text file part distribution, Derivative Works distribute must include readable copy attribution notices contained within NOTICE file, excluding notices pertain part Derivative Works, least one following places: within NOTICE text file distributed part Derivative Works; within Source form documentation, provided along Derivative Works; , within display generated Derivative Works, wherever third-party notices normally appear. contents NOTICE file informational purposes modify License. may add attribution notices within Derivative Works distribute, alongside addendum NOTICE text Work, provided additional attribution notices construed modifying License. may add copyright statement modifications may provide additional different license terms conditions use, reproduction, distribution modifications, Derivative Works whole, provided use, reproduction, distribution Work otherwise complies conditions stated License. Submission Contributions. Unless explicitly state otherwise, Contribution intentionally submitted inclusion Work Licensor shall terms conditions License, without additional terms conditions. Notwithstanding , nothing herein shall supersede modify terms separate license agreement may executed Licensor regarding Contributions. Trademarks. License grant permission use trade names, trademarks, service marks, product names Licensor, except required reasonable customary use describing origin Work reproducing content NOTICE file. Disclaimer Warranty. Unless required applicable law agreed writing, Licensor provides Work (Contributor provides Contributions) “” BASIS, WITHOUT WARRANTIES CONDITIONS KIND, either express implied, including, without limitation, warranties conditions TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS PARTICULAR PURPOSE. solely responsible determining appropriateness using redistributing Work assume risks associated exercise permissions License. Limitation Liability. event legal theory, whether tort (including negligence), contract, otherwise, unless required applicable law (deliberate grossly negligent acts) agreed writing, shall Contributor liable damages, including direct, indirect, special, incidental, consequential damages character arising result License use inability use Work (including limited damages loss goodwill, work stoppage, computer failure malfunction, commercial damages losses), even Contributor advised possibility damages. Accepting Warranty Additional Liability. redistributing Work Derivative Works thereof, may choose offer, charge fee , acceptance support, warranty, indemnity, liability obligations /rights consistent License. However, accepting obligations, may act behalf sole responsibility, behalf Contributor, agree indemnify, defend, hold Contributor harmless liability incurred , claims asserted , Contributor reason accepting warranty additional liability. END TERMS CONDITIONS","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"anomaly-detection","dir":"Articles","previous_headings":"","what":"1. Anomaly detection","title":"Anomaly Detection","text":"Anomaly detection plays crucial role time series analysis forecasting. Anomalies, also known outliers, unusual observations don’t follow expected time series patterns. can caused variety factors, including errors data collection process, unexpected events, sudden changes patterns time series. Anomalies can provide critical information system, like potential problem malfunction. identifying , important understand caused , decide whether remove, replace, keep . TimeGPT method detecting anomalies, users can call nixtlar. vignette explain . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Anomaly Detection","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"detect-anomalies","dir":"Articles","previous_headings":"","what":"3. Detect Anomalies","title":"Anomaly Detection","text":"detect anomalies, use nixtlar::nixtla_client_detect_anomalies, requires following parameter: df: time series data, provided data frame, tibble, tsibble. must include least two columns: one timestamps one observations. default names columns ds y. column names different, specify time_col target_col, respectively. working multiple series, must also include column unique identifiers. default name column unique_id; different, specify id_col. anomaly_detection method TimeGPT evaluates observation uses prediction interval determine anomaly . default, nixtlar::nixtla_client_detect_anomalies uses 99% prediction interval. Observations fall outside interval considered anomalies value True anomaly column (False otherwise). change prediction interval, example 95%, use argument level=c(95). Keep mind multiple levels allowed, given several values, nixtlar::nixtla_client_detect_anomalies use maximum.","code":"nixtla_client_anomalies <- nixtlar::nixtla_client_detect_anomalies(df) #> Frequency chosen: h head(nixtla_client_anomalies) #> unique_id ds y anomaly TimeGPT TimeGPT-lo-99 #> 1 BE 2016-10-27 00:00:00 52.58 FALSE 56.07623 -28.58337 #> 2 BE 2016-10-27 01:00:00 44.86 FALSE 52.41973 -32.23986 #> 3 BE 2016-10-27 02:00:00 42.31 FALSE 52.81474 -31.84486 #> 4 BE 2016-10-27 03:00:00 39.66 FALSE 52.59026 -32.06934 #> 5 BE 2016-10-27 04:00:00 38.98 FALSE 52.67297 -31.98662 #> 6 BE 2016-10-27 05:00:00 42.31 FALSE 54.10659 -30.55301 #> TimeGPT-hi-99 #> 1 140.7358 #> 2 137.0793 #> 3 137.4743 #> 4 137.2499 #> 5 137.3326 #> 6 138.7662"},{"path":"https://nixtla.github.io/nixtlar/articles/anomaly-detection.html","id":"plot-anomalies","dir":"Articles","previous_headings":"","what":"4. Plot anomalies","title":"Anomaly Detection","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). using nixtlar::nixtla_client_plot output nixtlar::nixtla_client_detect_anomalies, set plot_anomalies=TRUE plot anomalies.","code":"nixtlar::nixtla_client_plot(df, nixtla_client_anomalies, plot_anomalies = TRUE)"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"set-up-a-timegen-1-endpoint-account-and-generate-your-api-key-on-azure-","dir":"Articles","previous_headings":"","what":"1. Set up a TimeGEN-1 endpoint account and generate your API key on Azure.","title":"TimeGEN-1 Quickstart (Azure)","text":"Go ml.azure.com Sign create account. don’t one already, create workspace. might require subscription. Click Models sidebar select TimeGEN model catalog. Click Deploy. create Endpoint. Go Endpoint sidebar. find Base URL API key.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"install-nixtlar","dir":"Articles","previous_headings":"","what":"2. Install nixtlar","title":"TimeGEN-1 Quickstart (Azure)","text":"favorite R IDE, install nixtlar CRAN GitHub.","code":"install.packages(\"nixtlar\") # CRAN version library(devtools) devtools::install_github(\"Nixtla/nixtlar\")"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"set-up-the-base-url-and-api-key","dir":"Articles","previous_headings":"","what":"3. Set up the Base URL and API key","title":"TimeGEN-1 Quickstart (Azure)","text":", use nixtla_client_setup function.","code":"nixtla_client_setup( base_url = \"Base URL here\", api_key = \"API key here\" )"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"start-making-forecasts","dir":"Articles","previous_headings":"","what":"4. Start making forecasts!","title":"TimeGEN-1 Quickstart (Azure)","text":"Now can start making forecasts! use electricity dataset included nixtlar. dataset contains prices different electricity markets. can plot forecasts nixtla_client_plot function. learn data requirements TimeGPT’s capabilities, please read nixtlar vignettes.","code":"df <- nixtlar::electricity nixtla_client_fcst <- nixtla_client_forecast(df, h = 8, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700 nixtla_client_plot(df, nixtla_client_fcst, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/azure-quickstart.html","id":"discover-the-power-of-timegen-on-azure-via-nixtlar-","dir":"Articles","previous_headings":"","what":"Discover the power of TimeGEN on Azure via nixtlar.","title":"TimeGEN-1 Quickstart (Azure)","text":"Deploying TimeGEN via nixtlar Azure allows implement robust scalable forecasting solutions. simplifies integration advanced analytics workflows also ensures power Azure’s cutting-edge technology disposal pay---go service. learn , read .","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"time-series-cross-validation","dir":"Articles","previous_headings":"","what":"1. Time series cross-validation","title":"Cross-Validation","text":"Cross-validation method evaluating performance forecasting model. Given time series, carried defining sliding window across historical data predicting period following . accuracy model computed averaging accuracy across cross-validation windows. method results better estimation model’s predictive abilities, since considers multiple periods instead just one, respecting sequential nature data. TimeGPT method performing time series cross-validation, users can call nixtlar. vignette explain . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Cross-Validation","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"perform-time-series-cross-validation","dir":"Articles","previous_headings":"","what":"3. Perform time series cross-validation","title":"Cross-Validation","text":"perform time series cross-validation using TimeGPT, use nixtlar::nixtla_client_cross_validation. key parameters method : df: time series data, provided data frame, tibble, tsibble. must include least two columns: one timestamps one observations. default names columns ds y. column names different, specify time_col target_col, respectively. working multiple series, must also include column unique identifiers. default name column unique_id; different, specify id_col. h: forecast horizon. n_windows: number windows evaluate. Default value 1. step_size: gap cross-validation window. Default value NULL.","code":"nixtla_client_cv <- nixtla_client_cross_validation(df, h = 8, n_windows = 5) #> Frequency chosen: h head(nixtla_client_cv) #> unique_id ds cutoff y TimeGPT #> 1 BE 2016-12-29 08:00:00 2016-12-29 07:00:00 53.30 51.79829 #> 2 BE 2016-12-29 09:00:00 2016-12-29 07:00:00 53.93 55.48120 #> 3 BE 2016-12-29 10:00:00 2016-12-29 07:00:00 56.63 55.86470 #> 4 BE 2016-12-29 11:00:00 2016-12-29 07:00:00 55.66 54.45249 #> 5 BE 2016-12-29 12:00:00 2016-12-29 07:00:00 48.00 54.76038 #> 6 BE 2016-12-29 13:00:00 2016-12-29 07:00:00 46.53 53.56611"},{"path":"https://nixtla.github.io/nixtlar/articles/cross-validation.html","id":"plot-cross-validation-results","dir":"Articles","previous_headings":"","what":"4. Plot cross-validation results","title":"Cross-Validation","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_anomaly_detection nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). using nixtlar::nixtla_client_plot output nixtlar::nixtla_client_cross_validation, cross-validation window visually represented vertical dashed lines. given pair lines, data first line forms training set. set used forecast data two lines.","code":"nixtla_client_plot(df, nixtla_client_cv, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"input-requirements","dir":"Articles","previous_headings":"","what":"1. Input Requirements","title":"Data Requirements","text":"nixtlar now supports following data structures: data frames, tibbles, tsibbles. output format always data frame. Regardless data structure, following two columns must always included using core functions nixtlar: Date Column: column must contain timestamps formatted YYYY-MM-DD YYYY-MM-DD hh:mm:ss, either characters date-time objects. date-time objects, recommend using .POSIX* functions base R, although .Date also supported. default name column ds. dataset uses different name, please specify setting parameter time_col=\"your_time_column_name\". Target Column: column contain numeric target variable forecasting. default name column y. dataset uses different name, specify setting parameter target_col=\"your_target_column_name\".","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"multiple-series","dir":"Articles","previous_headings":"","what":"2. Multiple Series","title":"Data Requirements","text":"working multiple series, must include column unique identifier series. column can contain characters integers, default name unique_id. dataset uses different name identifier column, please specify setting parameter id_col=\"your_id_column_name\". dataset contains one series need identifier, set id_col NULL. Please aware earlier versions nixtlar, default name id_col NULL, now unique_id.","code":"# sample valid input df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 str(df) #> 'data.frame': 8400 obs. of 3 variables: #> $ unique_id: chr \"BE\" \"BE\" \"BE\" \"BE\" ... #> $ ds : chr \"2016-10-22 00:00:00\" \"2016-10-22 01:00:00\" \"2016-10-22 02:00:00\" \"2016-10-22 03:00:00\" ... #> $ y : num 70 37.1 37.1 44.8 37.1 ..."},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"exogenous-variables","dir":"Articles","previous_headings":"","what":"3. Exogenous Variables","title":"Data Requirements","text":"using exogenous variables, nixtlar distinguishes historical future exogenous variables: Historical Exogenous Variables: included input data immediately following id_col, ds, y columns. dataset contains additional columns exogenous variables, must remove using core functions nixtlar. Future Exogenous Variables: correspond X_df parameter cover entire forecast horizon. dataset must include columns appropriate timestamps , applicable, unique identifiers, formatted described previous sections. learn use exogenous variables, please refer Exogenous variables vignette.","code":"# sample valid input with exogenous variables df <- nixtlar::electricity_exo_vars head(df) #> unique_id ds y Exogenous1 Exogenous2 day_0 day_1 day_2 #> 1 BE 2016-10-22 00:00:00 70.00 49593 57253 0 0 0 #> 2 BE 2016-10-22 01:00:00 37.10 46073 51887 0 0 0 #> 3 BE 2016-10-22 02:00:00 37.10 44927 51896 0 0 0 #> 4 BE 2016-10-22 03:00:00 44.75 44483 48428 0 0 0 #> 5 BE 2016-10-22 04:00:00 37.10 44338 46721 0 0 0 #> 6 BE 2016-10-22 05:00:00 35.61 44504 46303 0 0 0 #> day_3 day_4 day_5 day_6 #> 1 0 0 1 0 #> 2 0 0 1 0 #> 3 0 0 1 0 #> 4 0 0 1 0 #> 5 0 0 1 0 #> 6 0 0 1 0 future_exo_vars <- nixtlar::electricity_future_exo_vars head(future_exo_vars) #> unique_id ds Exogenous1 Exogenous2 day_0 day_1 day_2 day_3 #> 1 BE 2016-12-31 00:00:00 64108 70318 0 0 0 0 #> 2 BE 2016-12-31 01:00:00 62492 67898 0 0 0 0 #> 3 BE 2016-12-31 02:00:00 61571 68379 0 0 0 0 #> 4 BE 2016-12-31 03:00:00 60381 64972 0 0 0 0 #> 5 BE 2016-12-31 04:00:00 60298 62900 0 0 0 0 #> 6 BE 2016-12-31 05:00:00 60339 62364 0 0 0 0 #> day_4 day_5 day_6 #> 1 0 1 0 #> 2 0 1 0 #> 3 0 1 0 #> 4 0 1 0 #> 5 0 1 0 #> 6 0 1 0"},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"missing-values","dir":"Articles","previous_headings":"","what":"4. Missing values","title":"Data Requirements","text":"using TimeGPT via nixtlar, ensure following: Missing Values Target Column: target column must contain missing values (NA). Continuous Date Sequence: dates must continuous, without gaps, start date end date, matching frequency data. Currently, nixtlar provide functionality fill missing values dates. learn , please refer vignette Special Topics.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/data-requirements.html","id":"minimum-data-requirements","dir":"Articles","previous_headings":"","what":"5. Minimum data requirements","title":"Data Requirements","text":"minimum size per series obtain results nixtlar::nixtla_client_forecast one, regardless frequency data. Keep mind, however, produce results limited accuracy. certain scenarios, one observation may necessary: using parameters level, quantiles, finetune_steps. incorporating exogenous variables. including historical forecasts setting add_history=TRUE. minimum data requirement varies frequency data, detailed official TimeGPT documentation. using nixtlar::nixtla_client_cross_validation, also need consider forecast horizon (h), number windows (n_windows) step size (step_size). formula minimum data points required per series : Min per series=Min per frequency+h+step_size*(n_windows−1)\\begin{equation} \\text{Min per series} = \\text{Min per frequency}+h+\\text{step_size}*(\\text{n_windows}-1) \\end{equation} , Min per frequency\\text{Min per frequency} refers values specified table official documentation.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"exogenous-variables","dir":"Articles","previous_headings":"","what":"1. Exogenous variables","title":"Exogenous Variables","text":"Exogenous variables external factors provide additional information behavior target variable time series forecasting. variables, correlated target, can significantly improve predictions. Examples exogenous variables include weather data, economic indicators, holiday markers, promotional sales. TimeGPT allows include exogenous variables generating forecast. vignette show include . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Exogenous Variables","text":"vignette, use electricity consumption dataset exogenous variables included nixtlar. dataset contains hourly prices five different electricity markets, along two exogenous variables related prices binary variables indicating day week. using exogenous variables, nixtlar distinguishes historical future exogenous variables: Historical Exogenous Variables: included input data immediately following id_col, ds, y columns. dataset contains additional columns exogenous variables, must remove using core functions nixtlar. Future Exogenous Variables: correspond X_df parameter cover entire forecast horizon. dataset must include columns appropriate timestamps , applicable, unique identifiers.","code":"df_exo_vars <- nixtlar::electricity_exo_vars head(df_exo_vars) #> unique_id ds y Exogenous1 Exogenous2 day_0 day_1 day_2 #> 1 BE 2016-10-22 00:00:00 70.00 49593 57253 0 0 0 #> 2 BE 2016-10-22 01:00:00 37.10 46073 51887 0 0 0 #> 3 BE 2016-10-22 02:00:00 37.10 44927 51896 0 0 0 #> 4 BE 2016-10-22 03:00:00 44.75 44483 48428 0 0 0 #> 5 BE 2016-10-22 04:00:00 37.10 44338 46721 0 0 0 #> 6 BE 2016-10-22 05:00:00 35.61 44504 46303 0 0 0 #> day_3 day_4 day_5 day_6 #> 1 0 0 1 0 #> 2 0 0 1 0 #> 3 0 0 1 0 #> 4 0 0 1 0 #> 5 0 0 1 0 #> 6 0 0 1 0 future_exo_vars <- nixtlar::electricity_future_exo_vars head(future_exo_vars) #> unique_id ds Exogenous1 Exogenous2 day_0 day_1 day_2 day_3 #> 1 BE 2016-12-31 00:00:00 64108 70318 0 0 0 0 #> 2 BE 2016-12-31 01:00:00 62492 67898 0 0 0 0 #> 3 BE 2016-12-31 02:00:00 61571 68379 0 0 0 0 #> 4 BE 2016-12-31 03:00:00 60381 64972 0 0 0 0 #> 5 BE 2016-12-31 04:00:00 60298 62900 0 0 0 0 #> 6 BE 2016-12-31 05:00:00 60339 62364 0 0 0 0 #> day_4 day_5 day_6 #> 1 0 1 0 #> 2 0 1 0 #> 3 0 1 0 #> 4 0 1 0 #> 5 0 1 0 #> 6 0 1 0"},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"forecast-with-exogenous-variables","dir":"Articles","previous_headings":"","what":"3. Forecast with exogenous variables","title":"Exogenous Variables","text":"generate forecast exogenous variables, use nixtla_client_forecast function forecasts without . difference must add future exogenous variables using X_df argument. comparison, also generate forecast without exogenous variables.","code":"fcst_exo_vars <- nixtla_client_forecast(df_exo_vars, h = 24, X_df = future_exo_vars) #> Frequency chosen: h #> Using historical exogenous features: Exogenous1, Exogenous2, day_0, day_1, day_2, day_3, day_4, day_5, day_6 #> Using future exogenous features: Exogenous1, Exogenous2, day_0, day_1, day_2, day_3, day_4, day_5, day_6 head(fcst_exo_vars) #> unique_id ds TimeGPT #> 1 BE 2016-12-31 00:00:00 74.54077 #> 2 BE 2016-12-31 01:00:00 43.34429 #> 3 BE 2016-12-31 02:00:00 44.42921 #> 4 BE 2016-12-31 03:00:00 38.09440 #> 5 BE 2016-12-31 04:00:00 37.38914 #> 6 BE 2016-12-31 05:00:00 39.08574 df <- nixtlar::electricity # same dataset but without exogenous variables fcst <- nixtla_client_forecast(df, h = 24) #> Frequency chosen: h head(fcst) #> unique_id ds TimeGPT #> 1 BE 2016-12-31 00:00:00 45.19045 #> 2 BE 2016-12-31 01:00:00 43.24445 #> 3 BE 2016-12-31 02:00:00 41.95839 #> 4 BE 2016-12-31 03:00:00 39.79649 #> 5 BE 2016-12-31 04:00:00 39.20454 #> 6 BE 2016-12-31 05:00:00 40.10878"},{"path":"https://nixtla.github.io/nixtlar/articles/exogenous-variables.html","id":"plot-timegpt-forecast","dir":"Articles","previous_headings":"","what":"4. Plot TimeGPT forecast","title":"Exogenous Variables","text":"nixtlar includes function plot historical data output nixtla_client_forecast, nixtla_client_historic, nixtla_client_anomaly_detection nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full).","code":"nixtla_client_plot(df_exo_vars, fcst_exo_vars, max_insample_length = 500)"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"setting-up-your-api-key","dir":"Articles","previous_headings":"","what":"1. Setting up your API key","title":"Get Started","text":"First, need set API key. API key string characters allows authenticate requests using TimeGPT via nixtlar. API key needs provided Nixtla, don’t one, please request one . using nixtlar, two ways setting API key:","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"a--using-the-nixtla_client_setup-function","dir":"Articles","previous_headings":"1. Setting up your API key","what":"a. Using the nixtla_client_setup function","title":"Get Started","text":"nixtlar function easily set API key current R session. Simply call Keep mind close R session re-start , ’ll need set API key . using Azure, also need add base_ur parameter nixtla_client_setup function.","code":"nixtla_client_setup(api_key = \"Your API key here\") nixtla_client_setup( base_url = \"Base ULR\", api_key = \"Your API key here\" )"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"b--using-an-environment-variable","dir":"Articles","previous_headings":"1. Setting up your API key","what":"b. Using an environment variable","title":"Get Started","text":"persistent method can used across different projects, set API key environment variable. , first load usethis package. open .Reviron file. Place API key named NIXTLA_API_KEY. ’ll need restart R changes take effect. Keep mind modifying .Renviron file affects R sessions, ’re comfortable , use nixtla_client_setup function instead. using Azure, also need specify NIXTLA_BASE_URL. details set API key, check Setting API Key vignette. learn use Azure, please refer TimeGEN-1 Quickstart (Azure).","code":"library(usethis) usethis::edit_r_environ() # Inside the .Renviron file NIXTLA_API_KEY=\"Your API key here\" # Inside the .Renviron file NIXTLA_BASE_URL=\"Base URL\" NIXTLA_API_KEY=\"Your API key here\""},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"validate-your-api-key","dir":"Articles","previous_headings":"1. Setting up your API key","what":"Validate your API key","title":"Get Started","text":"want validate API key, call nixtla_validate_api_key. don’t need validate API key every time set , want check ’s valid. nixtla_validate_api_key return TRUE API key valid, FALSE otherwise.","code":"nixtla_validate_api_key()"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"generate-timegpt-forecast","dir":"Articles","previous_headings":"","what":"2. Generate TimeGPT forecast","title":"Get Started","text":"API key set , ’re ready use TimeGPT. ’ll show done using dataset contains prices different electricity markets. generate forecast dataset, use nixtla_client_forecast. Default names time target columns ds y. time target columns different names, specify time_col target_col. Since multiple ids (one every electricity market), ’ll need specify name column contains ids, case unique_id. , simply use id_col=\"unique_id\". can also choose confidence levels (0-100) prediction intervals level.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 nixtla_client_fcst <- nixtla_client_forecast(df, h = 8, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700"},{"path":"https://nixtla.github.io/nixtlar/articles/get-started.html","id":"plot-timegpt-forecast","dir":"Articles","previous_headings":"","what":"3. Plot TimeGPT forecast","title":"Get Started","text":"nixtlar includes function plot historical data output nixtla_client_forecast, nixtla_client_historic, nixtla_client_anomaly_detection nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full).","code":"nixtla_client_plot(df, nixtla_client_fcst, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"timegpt-historical-forecast","dir":"Articles","previous_headings":"","what":"1. TimeGPT Historical Forecast","title":"Historical Forecast","text":"generating forecast, sometimes might interested forecasting historical observations. predictions, known fitted values, can help better understand evaluate model’s performance time. TimeGPT method generating fitted values, users can call nixtlar. vignette explain . assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Historical Forecast","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"forecast-historical-data","dir":"Articles","previous_headings":"","what":"3. Forecast historical data","title":"Historical Forecast","text":"generate forecast historical data, use nixtlar::nixtla_client_historic, include following parameters: df: time series data, provided data frame, tibble, tsibble. must include least two columns: one timestamps one observations. default names columns ds y. column names different, specify time_col target_col, respectively. working multiple series, must also include column unique identifiers. default name column unique_id; different, specify id_col. level: prediction intervals forecast. Notice fitted values initial observations. TimeGPT requires minimum number values generate forecast historical data. fitted values generated using rolling window, meaning fitted value observation TT generated using first T−1T-1 observations.","code":"nixtla_client_fitted_values <- nixtla_client_historic(df, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fitted_values) #> ds TimeGPT TimeGPT-lo-80 TimeGPT-lo-95 TimeGPT-hi-80 #> 1 2016-10-27 00:00:00 56.07623 25.27245 8.965920 86.88000 #> 2 2016-10-27 01:00:00 52.41973 21.61596 5.309425 83.22350 #> 3 2016-10-27 02:00:00 52.81474 22.01096 5.704433 83.61852 #> 4 2016-10-27 03:00:00 52.59026 21.78649 5.479953 83.39404 #> 5 2016-10-27 04:00:00 52.67297 21.86920 5.562667 83.47675 #> 6 2016-10-27 05:00:00 54.10659 23.30282 6.996284 84.91036 #> TimeGPT-hi-95 #> 1 103.18653 #> 2 99.53004 #> 3 99.92505 #> 4 99.70057 #> 5 99.78328 #> 6 101.21690"},{"path":"https://nixtla.github.io/nixtlar/articles/historical-forecast.html","id":"fitted-values-from-nixtlarnixtla_client_forecast","dir":"Articles","previous_headings":"3. Forecast historical data","what":"3.1 Fitted values from nixtlar::nixtla_client_forecast","title":"Historical Forecast","text":"nixtlar::nixtla_client_historic dedicated function calls TimeGPT’s method generating fitted values. However, can also use nixtlar::nixtla_client_forecast add_history=TRUE. generate forecast historical data next hh future observations.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"long-horizon-forecasting","dir":"Articles","previous_headings":"","what":"1. Long-horizon forecasting","title":"Long-Horizon Forecasting","text":"cases, necessary forecast long horizons. “long horizons” refer predictions exceed two seasonal periods. example, mean forecasting 48 hours ahead hourly data 7 days daily data. specific definition “long horizon” varies depending data frequency. specialized TimeGPT model designed long-horizon forecasting, trained predict far future, uncertainty increases forecast extends . explain use long horizon model TimeGPT via nixtlar. vignette assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Long-Horizon Forecasting","text":"vignette, ’ll use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets. every unique_id, ’ll try predict last 96 hours. Hence, first separate data training test sets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 test <- df |> dplyr::group_by(unique_id) |> dplyr::slice_tail(n = 96) |> dplyr::ungroup() train <- df[df$ds %in% setdiff(df$ds, test$ds), ]"},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"forecast-with-a-long-horizon","dir":"Articles","previous_headings":"","what":"3. Forecast with a long-horizon","title":"Long-Horizon Forecasting","text":"use long-horizon model TimeGPT, set model argument timegpt-1-long-horizon.","code":"fcst_long_horizon <- nixtlar::nixtla_client_forecast(train, h=96, model=\"timegpt-1-long-horizon\") #> Frequency chosen: h head(fcst_long_horizon) #> unique_id ds TimeGPT #> 1 BE 2016-12-27 00:00:00 42.73139 #> 2 BE 2016-12-27 01:00:00 38.03034 #> 3 BE 2016-12-27 02:00:00 35.11705 #> 4 BE 2016-12-27 03:00:00 34.53508 #> 5 BE 2016-12-27 04:00:00 34.11482 #> 6 BE 2016-12-27 05:00:00 38.36356"},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"plot-the-long-horizon-forecast","dir":"Articles","previous_headings":"","what":"4. Plot the long-horizon forecast","title":"Long-Horizon Forecasting","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full).","code":"nixtlar::nixtla_client_plot(train, fcst_long_horizon, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/articles/long-horizon.html","id":"evaluate-the-long-horizon-model","dir":"Articles","previous_headings":"","what":"5. Evaluate the long-horizon model","title":"Long-Horizon Forecasting","text":"evaluate long-horizon forecast, generate forecast default model TimeGPT, timegpt-1, compute compare Mean Absolute Error (MAE) two models. rename TimeGPT long-horizon model merge default TimeGPT model. , combine actual values test set compute MAE. Note output nixtla_client_forecast function, ds column contains dates. nixtla_client_plot uses dates plotting. However, merge actual values, convert dates characters. can see, long-horizon version TimeGPT produced model lower MAE default TimeGPT model.","code":"fcst <- nixtlar::nixtla_client_forecast(train, h=96) #> Frequency chosen: h #> The specified horizon h exceeds the model horizon. This may lead to less accurate forecasts. Please consider using a smaller horizon. head(fcst) #> unique_id ds TimeGPT #> 1 BE 2016-12-27 00:00:00 45.21921 #> 2 BE 2016-12-27 01:00:00 42.56666 #> 3 BE 2016-12-27 02:00:00 41.55990 #> 4 BE 2016-12-27 03:00:00 39.12502 #> 5 BE 2016-12-27 04:00:00 36.47087 #> 6 BE 2016-12-27 05:00:00 37.22281 names(fcst_long_horizon)[which(names(fcst_long_horizon) == \"TimeGPT\")] <- \"TimeGPT-long-horizon\" res <- merge(fcst, fcst_long_horizon) # merge TimeGPT and TimeGPT-long-horizon res$ds <- as.character(res$ds) res <- merge(test, res) # merge with actual values head(res) #> unique_id ds y TimeGPT TimeGPT-long-horizon #> 1 BE 2016-12-27 01:00:00 38.33 42.56666 38.03034 #> 2 BE 2016-12-27 02:00:00 41.04 41.55990 35.11705 #> 3 BE 2016-12-27 03:00:00 34.62 39.12502 34.53508 #> 4 BE 2016-12-27 04:00:00 29.69 36.47087 34.11482 #> 5 BE 2016-12-27 05:00:00 28.35 37.22281 38.36356 #> 6 BE 2016-12-27 06:00:00 30.99 42.28119 47.14343 print(paste0(\"MAE TimeGPT: \", mean(abs(res$y-res$TimeGPT)))) #> [1] \"MAE TimeGPT: 8.89928793765217\" print(paste0(\"MAE TimeGPT long-horizon: \", mean(abs(res$y-res$`TimeGPT-long-horizon`)))) #> [1] \"MAE TimeGPT long-horizon: 7.09785456847826\""},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"uncertainty-quantification-via-prediction-intervals","dir":"Articles","previous_headings":"","what":"1. Uncertainty quantification via prediction intervals","title":"Prediction Intervals","text":"uncertainty quantification, TimeGPT can generate prediction intervals quantiles, offering measure range potential outcomes rather just single point forecast. real-life scenarios, forecasting often requires considering multiple alternatives, just one prediction. vignette explain use prediction intervals TimeGPT via nixtlar package. prediction interval range values forecast can take given probability, often referred confidence level. Hence, 95% prediction interval contain range values includes actual future value probability 95%. Prediction intervals part probabilistic forecasting, , unlike point forecasting, aims generate full forecast distribution instead just mean median distribution. vignette assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Prediction Intervals","text":"vignette, use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"forecast-with-prediction-intervals","dir":"Articles","previous_headings":"","what":"3. Forecast with prediction intervals","title":"Prediction Intervals","text":"TimeGPT can generate prediction intervals using following functions: functions, simply set level argument desired confidence level prediction intervals. Keep mind level vector numbers 0 100. can use either quantiles level uncertainty quantification, . Note level argument nixtlar::nixtla_client_detect_anomalies() function uses maximum value multiple values provided. Therefore, setting level = c(90, 95, 99), example, equivalent setting level = c(99), default value.","code":"- nixtlar::nixtla_client_forecast() - nixtlar::nixtla_client_historic() - nixtlar::nixtla_client_detect_anomalies() - nixtlar::nixtla_client_cross_validation() fcst <- nixtla_client_forecast(df, h = 8, level=c(80,95)) #> Frequency chosen: h head(fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700 anomalies <- nixtla_client_detect_anomalies(df) # level=c(90,95,99) #> Frequency chosen: h head(anomalies) # only the 99% confidence level is used #> unique_id ds y anomaly TimeGPT TimeGPT-lo-99 #> 1 BE 2016-10-27 00:00:00 52.58 FALSE 56.07623 -28.58337 #> 2 BE 2016-10-27 01:00:00 44.86 FALSE 52.41973 -32.23986 #> 3 BE 2016-10-27 02:00:00 42.31 FALSE 52.81474 -31.84486 #> 4 BE 2016-10-27 03:00:00 39.66 FALSE 52.59026 -32.06934 #> 5 BE 2016-10-27 04:00:00 38.98 FALSE 52.67297 -31.98662 #> 6 BE 2016-10-27 05:00:00 42.31 FALSE 54.10659 -30.55301 #> TimeGPT-hi-99 #> 1 140.7358 #> 2 137.0793 #> 3 137.4743 #> 4 137.2499 #> 5 137.3326 #> 6 138.7662"},{"path":"https://nixtla.github.io/nixtlar/articles/prediction-intervals.html","id":"plot-prediction-intervals","dir":"Articles","previous_headings":"","what":"4. Plot prediction intervals","title":"Prediction Intervals","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). available, nixtlar::nixtla_client_plot automatically plot prediction intervals.","code":"nixtla_client_plot(df, fcst, max_insample_length = 100) nixtlar::nixtla_client_plot(df, anomalies, plot_anomalies = TRUE)"},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"uncertainty-quantification-via-quantiles","dir":"Articles","previous_headings":"","what":"1. Uncertainty quantification via quantiles","title":"Quantile Forecasts","text":"uncertainty quantification, TimeGPT can generate prediction intervals quantiles, offering measure range potential outcomes rather just single point forecast. real-life scenarios, forecasting often requires considering multiple alternatives, just one prediction. vignette explain use quantiles TimeGPT via nixtlar package. Quantiles represent cumulative proportion forecast distribution. instance, 90th quantile value 90% data points expected fall. Notably, 50th quantile corresponds median forecast value provided TimeGPT. quantiles produced using conformal prediction, framework creating distribution-free uncertainty intervals predictive models. vignette assumes already set API key. haven’t done , please read Get Started vignette first.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"load-data","dir":"Articles","previous_headings":"","what":"2. Load data","title":"Quantile Forecasts","text":"vignette, use electricity consumption dataset included nixtlar, contains hourly prices five different electricity markets.","code":"df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61"},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"forecast-with-quantiles","dir":"Articles","previous_headings":"","what":"3. Forecast with quantiles","title":"Quantile Forecasts","text":"TimeGPT can generate quantiles using following functions: functions, simply set quantiles argument desired values vector. Keep mind quantiles numbers 0 1. can use either quantiles level uncertainty quantification, .","code":"- nixtlar::nixtla_client_forecast() - nixtlar::nixtla_client_historic() - nixtlar::nixtla_client_cross_validation() fcst <- nixtla_client_forecast(df, h = 8, quantiles = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)) #> Frequency chosen: h head(fcst) #> unique_id ds TimeGPT TimeGPT-q-10 TimeGPT-q-20 TimeGPT-q-30 #> 1 BE 2016-12-31 00:00:00 45.19045 35.50842 38.47870 40.71582 #> 2 BE 2016-12-31 01:00:00 43.24445 35.37463 37.77037 39.31913 #> 3 BE 2016-12-31 02:00:00 41.95839 35.34079 37.21802 39.44543 #> 4 BE 2016-12-31 03:00:00 39.79649 32.32625 34.98683 35.96071 #> 5 BE 2016-12-31 04:00:00 39.20454 30.99895 32.74554 34.72325 #> 6 BE 2016-12-31 05:00:00 40.10878 32.43504 34.25011 35.10687 #> TimeGPT-q-40 TimeGPT-q-50 TimeGPT-q-60 TimeGPT-q-70 TimeGPT-q-80 TimeGPT-q-90 #> 1 43.92545 45.19045 46.45545 49.66508 51.90221 54.87248 #> 2 42.58400 43.24445 43.90489 47.16976 48.71852 51.11427 #> 3 40.85600 41.95839 43.06078 44.47135 46.69876 48.57599 #> 4 37.46390 39.79649 42.12907 43.63226 44.60614 47.26672 #> 5 36.01405 39.20454 42.39502 43.68583 45.66353 47.41012 #> 6 38.76697 40.10878 41.45059 45.11069 45.96745 47.78252"},{"path":"https://nixtla.github.io/nixtlar/articles/quantiles.html","id":"plot-quantiles","dir":"Articles","previous_headings":"","what":"4. Plot quantiles","title":"Quantile Forecasts","text":"nixtlar includes function plot historical data output nixtlar::nixtla_client_forecast, nixtlar::nixtla_client_historic, nixtlar::nixtla_client_detect_anomalies nixtlar::nixtla_client_cross_validation. long series, can use max_insample_length plot last N historical values (forecast always plotted full). available, nixtlar::nixtla_client_plot automatically plot quantiles.","code":"nixtla_client_plot(df, fcst, max_insample_length = 100)"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"what-is-an-api-key","dir":"Articles","previous_headings":"","what":"1. What is an API key?","title":"Setting Up Your API Key","text":"API key unique string characters used authenticate requests using nixtlar. necessary valid API key use core functions nixtlar interact TimeGPT:","code":"# core functions that interact with TimeGPT - nixtlar::nixtla_client_forecast() - nixtlar::nixtla_client_historic() - nixtlar::nixtla_client_detect_anomalies() - nixtlar::nixtla_client_cross_validation()"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"how-can-i-get-one","dir":"Articles","previous_headings":"","what":"2. How can I get one?","title":"Setting Up Your API Key","text":"obtain API key, please sign : https://dashboard.nixtla.io/sign_in registering, access developer dashboard. API keys, find personal API key. Please note API key shared others, responsibility keep safe.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"how-do-i-set-up-my-api-key","dir":"Articles","previous_headings":"","what":"3. How do I set up my API key?","title":"Setting Up Your API Key","text":"several methods set API key.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"using-the-nixtlarnixtla_client_setup-function","dir":"Articles","previous_headings":"3. How do I set up my API key?","what":"3.1 Using the nixtlar::nixtla_client_setup function","title":"Setting Up Your API Key","text":"nixtlar provides function directly set API key: Keep mind close R session restart , need set API key . earlier versions nixtlar, function set API key called nixtla_set_api_key. However, nixtla_client_setup now provides functionality, along ability set Azure endpoints. nixtla_set_api_key function still available, now simply calls nixtla_client_setup. addition api_key parameter, nixtla_client_setup base_url parameter. ’s default value NULL, case, uses TimeGPT URL. can leave NULL unless working Azure. See Section 5 information.","code":"nixtlar::nixtla_client_setup(api_key = \"Your API key here\")"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"a--using-options","dir":"Articles","previous_headings":"3. How do I set up my API key? > 3.2 Using an environment variable","what":"a. Using options","title":"Setting Up Your API Key","text":"can set API key using options. make API key globally available throughout R session. Although appear list variables, persist close restart session explicitly change . verify set correctly, use:","code":"options(NIXTLA_API_KEY=\"Your API key here\") getOption(\"NIXTLA_API_KEY\")"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"b--using--renviron","dir":"Articles","previous_headings":"3. How do I set up my API key? > 3.2 Using an environment variable","what":"b. Using .Renviron","title":"Setting Up Your API Key","text":"persistent method can used across different projects, set API key environment variable. , first need load usethis package. open .Reviron file. Place API key , named NIXTLA_API_KEY. need restart R changes take effect. Note modifying .Renviron file affects R sessions, comfortable , set API key using nixtlar::nixtla_client_setup function.","code":"library(usethis) usethis::edit_r_environ() # Inside the .Renviron file NIXTLA_API_KEY=\"paste your API key here\""},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"validate-your-api-key-optional","dir":"Articles","previous_headings":"","what":"4. Validate your API key (optional)","title":"Setting Up Your API Key","text":"nixtlar includes function validate API key. nixtla_validate_api_key function return TRUE key valid, FALSE otherwise. need validate API key every time set , unsure status. Alternatively, dashboard, API keys, label next API key indicating status, example, active.","code":"nixtlar::nixtla_validate_api_key()"},{"path":"https://nixtla.github.io/nixtlar/articles/setting-up-your-api-key.html","id":"azure-endpoints","dir":"Articles","previous_headings":"","what":"5. Azure endpoints","title":"Setting Up Your API Key","text":"working Azure, need specify Base URL API key, shown . can also use one secure permanent method described , specifying NIXTLA_BASE_URL addition NIXTLA_API_KEY. learn , please refer TimeGEN-1 Quickstart (Azure) vignette.","code":"nixtlar::nixtla_client_setup( base_url = \"Base URL here\", api_key = \"Your API key here\" )"},{"path":"https://nixtla.github.io/nixtlar/articles/special-topics.html","id":"special-topics","dir":"Articles","previous_headings":"","what":"Special topics","title":"Special Topics","text":"vignette explains special topics regarding use TimeGPT via nixtlar.","code":""},{"path":"https://nixtla.github.io/nixtlar/articles/special-topics.html","id":"handling-missing-values","dir":"Articles","previous_headings":"","what":"1. Handling missing values","title":"Special Topics","text":"using TimeGPT, need ensure : target column contains missing values (NA). Given frequency data, dates continuous, missing dates start end dates. Regarding second point, worth mentioning possible multiple time series start end different dates, series must contain uninterrupted data given time frame. several ways check missing values R. One method .na functions base R. find missing values data, need decide fill , context-dependent. example, dealing daily retail data, missing value likely indicates sales day, can probably fill zero. However, working hourly temperature data, missing value likely means thermometer functioning correctly, might prefer use interpolation fill missing values. Whatever decide , always keep mind nature data. Checking missing dates complicated since depends frequency data. Sometimes plotting can help spot large gaps. nixtlar plotting function called nixtla_client_plot can used . However, method ineffective missing dates continuous. One possible solution compare dates every unique id vector dates generated using start date, end date, frequency data. requires knowing information, can become tricky working hundreds thousands time series.","code":"df <- nixtlar::electricity # load data # create some missing values at random index <- sample(nrow(df), 10) df$y[index] <- NA # check for missing values any(is.na(df)) # will return TRUE if there are missing values #> [1] TRUE"},{"path":"https://nixtla.github.io/nixtlar/articles/special-topics.html","id":"specifying-the-frequency-of-your-data","dir":"Articles","previous_headings":"","what":"2. Specifying the frequency of your data","title":"Special Topics","text":"frequency parameter crucial working time series data informs model expected intervals data points. core functions nixtlar interface TimeGPT, nixtla_client_forecast, nixtla_client_historic, nixtla_client_detect_anomalies, nixtla_client_cross_validation, include frequency parameter called freq, default value NULL. know frequency data, please specify . don’t, nixtlar try deduce data using nixtlar::infer_frequency function. freq parameter supports following aliases: table, QS MS stand quarter month start, QE stand quarter month end. quarter-end, following dates used. month-end, last day month used. Hourly sub-hourly frequencies can preceded integer, “6h”, “10min” “30s”. aliases “min” “s” allowed minute second-level frequencies.","code":"df <- nixtlar::electricity # infer the frequency when `freq` is not specified fcst <- nixtlar::nixtla_client_forecast(df, h = 8, level = c(80,95)) # freq = \"h\" #> Frequency chosen: h"},{"path":"https://nixtla.github.io/nixtlar/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Mariana Menchero. Author, maintainer. First author maintainer Nixtla. Copyright holder. Copyright held 'Nixtla'","code":""},{"path":"https://nixtla.github.io/nixtlar/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Menchero M (2024). nixtlar: Software Development Kit 'Nixtla”s 'TimeGPT'. R package version 0.6.2, https://docs.nixtla.io/, https://github.com/Nixtla/nixtlar, https://nixtla.github.io/nixtlar/.","code":"@Manual{, title = {nixtlar: A Software Development Kit for 'Nixtla''s 'TimeGPT'}, author = {Mariana Menchero}, year = {2024}, note = {R package version 0.6.2, https://docs.nixtla.io/, https://github.com/Nixtla/nixtlar}, url = {https://nixtla.github.io/nixtlar/}, }"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"version-062-of-nixtlar-is-now-available-2024-10-28","dir":"","previous_headings":"","what":"Version 0.6.2 of nixtlar is now available! (2024-10-28)","title":"A Software Development Kit for Nixtla's TimeGPT","text":"happy announce release nixtlar version 0.6.2, introducing support TimeGEN-1, TimeGPT optimized Azure. Key updates include: Azure Integration: can now use TimeGEN-1, version TimeGPT optimized Azure infrastructure, directly nixtlar. Simply configure API key Base URL get started. setup instructions, please check Azure Quickstart vignette. Enhanced Date Support: response user feedback, ’ve improved support date objects created .Date function. optimal performance, nixtlar now requires dates format YYYY-MM-DD YYYY-MM-DD hh:mm:ss, either characters date-objects, update resolves issues latter format. Business-Day Frequency Inference: nixtlar now supports inferring business-day frequency, users previously specify directly. Bug Fixes: version also includes fixes minor bugs reported users, ensuring overall stability performance. Thank continued support feedback, help us make nixtlar better. encourage update latest version take advantage improvements.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"timegpt-1","dir":"","previous_headings":"","what":"TimeGPT-1","title":"A Software Development Kit for Nixtla's TimeGPT","text":"first foundation model time series forecasting anomaly detection TimeGPT production-ready, generative pretrained transformer time series forecasting, developed Nixtla. capable accurately predicting various domains retail, electricity, finance, IoT, just lines code. Additionally, can detect anomalies time series data. TimeGPT initially developed Python now available R users nixtlar package.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of Contents","title":"A Software Development Kit for Nixtla's TimeGPT","text":"Installation Forecast Using TimeGPT 3 Easy Steps Anomaly Detection Using TimeGPT 3 Easy Steps Features Capabilities Documentation API Support Cite License Get Touch","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"A Software Development Kit for Nixtla's TimeGPT","text":"nixtlar available CRAN, can install latest stable version using install.packages. Alternatively, can install development version nixtlar GitHub devtools::install_github.","code":"# Install nixtlar from CRAN install.packages(\"nixtlar\") # Then load it library(nixtlar) # install.packages(\"devtools\") devtools::install_github(\"Nixtla/nixtlar\")"},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"forecast-using-timegpt-in-3-easy-steps","dir":"","previous_headings":"","what":"Forecast Using TimeGPT in 3 Easy Steps","title":"A Software Development Kit for Nixtla's TimeGPT","text":"Set API key. Get dashboard.nixtla.io Load sample data Forecast next 8 steps ahead Optionally, plot results","code":"library(nixtlar) nixtla_set_api_key(api_key = \"Your API key here\") df <- nixtlar::electricity head(df) #> unique_id ds y #> 1 BE 2016-10-22 00:00:00 70.00 #> 2 BE 2016-10-22 01:00:00 37.10 #> 3 BE 2016-10-22 02:00:00 37.10 #> 4 BE 2016-10-22 03:00:00 44.75 #> 5 BE 2016-10-22 04:00:00 37.10 #> 6 BE 2016-10-22 05:00:00 35.61 nixtla_client_fcst <- nixtla_client_forecast(df, h = 8, level = c(80,95)) #> Frequency chosen: h head(nixtla_client_fcst) #> unique_id ds TimeGPT TimeGPT-lo-95 TimeGPT-lo-80 #> 1 BE 2016-12-31 00:00:00 45.19045 30.49691 35.50842 #> 2 BE 2016-12-31 01:00:00 43.24445 28.96423 35.37463 #> 3 BE 2016-12-31 02:00:00 41.95839 27.06667 35.34079 #> 4 BE 2016-12-31 03:00:00 39.79649 27.96751 32.32625 #> 5 BE 2016-12-31 04:00:00 39.20454 24.66072 30.99895 #> 6 BE 2016-12-31 05:00:00 40.10878 23.05056 32.43504 #> TimeGPT-hi-80 TimeGPT-hi-95 #> 1 54.87248 59.88399 #> 2 51.11427 57.52467 #> 3 48.57599 56.85011 #> 4 47.26672 51.62546 #> 5 47.41012 53.74836 #> 6 47.78252 57.16700 nixtla_client_plot(df, nixtla_client_fcst, max_insample_length = 200)"},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"anomaly-detection-using-timegpt-in-3-easy-steps","dir":"","previous_headings":"","what":"Anomaly Detection Using TimeGPT in 3 Easy Steps","title":"A Software Development Kit for Nixtla's TimeGPT","text":"anomaly detection TimeGPT, also 3 easy steps! Follow steps 1 2 previous section use nixtla_client_detect_anomalies nixtla_client_plot functions.","code":"nixtla_client_anomalies <- nixtlar::nixtla_client_detect_anomalies(df) #> Frequency chosen: h head(nixtla_client_anomalies) #> unique_id ds y anomaly TimeGPT TimeGPT-lo-99 #> 1 BE 2016-10-27 00:00:00 52.58 FALSE 56.07623 -28.58337 #> 2 BE 2016-10-27 01:00:00 44.86 FALSE 52.41973 -32.23986 #> 3 BE 2016-10-27 02:00:00 42.31 FALSE 52.81474 -31.84486 #> 4 BE 2016-10-27 03:00:00 39.66 FALSE 52.59026 -32.06934 #> 5 BE 2016-10-27 04:00:00 38.98 FALSE 52.67297 -31.98662 #> 6 BE 2016-10-27 05:00:00 42.31 FALSE 54.10659 -30.55301 #> TimeGPT-hi-99 #> 1 140.7358 #> 2 137.0793 #> 3 137.4743 #> 4 137.2499 #> 5 137.3326 #> 6 138.7662 nixtlar::nixtla_client_plot(df, nixtla_client_anomalies, plot_anomalies = TRUE)"},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"features-and-capabilities","dir":"","previous_headings":"","what":"Features and Capabilities","title":"A Software Development Kit for Nixtla's TimeGPT","text":"nixtlar provides access TimeGPT’s features capabilities, : Zero-shot Inference: TimeGPT can generate forecasts detect anomalies straight box, requiring prior training data. allows immediate deployment quick insights time series data. Fine-tuning: Enhance TimeGPT’s capabilities fine-tuning model specific datasets, enabling model adapt nuances unique time series data improving performance tailored tasks. Add Exogenous Variables: Incorporate additional variables might influence predictions enhance forecast accuracy. (E.g. Special Dates, events prices) Multiple Series Forecasting: Simultaneously forecast multiple time series data, optimizing workflows resources. Custom Loss Function: Tailor fine-tuning process custom loss function meet specific performance metrics. Cross Validation: Implement box cross-validation techniques ensure model robustness generalizability. Prediction Intervals: Provide intervals predictions quantify uncertainty effectively. Irregular Timestamps: Handle data irregular timestamps, accommodating non-uniform interval series without preprocessing.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"A Software Development Kit for Nixtla's TimeGPT","text":"comprehensive documentation, please refer vignettes, cover wide range topics help effectively use nixtlar. current documentation includes guides : Get started set API key anomaly detection Perform time series cross-validation Use exogenous variables Generate historical forecasts documentation ongoing effort, working expanding coverage.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"api-support","dir":"","previous_headings":"","what":"API Support","title":"A Software Development Kit for Nixtla's TimeGPT","text":"Python user? yes, check Python SDK TimeGPT. can also refer API reference support programming languages.","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"how-to-cite","dir":"","previous_headings":"","what":"How to Cite","title":"A Software Development Kit for Nixtla's TimeGPT","text":"find TimeGPT useful research, please consider citing TimeGPT-1 paper. associated reference shown . Garza, ., Challu, C., & Mergenthaler-Canseco, M. (2024). TimeGPT-1. arXiv preprint arXiv:2310.03589. Available https://arxiv.org/abs/2310.03589","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"license","dir":"","previous_headings":"","what":"License","title":"A Software Development Kit for Nixtla's TimeGPT","text":"TimeGPT closed source. However, SDK open source available Apache 2.0 License, feel free contribute!","code":""},{"path":"https://nixtla.github.io/nixtlar/index.html","id":"get-in-touch","dir":"","previous_headings":"","what":"Get in Touch","title":"A Software Development Kit for Nixtla's TimeGPT","text":"welcome input contributions nixtlar package! Report Issues: encounter bug suggestion improve package, please open issue GitHub. Contribute: can contribute opening pull request repository. Whether fixing bug, adding new feature, improving documentation, appreciate help making nixtlar better.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"Generate output dates forecast method. private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"","code":".generate_output_dates(df_info, freq, h)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"df_info data frame created forecast method last dates every unique id. freq frequency data, period offset alias. h forecast horizon.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"data frame dates forecast.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-generate_output_dates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate output dates for forecast method. This is a private function of 'nixtlar' — .generate_output_dates","text":"","code":"if (FALSE) { # \\dontrun{ dates_df <- .generate_output_dates(df_info, freq, h) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":null,"dir":"Reference","previous_headings":"","what":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"Get NIXTLA_API_KEY options .Renviron private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"","code":".get_client_steup()"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"available, NIXTLA_API_KEY. Otherwise returns error message asking user set 'API' key.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_client_steup.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get NIXTLA_API_KEY from options or from .Renviron This is a private function of 'nixtlar' — .get_client_steup","text":"","code":"if (FALSE) { # \\dontrun{ .get_api_key() } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"Retrieve parameters 'TimeGPT' model private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"","code":".get_model_params(model, freq)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". freq Frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"list model's input size horizon","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-get_model_params.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve parameters for 'TimeGPT' model This is a private function of 'nixtlar' — .get_model_params","text":"","code":"if (FALSE) { # \\dontrun{ .get_model_params(model, freq) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"Obtain level quantiles private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"","code":".level_from_quantiles(quantiles)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"quantiles vector quantiles.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"list containing level vector data frame quantiles corresponding levels.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-level_from_quantiles.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Obtain level from quantiles This is a private function of 'nixtlar' — .level_from_quantiles","text":"","code":".level_from_quantiles(c(0.1, 0.5, 0.9)) #> $level #> [1] 80 #> #> $ql_df #> quantiles level name level_col quantiles_col #> 1 0.1 80 lo TimeGPT-lo-80 TimeGPT-q-10 #> 2 0.5 0 TimeGPT-q-50 #> 3 0.9 -80 hi TimeGPT-hi-80 TimeGPT-q-90 #>"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":null,"dir":"Reference","previous_headings":"","what":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"Make requests 'TimeGPT' API private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"","code":".make_request(base_url, api_key, payload_list)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"base_url String specifying API endpoint request sent. api_key user's API key. payload_list List containing information sent 'TimeGPT' API.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"List representing JSON response API endpoint.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-make_request.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Make requests to the 'TimeGPT' API This is a private function of 'nixtlar' — .make_request","text":"","code":"if (FALSE) { # \\dontrun{ response <- .make_request(base_url, api_key, payload_list) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"Convert period offset aliases character string recognized R. private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"","code":".r_frequency(freq)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"freq period offset alias used 'TimeGPT'.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"character string recognized R generating regular sequence times.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-r_frequency.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert period or offset aliases to a character string recognized by R. This is a private function of 'nixtlar' — .r_frequency","text":"","code":".r_frequency(\"MS\") # Returns \"month\" #> [1] \"month\" .r_frequency(\"10h\") # Returns \"10 h\" #> [1] \"10 h\" .r_frequency(\"h\") # Returns \"h\" (unchanged) #> [1] \"h\""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":null,"dir":"Reference","previous_headings":"","what":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"function used httr2::req_retry() determine response represents transient error private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"","code":".transient_errors(resp)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"resp response HTTP request","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"TRUE response status 500 502, FALSE otherwise.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-transient_errors.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A function used by httr2::req_retry() to determine if the response represents a transient error This is a private function of 'nixtlar' — .transient_errors","text":"","code":"if (FALSE) { # \\dontrun{ .transient_errors(resp) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"Validate future exogenous variables (applicable) private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"","code":".validate_exogenous(df, h, X_df)"},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"df tsibble data frame time series data. h Forecast horizon. X_df tsibble data frame future exogenous variables.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"Returns vector exogenous variable names validation successful. validation fails, stops execution returns error message, indicating went wrong.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/dot-validate_exogenous.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate future exogenous variables (if applicable) This is a private function of 'nixtlar' — .validate_exogenous","text":"","code":"if (FALSE) { # \\dontrun{ df <- nixtlar::electricity_exo_vars X_df <- nixtlar::electricity_future_exo_vars .validate_exogenous(df, h=24, X_df) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":null,"dir":"Reference","previous_headings":"","what":"Electricity dataset — electricity","title":"Electricity dataset — electricity","text":"Contains prices different electricity markets.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Electricity dataset — electricity","text":"","code":"electricity"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":"electricity","dir":"Reference","previous_headings":"","what":"electricity","title":"Electricity dataset — electricity","text":"data frame 8400 rows 3 columns: unique_id Unique identifiers electricity markets. ds Date format YYYY:MM:DD hh:mm:ss. y Price given market date.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Electricity dataset — electricity","text":"https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Electricity dataset with exogenous variables — electricity_exo_vars","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"Contains prices different electricity markets exogenous variables.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"","code":"electricity_exo_vars"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":"electricity-exo-vars","dir":"Reference","previous_headings":"","what":"electricity_exo_vars","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"data frame 8400 rows 12 columns: unique_id Unique identifiers electricity markets. ds Date format YYYY:MM:DD hh:mm:ss. y Price given market date. Exogenous1 external factor influencing prices. markets, form day-ahead load forecast. Exogenous2 external factor influencing prices. \"\" \"FR\" markets, day-ahead generation forecast. \"NP\", day-ahead wind generation forecast. \"PJM\", day-ahead load forecast specific zone. \"DE\", aggregated day-ahead wind solar generation forecasts. day_0 Binary variable indicating weekday. day_1 Binary variable indicating weekday. day_2 Binary variable indicating weekday. day_3 Binary variable indicating weekday. day_4 Binary variable indicating weekday. day_5 Binary variable indicating weekday. day_6 Binary variable indicating weekday.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_exo_vars.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Electricity dataset with exogenous variables — electricity_exo_vars","text":"https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"Contains future values exogenous variables electricity dataset (24 steps-ahead). used electricity_exo_vars.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"","code":"electricity_future_exo_vars"},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":"electricity-future-exo-vars","dir":"Reference","previous_headings":"","what":"electricity_future_exo_vars","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"data frame 120 rows 11 columns: unique_id Unique identifiers electricity markets. ds Date format YYYY:MM:DD hh:mm:ss. Exogenous1 external factor influencing prices. markets, form day-ahead load forecast. Exogenous2 external factor influencing prices. \"\" \"FR\" markets, day-ahead generation forecast. \"NP\", day-ahead wind generation forecast. \"PJM\", day-ahead load forecast specific zone. \"DE\", aggregated day-ahead wind solar generation forecasts. day_0 Binary variable indicating weekday. day_1 Binary variable indicating weekday. day_2 Binary variable indicating weekday. day_3 Binary variable indicating weekday. day_4 Binary variable indicating weekday. day_5 Binary variable indicating weekday. day_6 Binary variable indicating weekday.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/electricity_future_exo_vars.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Future values for the electricity dataset with exogenous variables — electricity_future_exo_vars","text":"https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short-future-ex-vars.csv","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":null,"dir":"Reference","previous_headings":"","what":"Infer frequency of a data frame. — infer_frequency","title":"Infer frequency of a data frame. — infer_frequency","text":"Infer frequency data frame.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Infer frequency of a data frame. — infer_frequency","text":"","code":"infer_frequency(df, freq)"},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Infer frequency of a data frame. — infer_frequency","text":"df data frame time series data. freq frequency data specified user; NULL otherwise.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Infer frequency of a data frame. — infer_frequency","text":"inferred frequency.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/infer_frequency.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Infer frequency of a data frame. — infer_frequency","text":"","code":"df <- nixtlar::electricity freq <- NULL infer_frequency(df, freq) #> Frequency chosen: h #> [1] \"h\""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtlaR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"nixtlar: A Software Development Kit for 'Nixtla”s 'TimeGPT' — nixtlar-package","title":"nixtlar: A Software Development Kit for 'Nixtla”s 'TimeGPT' — nixtlar-package","text":"Software Development Kit working 'Nixtla”s 'TimeGPT', foundation model time series forecasting. 'API' acronym 'application programming interface'; package allows users interact 'TimeGPT' via 'API'. can set validate 'API' keys generate forecasts via 'API' calls. compatible 'tsibble' base R. details visit https://docs.nixtla.io/.","code":""},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/reference/nixtlaR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"nixtlar: A Software Development Kit for 'Nixtla”s 'TimeGPT' — nixtlar-package","text":"Maintainer: Mariana Menchero mariana@nixtla.io (First author maintainer) contributors: Nixtla (Copyright held 'Nixtla') [copyright holder]","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"Sequential version 'nixtla_client_cross_validation' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"","code":"nixtla_client_cross_validation( df, h = 8, freq = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", level = NULL, quantiles = NULL, n_windows = 1, step_size = NULL, finetune_steps = 0, finetune_loss = \"default\", clean_ex_first = TRUE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"df data frame time series data. h Forecast horizon. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. level confidence levels (0-100) prediction intervals. quantiles Quantiles forecast. 0 1. n_windows Number windows evaluate. step_size Step size cross validation window. NULL, equal forecast horizon (h). finetune_steps Number steps used finetune 'TimeGPT' new data. finetune_loss Loss function use finetuning. Options : \"default\", \"mae\", \"mse\", \"rmse\", \"mape\", \"smape\". clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"data frame 'TimeGPT”s cross validation result.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_cross_validation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_cross_validation' This is a private function of 'nixtlar' — nixtla_client_cross_validation","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_cross_validation(df, h = 8, id_col = \"unique_id\", n_windows = 5) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"Sequential version 'nixtla_client_detect_anomalies' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"","code":"nixtla_client_detect_anomalies( df, freq = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", level = c(99), clean_ex_first = TRUE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"df data frame time series data. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. level confidence level (0-100) prediction interval used anomaly detection. Default 99. clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"data frame anomalies detected historical period.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_detect_anomalies.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_detect_anomalies' This is a private function of 'nixtlar' — nixtla_client_detect_anomalies","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_anomaly_detection(df, id_col=\"unique_id\") } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"Sequential version 'nixtla_client_forecast' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"","code":"nixtla_client_forecast( df, h = 8, freq = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", X_df = NULL, level = NULL, quantiles = NULL, finetune_steps = 0, finetune_loss = \"default\", clean_ex_first = TRUE, add_history = FALSE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"df data frame time series data. h Forecast horizon. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. X_df tsibble data frame future exogenous variables. level confidence levels (0-100) prediction intervals. quantiles Quantiles forecast. 0 1. finetune_steps Number steps used finetune 'TimeGPT' new data. finetune_loss Loss function use finetuning. Options : \"default\", \"mae\", \"mse\", \"rmse\", \"mape\", \"smape\". clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. add_history Return fitted values model. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"'TimeGPT”s forecast.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_forecast.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_forecast' This is a private function of 'nixtlar' — nixtla_client_forecast","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_forecast(df, h=8, id_col=\"unique_id\", level=c(80,95)) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"Sequential version 'nixtla_client_historic' private function 'nixtlar'","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"","code":"nixtla_client_historic( df, freq = NULL, id_col = NULL, time_col = \"ds\", target_col = \"y\", level = NULL, quantiles = NULL, finetune_steps = 0, finetune_loss = \"default\", clean_ex_first = TRUE, model = \"timegpt-1\" )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"df tsibble data frame time series data. freq Frequency data. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. level confidence levels (0-100) prediction intervals. quantiles Quantiles forecast. 0 1. finetune_steps Number steps used finetune 'TimeGPT' new data. finetune_loss Loss function use finetuning. Options : \"default\", \"mae\", \"mse\", \"rmse\", \"mape\", \"smape\". clean_ex_first Clean exogenous signal making forecasts using 'TimeGPT'. model Model use, either \"timegpt-1\" \"timegpt-1-long-horizon\". Use \"timegpt-1-long-horizon\" want forecast one seasonal period given frequency data.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"'TimeGPT”s forecast -sample period.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_historic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential version of 'nixtla_client_historic' This is a private function of 'nixtlar' — nixtla_client_historic","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_historic(df, id_col=\"unique_id\", level=c(80,95)) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"Plot output following nixtla_client functions: forecast, historic, anomaly_detection, cross_validation.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"","code":"nixtla_client_plot( df, fcst = NULL, h = NULL, id_col = \"unique_id\", time_col = \"ds\", target_col = \"y\", unique_ids = NULL, max_insample_length = NULL, plot_anomalies = FALSE )"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"df tsibble data frame time series data (insample values). fcst tsibble data frame 'TimeGPT' point forecast prediction intervals (available). h Forecast horizon. id_col Column identifies series. time_col Column identifies timestep. target_col Column contains target variable. unique_ids Time series plot. NULL (default), selection random. max_insample_length Max number insample observations plotted. plot_anomalies Whether plot anomalies.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"Plot historical data 'TimeGPT”s output (available).","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the output of the following nixtla_client functions: forecast, historic, anomaly_detection, and cross_validation. — nixtla_client_plot","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"YOUR_API_KEY\") df <- nixtlar::electricity fcst <- nixtlar::nixtla_client_forecast(df, h=8, id_col=\"unique_id\", level=c(80,95)) nixtlar::timegpt_plot(df, fcst, h=8, id_col=\"unique_id\") } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":null,"dir":"Reference","previous_headings":"","what":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"Set base 'ULR' 'API' key global environment","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"","code":"nixtla_client_setup(base_url = NULL, api_key = NULL)"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"base_url Custom base 'URL'. NULL, defaults \"https://api.nixtla.io/\". api_key user's 'API' key. Get : https://dashboard.nixtla.io/","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"message indicating configuration status.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_client_setup.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set base 'ULR' and 'API' key in global environment — nixtla_client_setup","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_client_setup( base_url = \"Base URL\", api_key = \"Your API key\" ) } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Set 'API' key in global environment — nixtla_set_api_key","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"function deprecated future versions. Please use nixtla_client_setup instead.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"","code":"nixtla_set_api_key(api_key)"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"api_key user's 'API' key. Get : https://dashboard.nixtla.io/","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"message indicating 'API' key set global environment.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_set_api_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set 'API' key in global environment — nixtla_set_api_key","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_set_api_key(\"Your API key\") } # }"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate 'API' key — nixtla_validate_api_key","title":"Validate 'API' key — nixtla_validate_api_key","text":"Validate 'API' key","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate 'API' key — nixtla_validate_api_key","text":"","code":"nixtla_validate_api_key()"},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate 'API' key — nixtla_validate_api_key","text":"TRUE API key valid, FALSE otherwise.","code":""},{"path":"https://nixtla.github.io/nixtlar/reference/nixtla_validate_api_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate 'API' key — nixtla_validate_api_key","text":"","code":"if (FALSE) { # \\dontrun{ nixtlar::nixtla_client_setup(api_key = \"Your API key\") nixtlar::nixtla_validate_api_key() } # }"},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-062","dir":"Changelog","previous_headings":"","what":"nixtlar 0.6.2","title":"nixtlar 0.6.2","text":"Current version nixtlar. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-061-2024-10-07","dir":"Changelog","previous_headings":"","what":"nixtlar 0.6.1 (2024-10-07)","title":"nixtlar 0.6.1 (2024-10-07)","text":"CRAN release: 2024-10-10 excited announce release nixtlar version 0.6.0, integrates latest release TimeGPT API—v2. update focuses matters users: speed, scalability, reliability. Key updates include: Data Structures: nixtlar now extends support tibbles, addition previously supported data frames tsibbles. broadens range data structures can used workflows. Date Formats: efficiency, nixtlar now strictly requires dates format YYYY-MM-DD YYYY-MM-DD hh:mm:ss, either character strings date-time objects. details, please refer Get Started guide Data Requirements vignette. Default ID Column: alignment Python SDK, nixtlar now defaults id_col unique_id. means longer need specify column already named unique_id. dataset contains one series, simply set id_col=NULL. id_col accepts characters integers. changes leverage capabilities TimeGPT’s new API align nixtlar closely Python SDK, ensuring better user experience. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-060","dir":"Changelog","previous_headings":"","what":"nixtlar 0.6.0","title":"nixtlar 0.6.0","text":"New version uses TimeGPT API—v2. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-054","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.4","title":"nixtlar 0.5.4","text":"Development version. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-053","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.3","title":"nixtlar 0.5.3","text":"Development version. See release notes ","code":""},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-052","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.2","title":"nixtlar 0.5.2","text":"CRAN release: 2024-06-01","code":""},{"path":[]},{"path":"https://nixtla.github.io/nixtlar/news/index.html","id":"nixtlar-050","dir":"Changelog","previous_headings":"","what":"nixtlar 0.5.0","title":"nixtlar 0.5.0","text":"Initial CRAN submission.","code":""}]