-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Stubs for
safe-ds
version 0.22.1 (#1130)
### Summary of Changes *⚠️ `Table.tagColumns` is now called `Table.toTabularDataset` and expects names of extra columns instead of feature columns * **Migration Step 1:** Rename your call. * **Migration Step 2:** Rename the parameter `featureNames` to `extraNames`. * **Migration Step 3:** Specify everything that should be neither target nor feature as `extraNames`. *⚠️ `TaggedTable` is now called `TabularDataset` and has a greatly reduced interface: * **Migration:** Finish processing your `Table` before you create a `TabularDataset`. *⚠️ `isFitted` is now always an attribute instead of a function: * **Migration:** You must no longer call it. * New method `Row.sortColumns` * New parameter `numberOfBins` on `Table.plotHistograms` * New method `Column.missingValueCount` * Several additions to the `safeds.ml.nn` package (neural networks)
- Loading branch information
1 parent
0bb47f0
commit 6f7100d
Showing
77 changed files
with
1,612 additions
and
4,031 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
docs/api/safeds/data/labeled/containers/TabularDataset.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# `#!sds class` TabularDataset {#safeds.data.labeled.containers.TabularDataset data-toc-label='TabularDataset'} | ||
|
||
A tabular dataset maps feature columns to a target column. | ||
|
||
Create a tabular dataset from a mapping of column names to their values. | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | Default | | ||
|------|------|-------------|---------| | ||
| `data` | `#!sds union<Map<String, List<Any>>, Table>` | The data. | - | | ||
| `targetName` | [`String`][safeds.lang.String] | Name of the target column. | - | | ||
| `extraNames` | [`List<String>`][safeds.lang.List] | Names of the columns that are neither features nor target. If None, no extra columns are used, i.e. all but the target column are used as features. | `#!sds []` | | ||
|
||
**Examples:** | ||
|
||
```sds hl_lines="2" | ||
pipeline example { | ||
val dataset = TabularDataset( | ||
{"id": [1, 2, 3], "feature": [4, 5, 6], "target": [1, 2, 3]}, | ||
targetName="target", | ||
extraNames=["id"] | ||
); | ||
} | ||
``` | ||
|
||
??? quote "Stub code in `tabular_dataset.sdsstub`" | ||
|
||
```sds linenums="27" | ||
class TabularDataset( | ||
data: union<Map<String, List<Any>>, Table>, | ||
@PythonName("target_name") targetName: String, | ||
@PythonName("extra_names") extraNames: List<String> = [] | ||
) { | ||
/** | ||
* The feature columns of the tabular dataset. | ||
*/ | ||
attr features: Table | ||
/** | ||
* The target column of the tabular dataset. | ||
*/ | ||
attr target: Column | ||
/** | ||
* Additional columns of the tabular dataset that are neither features nor target. | ||
* | ||
* These can be used to store additional information about instances, such as IDs. | ||
*/ | ||
attr extras: Table | ||
|
||
/** | ||
* Return a new `Table` containing the feature columns and the target column. | ||
* | ||
* The original `TabularDataset` is not modified. | ||
* | ||
* @result table A table containing the feature columns and the target column. | ||
*/ | ||
@Pure | ||
@PythonName("to_table") | ||
fun toTable() -> table: Table | ||
} | ||
``` | ||
|
||
## `#!sds attr` extras {#safeds.data.labeled.containers.TabularDataset.extras data-toc-label='extras'} | ||
|
||
Additional columns of the tabular dataset that are neither features nor target. | ||
|
||
These can be used to store additional information about instances, such as IDs. | ||
|
||
**Type:** [`Table`][safeds.data.tabular.containers.Table] | ||
|
||
## `#!sds attr` features {#safeds.data.labeled.containers.TabularDataset.features data-toc-label='features'} | ||
|
||
The feature columns of the tabular dataset. | ||
|
||
**Type:** [`Table`][safeds.data.tabular.containers.Table] | ||
|
||
## `#!sds attr` target {#safeds.data.labeled.containers.TabularDataset.target data-toc-label='target'} | ||
|
||
The target column of the tabular dataset. | ||
|
||
**Type:** [`Column<Any?>`][safeds.data.tabular.containers.Column] | ||
|
||
## `#!sds fun` toTable {#safeds.data.labeled.containers.TabularDataset.toTable data-toc-label='toTable'} | ||
|
||
Return a new `Table` containing the feature columns and the target column. | ||
|
||
The original `TabularDataset` is not modified. | ||
|
||
**Results:** | ||
|
||
| Name | Type | Description | | ||
|------|------|-------------| | ||
| `table` | [`Table`][safeds.data.tabular.containers.Table] | A table containing the feature columns and the target column. | | ||
|
||
??? quote "Stub code in `tabular_dataset.sdsstub`" | ||
|
||
```sds linenums="54" | ||
@Pure | ||
@PythonName("to_table") | ||
fun toTable() -> table: Table | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.