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

feat: integrate version 0.26.0 of the safe-ds Python library #1184

Merged
merged 3 commits into from
May 29, 2024
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
15 changes: 8 additions & 7 deletions docs/api/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ search:
- [Cell](safeds/data/tabular/containers/Cell.md)
- [Column](safeds/data/tabular/containers/Column.md)
- [Row](safeds/data/tabular/containers/Row.md)
- [StringCell](safeds/data/tabular/containers/StringCell.md)
- [Table](safeds/data/tabular/containers/Table.md)
- plotting
- [ColumnPlotter](safeds/data/tabular/plotting/ColumnPlotter.md)
Expand Down Expand Up @@ -94,15 +95,11 @@ search:
- nn
- converters
- [InputConversion](safeds/ml/nn/converters/InputConversion.md)
- [InputConversionImage](safeds/ml/nn/converters/InputConversionImage.md)
- [InputConversionImageToColumn](safeds/ml/nn/converters/InputConversionImageToColumn.md)
- [InputConversionImageToImage](safeds/ml/nn/converters/InputConversionImageToImage.md)
- [InputConversionImageToTable](safeds/ml/nn/converters/InputConversionImageToTable.md)
- [InputConversionTable](safeds/ml/nn/converters/InputConversionTable.md)
- [InputConversionTimeSeries](safeds/ml/nn/converters/InputConversionTimeSeries.md)
- [OutputConversion](safeds/ml/nn/converters/OutputConversion.md)
- [OutputConversionImageToColumn](safeds/ml/nn/converters/OutputConversionImageToColumn.md)
- [OutputConversionImageToImage](safeds/ml/nn/converters/OutputConversionImageToImage.md)
- [OutputConversionImageToTable](safeds/ml/nn/converters/OutputConversionImageToTable.md)
- [OutputConversionTable](safeds/ml/nn/converters/OutputConversionTable.md)
- [OutputConversionTimeSeries](safeds/ml/nn/converters/OutputConversionTimeSeries.md)
- layers
- [AveragePooling2DLayer](safeds/ml/nn/layers/AveragePooling2DLayer.md)
- [Convolutional2DLayer](safeds/ml/nn/layers/Convolutional2DLayer.md)
Expand All @@ -112,5 +109,9 @@ search:
- [Layer](safeds/ml/nn/layers/Layer.md)
- [LSTMLayer](safeds/ml/nn/layers/LSTMLayer.md)
- [MaxPooling2DLayer](safeds/ml/nn/layers/MaxPooling2DLayer.md)
- typing
- [ConstantImageSize](safeds/ml/nn/typing/ConstantImageSize.md)
- [ModelImageSize](safeds/ml/nn/typing/ModelImageSize.md)
- [VariableImageSize](safeds/ml/nn/typing/VariableImageSize.md)
- [NeuralNetworkClassifier](safeds/ml/nn/NeuralNetworkClassifier.md)
- [NeuralNetworkRegressor](safeds/ml/nn/NeuralNetworkRegressor.md)
28 changes: 14 additions & 14 deletions docs/api/safeds/data/image/containers/ImageList.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ To create an `ImageList` call one of the following static methods:
```sds linenums="17"
class ImageList {
/**
* Return the number of images in this image list.
* The number of images in this image list.
*/
@PythonName("number_of_images") attr imageCount: Int
@PythonName("image_count") attr imageCount: Int
/**
* Return a list of all widths in this image list.
* A list of all widths in this image list.
*/
attr widths: List<Int>
/**
* Return a list of all heights in this image list.
* A list of all heights in this image list.
*/
attr heights: List<Int>
/**
* Return the channel of all images.
* The channel of all images.
*/
attr channel: Int
/**
* Return the sizes of all images.
* The sizes of all images.
*/
attr sizes: List<ImageSize>
/**
* Return the number of different sizes of images in this image list.
* The number of different sizes of images in this image list.
*/
@PythonName("number_of_sizes") attr sizeCount: Int
@PythonName("size_count") attr sizeCount: Int

/**
* Create an ImageList from a list of images.
Expand Down Expand Up @@ -515,37 +515,37 @@ To create an `ImageList` call one of the following static methods:

## <code class="doc-symbol doc-symbol-attribute"></code> `channel` {#safeds.data.image.containers.ImageList.channel data-toc-label='[attribute] channel'}

Return the channel of all images.
The channel of all images.

**Type:** [`Int`][safeds.lang.Int]

## <code class="doc-symbol doc-symbol-attribute"></code> `heights` {#safeds.data.image.containers.ImageList.heights data-toc-label='[attribute] heights'}

Return a list of all heights in this image list.
A list of all heights in this image list.

**Type:** [`List<Int>`][safeds.lang.List]

## <code class="doc-symbol doc-symbol-attribute"></code> `imageCount` {#safeds.data.image.containers.ImageList.imageCount data-toc-label='[attribute] imageCount'}

Return the number of images in this image list.
The number of images in this image list.

**Type:** [`Int`][safeds.lang.Int]

## <code class="doc-symbol doc-symbol-attribute"></code> `sizeCount` {#safeds.data.image.containers.ImageList.sizeCount data-toc-label='[attribute] sizeCount'}

Return the number of different sizes of images in this image list.
The number of different sizes of images in this image list.

**Type:** [`Int`][safeds.lang.Int]

## <code class="doc-symbol doc-symbol-attribute"></code> `sizes` {#safeds.data.image.containers.ImageList.sizes data-toc-label='[attribute] sizes'}

Return the sizes of all images.
The sizes of all images.

**Type:** [`List<ImageSize>`][safeds.lang.List]

## <code class="doc-symbol doc-symbol-attribute"></code> `widths` {#safeds.data.image.containers.ImageList.widths data-toc-label='[attribute] widths'}

Return a list of all widths in this image list.
A list of all widths in this image list.

**Type:** [`List<Int>`][safeds.lang.List]

Expand Down
77 changes: 9 additions & 68 deletions docs/api/safeds/data/image/typing/ImageSize.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,18 @@
# <code class="doc-symbol doc-symbol-class"></code> `ImageSize` {#safeds.data.image.typing.ImageSize data-toc-label='[class] ImageSize'}
---
search:
boost: 0.5
---

A container for image size data.
# :test_tube:{ title="Experimental" } <code class="doc-symbol doc-symbol-class"></code> `ImageSize` {#safeds.data.image.typing.ImageSize data-toc-label='[class] ImageSize'}

**Parameters:**
A container for image size data.

| Name | Type | Description | Default |
|------|------|-------------|---------|
| `width` | [`Int`][safeds.lang.Int] | the width of the image | - |
| `height` | [`Int`][safeds.lang.Int] | the height of the image | - |
| `channel` | [`Int`][safeds.lang.Int] | the channel of the image | - |
| `ignoreInvalidChannel` | [`Boolean`][safeds.lang.Boolean] | - | `#!sds false` |
**Parent type:** [`ConstantImageSize`][safeds.ml.nn.typing.ConstantImageSize]

