mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-05 03:07:42 +00:00
chore: rename ens_and_decision (#541)
* rename ens_and_decision * clarify workflow prompt * rename
This commit is contained in:
@@ -188,7 +188,7 @@ spec:
|
||||
ensemble: |-
|
||||
Ensemble specification text adhere to the following requirements:
|
||||
1. Function Interface:
|
||||
- Function Name: `ens_and_decision`
|
||||
- Function Name: `ensemble_workflow`
|
||||
- Parameters:
|
||||
- `test_preds_dict` (Dict[str, DT]): A dictionary of test predictions from different models. The key is the model file name.
|
||||
- `val_preds_dict` (Dict[str, DT]): A dictionary of validation predictions from different models. The key is the model file name.
|
||||
@@ -248,9 +248,14 @@ spec:
|
||||
- Integrate the following components into the workflow:
|
||||
- Data loading (`load_data.py`).
|
||||
- Feature engineering (`feature.py`).
|
||||
- Model workflow for training and testing (`model_*.py`).
|
||||
- Ensemble and decision-making (`ensemble.py`).
|
||||
- Model workflow for training and testing (`model_*.py`).
|
||||
- Ensemble workflow that combines results from the model workflow to obtain the final prediction (`ensemble.py`).
|
||||
- Treat each component as a modular and callable Python function.
|
||||
- The workflow script should be flexible enough to handle either a single model or multiple models, with filenames (model_*.py) that are not determined at the outset.
|
||||
For multiple model selection, utilize Python code to identify eligible models based on filenames, for example:
|
||||
```python
|
||||
available_models = [f for f in os.listdir('.') if f.startswith('model_') and 'test' not in f]
|
||||
```
|
||||
2. Feature Engineering
|
||||
- The feature engineering should be called only once. For example:
|
||||
`X_transformed, y_transformed, X_test_transformed = feat_eng(X, y, X_test)`
|
||||
@@ -284,11 +289,11 @@ spec:
|
||||
test_X=test_X
|
||||
)
|
||||
{% endfor %}
|
||||
final_pred = ens_and_decision(test_preds_dict, val_preds_dict, val_y)
|
||||
final_pred = ensemble_workflow(test_preds_dict, val_preds_dict, val_y)
|
||||
{% endraw %}
|
||||
|
||||
{% if latest_spec %}
|
||||
5. Former Specification:
|
||||
7. Former Specification:
|
||||
{{ latest_spec }}
|
||||
You should follow the provided specifications to improve this task.
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user