Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in docs #92

Closed
wants to merge 3 commits into from
Closed
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
102 changes: 51 additions & 51 deletions docs/user-guide/task.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"**Target sets**\n",
"\n",
"A *target set* is a set of observations that we wish to predict using the context sets.\n",
"Similarly to contet sets, we denote the collection of all target sets as $T = \\{ (\\mathbf{X}^{(t)}, \\mathbf{Y}^{(t)})_i \\}_{i=1}^{N_T}$.\n",
"Similarly to context sets, we denote the collection of all target sets as $T = \\{ (\\mathbf{X}^{(t)}, \\mathbf{Y}^{(t)})_i \\}_{i=1}^{N_T}$.\n",
"During training, the target observations are known, but at inference time will be unknown latent variables.\n",
"\n",
"**Tasks**\n",
Expand All @@ -69,6 +69,12 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"start_time": "2023-11-01T14:28:15.732009455Z"
},
"collapsed": false
},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -106,25 +112,19 @@
"era5_ds = data_processor(era5_raw_ds)\n",
"aux_ds, land_mask_ds = data_processor([auxiliary_raw_ds, land_mask_raw_ds], method=\"min_max\")\n",
"station_df = data_processor(station_raw_df)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"start_time": "2023-11-01T14:28:15.732009455Z"
}
}
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": [
"remove-cell"
],
"ExecuteTime": {
"end_time": "2023-11-01T14:32:15.553656830Z",
"start_time": "2023-11-01T14:32:15.548454739Z"
}
},
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -175,6 +175,9 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"**Exercise:**\n",
"\n",
Expand All @@ -185,10 +188,7 @@
"- The number of target sets\n",
"- The number of observations in each target set\n",
"- The dimensionality of each target set\n"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "markdown",
Expand All @@ -203,33 +203,40 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"### Gridded data in Tasks\n",
"\n",
"For convenience, data that lies on a regular grid is given a compact tuple representation for the `\"X\"` entries:"
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
"execution_count": 4,
"outputs": [],
"source": [
"task_with_gridded_data = task_loader(\"2016-06-25\", context_sampling=[\"all\", \"all\"], target_sampling=245)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-11-01T14:32:15.620494504Z",
"start_time": "2023-11-01T14:32:15.570462444Z"
}
}
},
"collapsed": false
},
"outputs": [],
"source": [
"task_with_gridded_data = task_loader(\"2016-06-25\", context_sampling=[\"all\", \"all\"], target_sampling=245)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-01T14:32:15.628949091Z",
"start_time": "2023-11-01T14:32:15.611675646Z"
},
"collapsed": false
},
"outputs": [
{
"name": "stdout",
Expand All @@ -246,23 +253,16 @@
],
"source": [
"print(task_with_gridded_data)"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-11-01T14:32:15.628949091Z",
"start_time": "2023-11-01T14:32:15.611675646Z"
}
}
]
},
{
"cell_type": "markdown",
"source": [
"In the above example, the first context set lies on a 141 x 221 grid, and the second context set lies on a 140 x 220 grid."
],
"metadata": {
"collapsed": false
}
},
"source": [
"In the above example, the first context set lies on a 141 x 221 grid, and the second context set lies on a 140 x 220 grid."
]
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -303,17 +303,24 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"Gridded data in a `Task` can be flattened using the `.flatten_gridded_data` method.\n",
"Notice how the `\"X\"` entries are now 2D arrays of shape `(2, M)` rather than tuples of two 1D arrays of shape `(M,)`."
],
"metadata": {
"collapsed": false
}
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2023-11-01T14:32:15.970618528Z",
"start_time": "2023-11-01T14:32:15.909066194Z"
},
"collapsed": false
},
"outputs": [
{
"name": "stdout",
Expand All @@ -330,14 +337,7 @@
],
"source": [
"print(task_with_gridded_data.flatten_gridded_data())"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2023-11-01T14:32:15.970618528Z",
"start_time": "2023-11-01T14:32:15.909066194Z"
}
}
]
}
],
"metadata": {
Expand Down