|
|
|
--- |
|
library_name: sklearn |
|
tags: |
|
- sklearn |
|
- regression |
|
- embeddings |
|
- weight-prediction |
|
- elastic |
|
model-index: |
|
- name: Elastic Net |
|
results: |
|
- task: |
|
type: regression |
|
name: Embedding Weight Prediction |
|
metrics: |
|
- type: mse |
|
value: 0.7620290676891099 |
|
name: Test MSE |
|
- type: r2 |
|
value: -0.044365932705230184 |
|
name: Test R² |
|
--- |
|
# Elastic Net Weight Predictor |
|
|
|
Linear model combining L1 and L2 regularization |
|
|
|
## Performance Metrics |
|
|
|
- Training Time: 1.55 seconds |
|
- Training MSE: 0.739313 |
|
- Testing MSE: 0.762029 |
|
- Training R²: 0.003906 |
|
- Testing R²: -0.044366 |
|
|
|
## Model Analysis |
|
|
|
### Predictions vs True Values |
|
![Predictions](./plots/predictions.png) |
|
|
|
This plot shows how well the model's predictions match the true values: |
|
- Points on the red line indicate perfect predictions |
|
- Spread around the line shows prediction uncertainty |
|
- Systematic deviations indicate bias |
|
|
|
### Error Distribution |
|
![Error Distribution](./plots/error_distribution.png) |
|
|
|
This plot shows the distribution of prediction errors: |
|
- Centered around zero indicates unbiased predictions |
|
- Width shows prediction precision |
|
- Shape reveals error patterns |
|
|
|
### Dimension-wise Performance |
|
![Dimension MSE](./plots/dimension_mse.png) |
|
|
|
This plot shows the MSE for each embedding dimension: |
|
- Lower bars indicate better predictions |
|
- Variations show which dimensions are harder to predict |
|
- Can guide targeted improvements |
|
|
|
## Usage |
|
|
|
```python |
|
import skops.io as sio |
|
|
|
# Load the model |
|
model = sio.load('weight_predictor_elastic.skops') |
|
|
|
# Make predictions |
|
weights = model.predict(question_embedding) |
|
``` |
|
|