??? quote "Stub code in `ImageSize.sdsstub`"

```sds linenums="12"
class ImageSize(
width: Int,
height: Int,
channel: Int,
@PythonName("_ignore_invalid_channel") ignoreInvalidChannel: Boolean = false
) {
/**
* Get the width of this `ImageSize` in pixels.
*/
attr width: Int
/**
* Get the height of this `ImageSize` in pixels.
*/
attr height: Int
/**
* Get the channel of this `ImageSize` in pixels.
*/
attr channel: Int

/**
* Create a `ImageSize` of a given image.
*
* @param image the given image for the `ImageSize`
*
* @result imageSize the calculated `ImageSize`
*/
@Pure
@PythonName("from_image")
static fun fromImage(
image: Image
) -> imageSize: ImageSize
}
```sds linenums="15"
class ImageSize sub ConstantImageSize
```

## <code class="doc-symbol doc-symbol-attribute"></code> `channel` {#safeds.data.image.typing.ImageSize.channel data-toc-label='[attribute] channel'}
Expand All @@ -65,29 +32,3 @@ Get the height of this `ImageSize` in pixels.
Get the width of this `ImageSize` in pixels.

**Type:** [`Int`][safeds.lang.Int]

## <code class="doc-symbol doc-symbol-static-function"></code> `fromImage` {#safeds.data.image.typing.ImageSize.fromImage data-toc-label='[static-function] fromImage'}

Create a `ImageSize` of a given image.

**Parameters:**

| Name | Type | Description | Default |
|------|------|-------------|---------|
| `image` | [`Image`][safeds.data.image.containers.Image] | the given image for the `ImageSize` | - |

**Results:**

| Name | Type | Description |
|------|------|-------------|
| `imageSize` | [`ImageSize`][safeds.data.image.typing.ImageSize] | the calculated `ImageSize` |

??? quote "Stub code in `ImageSize.sdsstub`"

```sds linenums="38"
@Pure
@PythonName("from_image")
static fun fromImage(
image: Image
) -> imageSize: ImageSize
```
12 changes: 10 additions & 2 deletions docs/api/safeds/data/labeled/containers/Dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ search:

A dataset is used as input to machine learning models.

**Type parameters:**

| Name | Upper Bound | Description | Default |
|------|-------------|-------------|---------|
| `I` | [`Any?`][safeds.lang.Any] | The type of the input data. | - |
| `O` | [`Any?`][safeds.lang.Any] | The type of the output data. | - |

**Inheritors:**

- [`ImageDataset`][safeds.data.labeled.containers.ImageDataset]
- [`TabularDataset`][safeds.data.labeled.containers.TabularDataset]
- [`TimeSeriesDataset`][safeds.data.labeled.containers.TimeSeriesDataset]

??? quote "Stub code in `Dataset.sdsstub`"

```sds linenums="6"
class Dataset
```sds linenums="9"
class Dataset<out I, out O>
```
24 changes: 12 additions & 12 deletions docs/api/safeds/data/labeled/containers/ImageDataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

