--- library_name: sklearn tags: - sklearn - regression - embeddings - weight-prediction - ridge model-index: - name: Ridge Regression results: - task: type: regression name: Embedding Weight Prediction metrics: - type: mse value: 0.752126161053798 name: Test MSE - type: r2 value: -0.03790253867179685 name: Test R² --- # Ridge Regression Weight Predictor Linear model with L2 regularization for handling multicollinearity ## Performance Metrics - Training Time: 15.79 seconds - Training MSE: 0.460125 - Testing MSE: 0.752126 - Training R²: 0.384710 - Testing R²: -0.037903 ## 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_ridge.skops') # Make predictions weights = model.predict(question_embedding) ```