Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions nbs/docs/capabilities/cross_validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"source": [
"## 2. Read the data\n",
"\n",
"For this tutorial, we use part of the hourly M4 dataset. It is stored in a parquet file for efficiency. You can use ordinary pandas operations to read your data in other formats likes `.csv`. \n",
"For this tutorial, we use part of the hourly M4 dataset. It is stored in a parquet file for efficiency. However, you can use ordinary pandas operations to read your data in other formats likes `.csv`. \n",
"\n",
"The input to `NeuralForecast` is always a data frame in [long format](https://www.theanalysisfactor.com/wide-and-long-data/) with three columns: `unique_id`, `ds` and `y`:\n",
"\n",
Expand Down Expand Up @@ -180,7 +180,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For simplicity, we use only a single series to explore in detail the cross-validation functionality. Also, let's use the first 700 time steps, such that we work with round numbers, making it easier to visualize and understand cross-validation."
"For simplicity, we focus on a single time series to explore the cross-validation functionality in detail. We also use only the first 700 time steps, which allows us to work with round numbers and makes the cross-validation process easier to visualize and understand."
]
},
{
Expand Down Expand Up @@ -449,7 +449,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the figure above, we see that we have 4 cutoff points, which correspond to our four cross-validation windows. Of course, notice that the windows are set from the end of the dataset. That way, the model trains on past data to predict future data. \n",
"In the figure above, we observe four cutoff points, each corresponding to a cross-validation window. Note that these windows are defined from the end of the dataset, ensuring that the model is trained on past data to predict future data.\n",
"\n",
":::{.callout-warning collapse=\"true\"}\n",
"## Important note\n",
Expand Down Expand Up @@ -655,11 +655,17 @@
"metadata": {},
"source": [
"In the figure above, we see that our two folds overlap between time steps 601 and 650, since the step size is 50. This happens because:\n",
"\n",
"- fold 1: model is trained using time steps 0 to 550 and predicts 551 to 650 (h=100)\n",
"- fold 2: model is trained using time steps 0 to 600 (`step_size=50`) and predicts 601 to 700\n",
"\n",
"Be aware that when evaluating a model trained with overlapping cross-validation windows, some time steps have more than one prediction. This may bias your evaluation metric, as the repeated time steps are taken into account in the metric multiple times."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/capabilities/exogenous_variables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"All NeuralForecast models are capable of incorporating exogenous variables to model the following conditional predictive distribution:\n",
"$$\\mathbb{P}(\\mathbf{y}_{t+1:t+H} \\;|\\; \\mathbf{y}_{[:t]},\\; \\mathbf{x}^{(h)}_{[:t]},\\; \\mathbf{x}^{(f)}_{[:t+H]},\\; \\mathbf{x}^{(s)} )$$\n",
"\n",
"where the regressors are static exogenous $\\mathbf{x}^{(s)}$, historic exogenous $\\mathbf{x}^{(h)}_{[:t]}$, exogenous available at the time of the prediction $\\mathbf{x}^{(f)}_{[:t+H]}$ and autorregresive features $\\mathbf{y}_{[:t]}$. Depending on the [train loss](../../losses.pytorch), the model outputs can be point forecasts (location estimators) or uncertainty intervals (quantiles)."
"where the regressors are static exogenous $\\mathbf{x}^{(s)}$, historic exogenous $\\mathbf{x}^{(h)}_{[:t]}$, exogenous available at the time of the prediction $\\mathbf{x}^{(f)}_{[:t+H]}$ and autoregressive features $\\mathbf{y}_{[:t]}$. Depending on the [train loss](../../losses.pytorch), the model outputs can be point forecasts (location estimators) or uncertainty intervals (quantiles)."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions nbs/docs/getting-started/datarequirements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"# Data Requirements\n",
"> Dataset input requirments"
"> Dataset input requirements"
]
},
{
Expand Down Expand Up @@ -352,7 +352,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this example `Y_df` only contains two columns: `timestamp`, and `value`. To use `NeuralForecast` we have to include the `unique_id` column and rename the previuos ones."
"In this example `Y_df` only contains two columns: `timestamp`, and `value`. To use `NeuralForecast` we have to include the `unique_id` column and rename the previous ones."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/getting-started/installation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"* distributed training with spark: `pip install neuralforecast[spark]`\n",
"* saving and loading from S3: `pip install neuralforecast[aws]`\n",
"\n",
"#### User our env (optional)\n",
"#### Use our env (optional)\n",
"\n",
"If you don't have a Conda environment and need tools like Numba, Pandas, NumPy, Jupyter, Tune, and Nbdev you can use ours by following these steps:\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/getting-started/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we plot the forecasts of both models againts the real values."
"Finally, we plot the forecasts of both models against the real values."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/tutorials/adding_models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"\n",
"We highly recommend reading first the Getting Started and the NeuralForecast Map tutorials!\n",
"\n",
"Additionally, refer to the [CONTRIBUTING guide](https://github.com/Nixtla/neuralforecast/blob/main/CONTRIBUTING.md) for the basics how to contribute to NeuralForecast.\n",
"Additionally, refer to the [CONTRIBUTING guide](https://github.com/Nixtla/neuralforecast/blob/main/CONTRIBUTING.md) for the basics of how to contribute to NeuralForecast.\n",
"\n",
":::"
]
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/tutorials/longhorizon_nhits.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"\n",
"It return three Dataframes: `Y_df` contains the values for the target variables, `X_df` contains exogenous calendar features and `S_df` contains static features for each time-series (none for ETTm2). For this example we will only use `Y_df`.\n",
"\n",
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a simmilar structure than our data set."
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a similar structure to our data set."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/tutorials/longhorizon_probabilistic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"\n",
"It return three Dataframes: `Y_df` contains the values for the target variables, `X_df` contains exogenous calendar features and `S_df` contains static features for each time-series (none for ETTm2). For this example we will only use `Y_df`.\n",
"\n",
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a simmilar structure than our data set."
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a similar structure to our data set."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/tutorials/longhorizon_transformers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"\n",
"It return three Dataframes: `Y_df` contains the values for the target variables, `X_df` contains exogenous calendar features and `S_df` contains static features for each time-series (none for ETTm2). For this example we will only use `Y_df`.\n",
"\n",
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a simmilar structure than our data set."
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a similar structure to our data set."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion nbs/docs/tutorials/robust_forecasting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we plot the forecasts of both models againts the real values.\n",
"Finally, we plot the forecasts of both models against the real values.\n",
"\n",
"And evaluate the accuracy of the `NHITS-Huber` and `NHITS-Normal` forecasters."
]
Expand Down
4 changes: 2 additions & 2 deletions nbs/docs/tutorials/temporal_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"source": [
"A logistic regression analyzes the relationship between a binary target variable and its predictor variables to estimate the probability of the dependent variable taking the value 1. In the presence of temporal data where observations along time aren't independent, the errors of the model will be correlated through time and incorporating autoregressive features or lags can capture temporal dependencies and enhance the predictive power of logistic regression.\n",
"\n",
"<br>NHITS's inputs are static exogenous $\\mathbf{x}^{(s)}$, historic exogenous $\\mathbf{x}^{(h)}_{[:t]}$, exogenous available at the time of the prediction $\\mathbf{x}^{(f)}_{[:t+H]}$ and autorregresive features $\\mathbf{y}_{[:t]}$, each of these inputs is further decomposed into categorical and continuous. The network uses a multi-quantile regression to model the following conditional probability:$$\\mathbb{P}(\\mathbf{y}_{[t+1:t+H]}|\\;\\mathbf{y}_{[:t]},\\; \\mathbf{x}^{(h)}_{[:t]},\\; \\mathbf{x}^{(f)}_{[:t+H]},\\; \\mathbf{x}^{(s)})$$\n",
"<br>NHITS's inputs are static exogenous $\\mathbf{x}^{(s)}$, historic exogenous $\\mathbf{x}^{(h)}_{[:t]}$, exogenous available at the time of the prediction $\\mathbf{x}^{(f)}_{[:t+H]}$ and autoregressive features $\\mathbf{y}_{[:t]}$, each of these inputs is further decomposed into categorical and continuous. The network uses a multi-quantile regression to model the following conditional probability:$$\\mathbb{P}(\\mathbf{y}_{[t+1:t+H]}|\\;\\mathbf{y}_{[:t]},\\; \\mathbf{x}^{(h)}_{[:t]},\\; \\mathbf{x}^{(f)}_{[:t+H]},\\; \\mathbf{x}^{(s)})$$\n",
"\n",
"In this notebook we show how to fit NeuralForecast methods for binary sequences regression. We will:\n",
"- Installing NeuralForecast.\n",
Expand Down Expand Up @@ -975,7 +975,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we plot the forecasts of both models againts the real values.\n",
"Finally, we plot the forecasts of both models against the real values.\n",
"And evaluate the accuracy of the `MLP` and `NHITS` temporal classifiers."
]
},
Expand Down
6 changes: 3 additions & 3 deletions nbs/docs/tutorials/transfer_learning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"source": [
"Transfer learning refers to the process of pre-training a flexible model on a large dataset and using it later on other data with little to no training. It is one of the most outstanding 🚀 achievements in Machine Learning 🧠 and has many practical applications.\n",
"\n",
"For time series forecasting, the technique allows you to get lightning-fast predictions ⚡ bypassing the tradeoff between accuracy and speed (more than 30 times faster than our alreadsy fast [autoARIMA](https://github.com/Nixtla/statsforecast) for a similar accuracy).\n",
"For time series forecasting, the technique allows you to get lightning-fast predictions ⚡ bypassing the tradeoff between accuracy and speed (more than 30 times faster than our already fast [autoARIMA](https://github.com/Nixtla/statsforecast) for a similar accuracy).\n",
"\n",
"This notebook shows how to generate a pre-trained model and store it in a checkpoint to make it available to forecast new time series never seen by the model. \n",
"\n",
Expand Down Expand Up @@ -84,7 +84,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This example will automatically run on GPUs if available. **Make sure** cuda is available. (If you need help to put this into production send us an email or join or community, we also offer a fully hosted solution)"
"This example will automatically run on GPUs if available. **Make sure** cuda is available. (If you need help to put this into production send us an email or join our community, we also offer a fully hosted solution)"
]
},
{
Expand Down Expand Up @@ -117,7 +117,7 @@
"\n",
"It return three Dataframes: `Y_df` contains the values for the target variables, `X_df` contains exogenous calendar features and `S_df` contains static features for each time-series (none for M4). For this example we will only use `Y_df`.\n",
"\n",
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a simmilar structure than our data set."
"If you want to use your own data just replace `Y_df`. Be sure to use a long format and have a similar structure to our data set."
]
},
{
Expand Down
Loading