This dataset contains 9 trained surrogate models across all four disciplines predicting the performance of UTS bay elements and a demo Python script.
Model Artifacts
Each surrogate is saved as a .joblib file which stores:
{
'model': <trained sklearn model>, # Trained model
'scaler': <StandardScaler or None>, # Feature scaler
'feature_names': List[str], # 31 feature names
'model_name': str, # e.g., 'Extra Trees'
'target': str, # Target variable
'discipline': str, # Discipline
'metrics': {
'test_r2': float,
'test_rmse': float,
'test_mae': float,
}
}
Demo Python script
The Python script predict_bays.py demonstrates how to extract the relevant features from the UTS BHoM data schema and use the trained models to predict the performance of each bay in a slab.
To run the CLI script, (cd) to the directory containing
predict_bays.py. By default, the trained models should be located in a models subdirectory within this directory. Alternatively, a custom
models directory can be specified using the --models-dir option.
These standard scientific Python packages are required:
pip install numpy pandas scikit-learn joblib
The script can be run with multiple options:
python predict_bays.py # default input
python predict_bays.py path/to/my_slab.json # custom input
python predict_bays.py input.json --format json # JSON output
python predict_bays.py input.json --bay 3 # single bay
python predict_bays.py input.json --live-load 3.0 # override defaults
python predict_bays.py input.json --models-dir ./models # custom models dir