|
36 | 36 | "id": "19f9ec64", |
37 | 37 | "metadata": {}, |
38 | 38 | "source": [ |
39 | | - "We can quickly download and get the path of any dataset from fastai by using `datasetpath`. Once we have the path, we'll load the data in a `TableContainer`. By default, if we pass in just the path to `TableContainer`, the data is loaded in a `DataFrame`, but we can use any package for accessing our data, and pass an object satisfying the Tables.jl interface to it." |
| 39 | + "We can quickly download and get the path of any dataset from fastai by using [`datasetpath`](#). Once we have the path, we'll load the data in a [`TableDataset`](#). By default, if we pass in just the path to [`TableDataset`](#), the data is loaded in a `DataFrame`, but we can use any package for accessing our data, and pass an object satisfying the [Tables.jl](https://github.com/JuliaData/Tables.jl) interface to it." |
40 | 40 | ] |
41 | 41 | }, |
42 | 42 | { |
|
91 | 91 | "id": "bd63b82d", |
92 | 92 | "metadata": {}, |
93 | 93 | "source": [ |
94 | | - "In case our data was present in a different format for eg. parquet, it could be loaded in a TableContainer as shown below." |
| 94 | + "In case our data was present in a different format for eg. parquet, it could be loaded into a data container as follows:" |
95 | 95 | ] |
96 | 96 | }, |
97 | 97 | { |
|
110 | 110 | "id": "a77c191c", |
111 | 111 | "metadata": {}, |
112 | 112 | "source": [ |
113 | | - "`mapobs` is used here to split our target column from the rest of the row in a lazy manner." |
| 113 | + "[`mapobs`](#) is used here to split our target column from the rest of the row in a lazy manner, so that each observation consists of a row of inputs and a target variable." |
114 | 114 | ] |
115 | 115 | }, |
116 | 116 | { |
|
130 | 130 | "source": [ |
131 | 131 | "To create a learning method for tabular classification task, we need an input block, an output block, and the encodings to be performed on the data.\n", |
132 | 132 | "\n", |
133 | | - "The input block here is a `TableRow` which contains information about the nature of the columns (ie. categorical or continuous) along with an indexable collection mapping categorical column names to a collection with distinct classes in that column. We can get this mapping by using the `gettransformationdict` method with `DataAugmentation.Categorify`.\n", |
| 133 | + "The input block here is a [`TableRow`](#) which contains information about the nature of the columns (ie. categorical or continuous) along with an indexable collection mapping categorical column names to a collection with distinct classes in that column. We can get this mapping by using the `gettransformationdict` method with [`DataAugmentation.Categorify`](#).\n", |
134 | 134 | "\n", |
135 | | - "The outblock block used is `Label` for single column classification and the unique classes have to passed to it.\n", |
| 135 | + "The outblock block used is [`Label`](#) for single column classification and the unique classes have to passed to it.\n", |
136 | 136 | "\n", |
137 | | - "This is followed by the encodings which needs to be applied on our input and output blocks. For the input block, we have used the `gettransforms` function here to get a standard bunch of transformations to apply, but this can be easily customized by passing in any tabular transformation from DataAugmentation.jl or a composition of those, to `TabularPreprocessings`. In addition to this, we have just one-hot encoded the outblock." |
| 137 | + "This is followed by the encodings which needs to be applied on our input and output blocks. For the input block, we have used the `gettransforms` function here to get a standard bunch of transformations to apply, but this can be easily customized by passing in any tabular transformation from DataAugmentation.jl or a composition of those, to [`TabularPreprocessing`](#). In addition to this, we have just one-hot encoded the outblock." |
138 | 138 | ] |
139 | 139 | }, |
140 | 140 | { |
|
193 | 193 | "id": "ad69519e", |
194 | 194 | "metadata": {}, |
195 | 195 | "source": [ |
196 | | - "In case our initial problem wasn't a classification task, and we had a continuous target column, we would need to perform tabular regression. To create a learning method suitable for regression, we use a `Continuous` block for representing our target column. This can be done even with multiple continuous target columns by just passing the number of columns in `Continuous`. For example, the method here could be used for 3 targets." |
| 196 | + "In case our initial problem wasn't a classification task, and we had a continuous target column, we would need to perform tabular regression. To create a learning method suitable for regression, we use a [`Continuous`](#) block for representing our target column. This can be done even with multiple continuous target columns by just passing the number of columns in `Continuous`. For example, the method here could be used for 3 targets." |
197 | 197 | ] |
198 | 198 | }, |
199 | 199 | { |
|
218 | 218 | "id": "5a1d9474", |
219 | 219 | "metadata": {}, |
220 | 220 | "source": [ |
221 | | - "To get an overview of the learning method created, and as a sanity test, we can use the `describemethod` function. This shows us what encodings will be applied to which blocks, and how the predicted ŷ values are decoded." |
| 221 | + "To get an overview of the learning method created, and as a sanity test, we can use [`describemethod`](#). This shows us what encodings will be applied to which blocks, and how the predicted ŷ values are decoded." |
222 | 222 | ] |
223 | 223 | }, |
224 | 224 | { |
|
321 | 321 | "id": "bb9da109", |
322 | 322 | "metadata": {}, |
323 | 323 | "source": [ |
324 | | - "`getobs` gets us a row of data from the `TableContainer`, which we encode here. This gives us a tuple with the input and target. The input here is again a tuple, containing the categorical values (which have been label encoded or \"categorified\") and the continuous values (which have been normalized and any missing values have been filled). " |
| 324 | + "`getobs` gets us a row of data from the `TableDataset`, which we encode here. This gives us a tuple with the input and target. The input here is again a tuple, containing the categorical values (which have been label encoded or \"categorified\") and the continuous values (which have been normalized and any missing values have been filled). " |
325 | 325 | ] |
326 | 326 | }, |
327 | 327 | { |
|
376 | 376 | "id": "b7105af7", |
377 | 377 | "metadata": {}, |
378 | 378 | "source": [ |
379 | | - "To quickly get a model suitable for our learning method, we can use the `methodmodel` function." |
| 379 | + "To get a model suitable for our learning method, we can use [`methodmodel`](#) which constructs a suitable model based on the target block. " |
380 | 380 | ] |
381 | 381 | }, |
382 | 382 | { |
|
436 | 436 | "id": "0fb73fd4", |
437 | 437 | "metadata": {}, |
438 | 438 | "source": [ |
439 | | - "It is really simple to create a custom backbone using the functions present in `FastAI.Models`." |
| 439 | + "Of course you can also create a custom backbone using the functions present in `FastAI.Models`." |
440 | 440 | ] |
441 | 441 | }, |
442 | 442 | { |
|
521 | 521 | "id": "22eb6dc7", |
522 | 522 | "metadata": {}, |
523 | 523 | "source": [ |
524 | | - "To directly get a `Learner` suitable for our method and data, we can use the `methodlearner` function. " |
| 524 | + "To directly get a [`Learner`](#) suitable for our method and data, we can use the [`methodlearner`](#) function. This creates both batched data loaders and a model for us." |
525 | 525 | ] |
526 | 526 | }, |
527 | 527 | { |
|
552 | 552 | "id": "d5b4b0be", |
553 | 553 | "metadata": {}, |
554 | 554 | "source": [ |
555 | | - "Once we have our learner, we can just call [`fitonecycle!`](#) on it to train it for the desired number of epochs." |
| 555 | + "Once we have a `Learner`, we can call [`fitonecycle!`](#) on it to train it for the desired number of epochs:" |
556 | 556 | ] |
557 | 557 | }, |
558 | 558 | { |
|
0 commit comments