This repository features an ML approach toward estimating process parameters for production steps
Project description
p-opt
Welcome to the p-opt repository. This repository features an ML approach toward estimating process paramaters for production steps.
The approach consists of two steps: (i) training an ML model to approximate the process step on observations from DoE or directly the production process, (ii) using a second optimization of the input values to the ML model via backpropagation to fit a given new input-output combination. The approach is mainly based on ideas from Say et al. 2020 and Roche et al. 2023.
Table of Contents
Installation
To install the required packages and dependencies, run the following commands:
conda env create -f paramopt.yml
Usage
You find all necessary code for training and estimating the parameters in the main.py
file.
For your individual dataset, you need to create your own dataloader in /code/dataloader
.
You can run a hyperparameter search for estimating the optimal hyperparameters of your model with Optuna by initializing the HparamSearch
class and running the optimize_study()
function.
study = HparamSearch(hparam=json.load('link-to-hparam-file.json'))
study.optimize_study(n_trials=64)
For only training the model, use the single_training()
function and for only reconstruction parameters, use the single_reconstruction()
function.
You can use both function combined in the single_training_and_reconstruction()
function.
# only training the model
single_training(hparam)
# only finidng parameters
single_reconstruction(hparam, model)
# training the model and finding parameters
single_training_and_reconstruction(hparam)
Tensorboard logger is embedded, and there is the possiblity to visualize the reconstruction as single plot or GIF over the optimization period.
Examples
Here are two examples for using the single_reconstruction()
function to estimate process parameters of a pre-trained ultra-sonic-welding process.
Where the black dot indicates the ground truth (gt), the cyan dot indicates the initial guess before the optimization (guess), and the green dot indicates the optimization (rec)
This is an example for reconstructing one of three parameters
This is an example for reconstructing two of three parameters
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file param_opt-0.0.4.tar.gz
.
File metadata
- Download URL: param_opt-0.0.4.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47bb5061a3599ed084d4c3b44fd9d3f1b13ea209db5adf17633e0e03974c27bf |
|
MD5 | 0eb566cf44599f28ca494c1923b05b1d |
|
BLAKE2b-256 | 815c0c454927b0d2c26dc7ca60cf08fb43066a3542071a6b0aad304137a6ea6c |
File details
Details for the file param_opt-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: param_opt-0.0.4-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e5b0c0a9e10e167f4fdeeb3940f65fce97ec998e4b2fd8cbba0777b34beadaf |
|
MD5 | c837a7499ed303e1a4c1f98db4887253 |
|
BLAKE2b-256 | 2f989e0af90c62cbee857ff73aab98e896433d0b74784a1205306976fb27ac30 |