Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

✅ Data loaded successfully!
  • Target variabele y\pmb{y}:

    • Avg CTAT

  • Features X\pmb{X}:

    • Avg VTAT

    • Booking Value

    • Ride Distance

✍️

Maak NumPy array aan voor de target y\pmb{y} mèt standaardschaling.

✍️

Maak NumPy array aan voor de featurematrix X\pmb{X} mèt standaardschaling.

✍️

Maak random 80/20% train/test split van y\pmb{y} en X\pmb{X}.

Training set size: 81600
Test set size: 20400
Training set shape: X=(81600, 4), y=(81600,)
Test set shape: X=(20400, 4), y=(20400,)

✍️

Hoe is het gesteld met het conditienummer van de training design matrix en de multicollineariteit bij de predictoren?

Condition number of training design matrix: 1.07

Interpretation:
- Excellent: Matrix is well-conditioned

✍️

Implementeer de manuele analytische oplossing voor de parameters.

Closed-form OLS coefficients:
  β₀ (bias):        0.001998
  β₁ (Avg VTAT):    0.055260
  β₂ (Booking Value):    0.000572
  β₃ (Ride Distance): 0.099276

✍️

Bereken de R2R^2 score op de test data.


Closed-form OLS R² on test set: 0.0126

✍️

Implementeer de manuele gradient descent oplossing voor de parameters.

Iteration 1/1000, Loss: 0.999292
Iteration 100/1000, Loss: 0.985887
Iteration 200/1000, Loss: 0.985688
Iteration 300/1000, Loss: 0.985685
Iteration 400/1000, Loss: 0.985685
Iteration 500/1000, Loss: 0.985685
Iteration 600/1000, Loss: 0.985685
Iteration 700/1000, Loss: 0.985685
Iteration 800/1000, Loss: 0.985685
Iteration 900/1000, Loss: 0.985685
Iteration 1000/1000, Loss: 0.985685

Final parameters: {b}

Comparison with closed-form OLS:
  β₀: GD=0.001998, OLS=0.001998
  β₁: GD=0.055260, OLS=0.055260
  β₂: GD=0.000572, OLS=0.000572
  β₃: GD=0.099276, OLS=0.099276

✍️

Implementeer de manuele maximum likelihood schatting voor de normaal verdeelde ruis parameter.


Estimated standard deviation of residuals: 0.992841

✍️

Bereken de 95% betrouwbaarheidsintervallen voor b0b_0, b1b_1, b2b_2 en b3b_3.


95% Confidence Intervals:
  b0: [-0.005, 0.009]
  b1: [0.048, 0.062]
  b2: [-0.006, 0.007]
  b3: [0.092, 0.106]