... | @@ -363,8 +363,9 @@ def scale_row(A, row_idx, num_cols, s): |
... | @@ -363,8 +363,9 @@ def scale_row(A, row_idx, num_cols, s): |
|
A[row_idx][j] = A[row_idx][j] / s
|
|
A[row_idx][j] = A[row_idx][j] / s
|
|
```
|
|
```
|
|
|
|
|
|
**Implementation***
|
|
**Implementation**
|
|
|
|
|
|
|
|
```python
|
|
# Scale
|
|
# Scale
|
|
scaling_factor = matrix_XTX[i, i]
|
|
scaling_factor = matrix_XTX[i, i]
|
|
matrix_XTX[i, :] /= scaling_factor
|
|
matrix_XTX[i, :] /= scaling_factor
|
... | | ... | |