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

docs: infrastructure to include notebooks as documentation #38

Merged
merged 7 commits into from
Mar 14, 2023
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ coverage.xml

# mkdocs
/site/
/docs/reference/safeds/
/docs/reference/SUMMARY.md

# MegaLinter
report/
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/generate_reference_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def list_class_and_function_names_in_module(module_name: str) -> list[str]:
# Remove the final "__init__" part
parts = parts[:-1]

# Skip private modules
if any(part.startswith("_") for part in parts):
continue

qualified_name = ".".join(parts)

for name in list_class_and_function_names_in_module(qualified_name):
Expand Down
332 changes: 332 additions & 0 deletions docs/tutorials/data_visualization_notebook.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/tutorials/machine_learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Create SupervisedDataset

Here is a short introduction to train and predict with a machine learning model in safe-ds.
Here is a short introduction to train and predict with a machine learning model in Safe-DS.

First we need to create a [SupervisedDataset][safeds.data.SupervisedDataset] from the training data.

Expand All @@ -24,7 +24,7 @@ to_be_predicted_table = Table({
sup_dataset = SupervisedDataset(table, target_column="target")
```

[SupervisedDatasets][safeds.data.SupervisedDataset] are used in safe-DS to train supervised machine learning models
[SupervisedDatasets][safeds.data.SupervisedDataset] are used in Safe-DS to train supervised machine learning models
(e.g. [RandomForest][safeds.ml.classification.RandomForest] for classification and
[LinearRegression][safeds.ml.regression.LinearRegression] as a regression model), because they keep track of the target
vector. A [SupervisedDataset][safeds.data.SupervisedDataset] can be created from a [Table][safeds.data.tabular.Table] and
Expand All @@ -37,7 +37,7 @@ train with (the sum of the rows). The `to_predicted_table` is the table we want
does not contain a target vector.

In order to train the [LinearRegression][safeds.ml.regression.LinearRegression]-model we need to make the following calls
in safe-DS:
in Safe-DS:

```python
linear_reg_model = LinearRegression()
Expand All @@ -46,7 +46,7 @@ linear_reg_model.fit(sup_dataset)

As we can see, a [LinearRegression][safeds.ml.regression.LinearRegression]-object is created.

In safe-DS machine learning models are separated in different classes where the different fit and predictions methods
In Safe-DS machine learning models are separated in different classes where the different fit and predictions methods
are implemented for the given machine learning model.

## Predicting new values
Expand Down
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ plugins:
- autorefs
- glightbox
- search
- mkdocs-jupyter:
execute: true
allow_errors: false
include_source: true

watch:
- src
Expand Down
143 changes: 136 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ mkdocs-glightbox = "^0.3.1"
mkdocs-literate-nav = "^0.6.0"
mkdocs-material = "^9.1.2"
mkdocs-section-index = "^0.3.5"
mkdocs-jupyter = "^0.23.0"
safe-ds-examples = "^0.2.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down