A Dataset for ImageLists as input and ImageLists, Tables or Columns as output.

**Parent type:** [`Dataset`][safeds.data.labeled.containers.Dataset]
**Parent type:** [`Dataset<ImageList, O>`][safeds.data.labeled.containers.Dataset]

**Parameters:**

| Name | Type | Description | Default |
|------|------|-------------|---------|
| `inputData` | [`ImageList`][safeds.data.image.containers.ImageList] | the input ImageList | - |
| `outputData` | `#!sds T` | the output data | - |
| `outputData` | `#!sds O` | the output data | - |
| `batchSize` | [`Int`][safeds.lang.Int] | the batch size used for training | `#!sds 1` |
| `shuffle` | [`Boolean`][safeds.lang.Boolean] | weather the data should be shuffled after each epoch of training | `#!sds false` |

**Type parameters:**

| Name | Upper Bound | Description | Default |
|------|-------------|-------------|---------|
| `T` | [`Any?`][safeds.lang.Any] | - | - |
| `O` | [`Any?`][safeds.lang.Any] | - | - |

??? quote "Stub code in `ImageDataset.sdsstub`"

```sds linenums="17"
class ImageDataset<T>(
class ImageDataset<out O>(
@PythonName("input_data") inputData: ImageList,
@PythonName("output_data") outputData: T,
@PythonName("output_data") outputData: O,
@PythonName("batch_size") batchSize: Int = 1,
shuffle: Boolean = false
) sub Dataset {
) sub Dataset<ImageList, O> {
/**
* Get the input `ImageSize` of this dataset.
*/
Expand All @@ -53,7 +53,7 @@ A Dataset for ImageLists as input and ImageLists, Tables or Columns as output.
*/
@Pure
@PythonName("get_output")
fun getOutput() -> output: T
fun getOutput() -> output: O

/**
* Return a new `ImageDataset` with shuffled data.
Expand All @@ -63,7 +63,7 @@ A Dataset for ImageLists as input and ImageLists, Tables or Columns as output.
* @result imageDataset the shuffled `ImageDataset`
*/
@Pure
fun shuffle() -> imageDataset: ImageDataset<T>
fun shuffle() -> imageDataset: ImageDataset<O>
}
```

Expand Down Expand Up @@ -105,14 +105,14 @@ Get the output data of this dataset.

| Name | Type | Description |
|------|------|-------------|
| `output` | `#!sds T` | the output data of this dataset |
| `output` | `#!sds O` | the output data of this dataset |

??? quote "Stub code in `ImageDataset.sdsstub`"

```sds linenums="46"
@Pure
@PythonName("get_output")
fun getOutput() -> output: T
fun getOutput() -> output: O
```

## <code class="doc-symbol doc-symbol-function"></code> `shuffle` {#safeds.data.labeled.containers.ImageDataset.shuffle data-toc-label='[function] shuffle'}
Expand All @@ -125,11 +125,11 @@ The original dataset list is not modified.

| Name | Type | Description |
|------|------|-------------|
| `imageDataset` | [`ImageDataset<T>`][safeds.data.labeled.containers.ImageDataset] | the shuffled `ImageDataset` |
| `imageDataset` | [`ImageDataset<O>`][safeds.data.labeled.containers.ImageDataset] | the shuffled `ImageDataset` |

??? quote "Stub code in `ImageDataset.sdsstub`"

```sds linenums="57"
@Pure
fun shuffle() -> imageDataset: ImageDataset<T>
fun shuffle() -> imageDataset: ImageDataset<O>
```
6 changes: 3 additions & 3 deletions docs/api/safeds/data/labeled/containers/TabularDataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Columns in a tabular dataset are divided into three categories:
Feature columns are implicitly defined as all columns except the target and extra columns. If no extra columns
are specified, all columns except the target column are used as features.

**Parent type:** [`Dataset`][safeds.data.labeled.containers.Dataset]
**Parent type:** [`Dataset<Table, Column<Any?>>`][safeds.data.labeled.containers.Dataset]

**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. | - |
| `targetName` | [`String`][safeds.lang.String] | The name of the target column. | - |
| `extraNames` | [`List<String>`][safeds.lang.List] | Names of the columns that are neither features nor target. If null, no extra columns are used, i.e. all but the target column are used as features. | `#!sds []` |

**Examples:**
Expand All @@ -44,7 +44,7 @@ pipeline example {
data: union<Map<String, List<Any>>, Table>,
@PythonName("target_name") targetName: String,
@PythonName("extra_names") extraNames: List<String> = []
) sub Dataset {
) sub Dataset<Table, Column> {
/**
* The feature columns of the tabular dataset.
*/
Expand Down
Loading