File size: 2,199 Bytes
00e9047
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Running the Examples

**You do not need to download the full dataset.** Each script has a cap (`N_SUBSET` or
`MAX_IMAGES`) that limits how many simulations or images are loaded. Download any small
subset of simulation directories and point `DATA_DIRS` at them — the scripts will use only
what is available.

## Requirements

```bash
pip install numpy pillow scikit-learn matplotlib torch
```

## Expected data layout

Each simulation directory must contain:

```
<sim_dir>/
    parameters.json                        # process parameters
    monitor/position-bounds_melt.dat       # melt-pool bounds (regression + classification)
    frames.csv                             # frame labels (generation only)
    frames/side/<frame>.png                # side-profile images (generation only)
```

Point `DATA_DIRS` in each script at one or more parent directories that hold these
simulation folders.

## Regression — Melt-Pool Width Prediction

```bash
python example_regression.py
```

- **Reviewer shortcut:** set `N_SUBSET = 30` (already the default) to use only the first
  30 simulations found — ~1 min on CPU. Set `None` to use all.
- Predicts steady-state melt-pool width from four process parameters.
- Results (parity plots + feature importance) are saved to `runs/regression_<timestamp>/`.

## Classification — Keyhole vs Conduction

```bash
python example_classification.py
```

- **Reviewer shortcut:** set `N_SUBSET = 30` (already the default) to use only the first
  30 simulations found — ~1 min on CPU. Set `None` to use all.
- Labels are derived automatically from simulation output — no manual annotation needed.
- Results (confusion matrices + feature importance) are saved to `runs/classification_<timestamp>/`.

## Generation — Unconditional VAE on Side Profiles

```bash
python example_generation.py
```

- **Reviewer shortcut:** set `MAX_IMAGES = 500` (already the default) to cap the number of
  frames loaded — ~2 min on CPU. Set `None` to use all images.
- Only frames labeled Keyhole or Conduction are used; Initial Emptiness and Forming Phase are excluded.
- Results (sample grids, reconstructions, loss curve) are saved to `runs/generation_<timestamp>/`.