diff --git a/README.md b/README.md index b4f7d6e..1dfd094 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Since model selection is a computationally demanding and time consuming process, If an error occured in the middle of a batch run, then you can use the `pipeline_restart` function in the `pipeline` module to create a new batch which will analyze only those samples, which have not been analyzed previously. ### The model parameters don't converge and/or the fit does not describe the raw data well. -Check the separate file `How to adapt PeakPerformance to you data`. +Check the separate file `How to adapt PeakPerformance to your data`. # How to contribute If you encounter bugs while using PeakPerformance, please bring them to our attention by opening an issue. When doing so, describe the problem in detail and add screenshots/code snippets and whatever other helpful material you can provide. diff --git a/notebooks/Ex3_Pipeline_with_larger_example_dataset.ipynb b/notebooks/Ex3_Pipeline_with_larger_example_dataset.ipynb new file mode 100644 index 0000000..f81a984 --- /dev/null +++ b/notebooks/Ex3_Pipeline_with_larger_example_dataset.ipynb @@ -0,0 +1,160 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example 3: Example with a larger experimental data set" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas\n", + "import numpy as np\n", + "import arviz as az\n", + "from pathlib import Path\n", + "from peak_performance import pipeline as pl" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## User information" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For this example with a larger data set, the general paths within the `PeakPerformance` repository have already been formulated below (it is recommended to clone the repository on your local machine)." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "path_raw_data = Path(\"..\") / \"example/example_larger_dataset\"\n", + "path_template = Path(\"..\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Use the `prepare_model_selection()` function to create a copy of `Template.xlsx` in the directory stored in the `path_raw_data` variable. " + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "pl.prepare_model_selection(path_raw_data, path_template)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Automated model selection (optional)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform automated model selection with the following settings:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![](model_selection_example_larger_dataset.png)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "result, model_dict = pl.model_selection(path_raw_data)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Pipeline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the data analysis pipeline with the following settings:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![](pipeline_example_larger_dataset.png)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "results = pl.pipeline(\n", + " path_raw_data = path_raw_data,\n", + " raw_data_file_format = \".npy\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "results" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "pm530", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/model_selection_example_larger_dataset.png b/notebooks/model_selection_example_larger_dataset.png new file mode 100644 index 0000000..2e656ad Binary files /dev/null and b/notebooks/model_selection_example_larger_dataset.png differ diff --git a/notebooks/pipeline_example.png b/notebooks/pipeline_example.png index d8d4490..0cc7131 100644 Binary files a/notebooks/pipeline_example.png and b/notebooks/pipeline_example.png differ diff --git a/notebooks/pipeline_example_larger_dataset.png b/notebooks/pipeline_example_larger_dataset.png new file mode 100644 index 0000000..39191d6 Binary files /dev/null and b/notebooks/pipeline_example_larger_dataset.png differ