File size: 1,913 Bytes
8e25157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b29511b
8e25157
 
 
 
 
b29511b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e25157
 
 
 
 
 
 
 
 
 
 
 
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
62
63
64
65
66
67
68
69
70
71
72
73

    ---
    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)
    ```