noamteyssier / crispr_screen

Efficient Differential Expression and Gene Aggregation for CRISPR screens.
https://noamteyssier.github.io/crispr_screen/
MIT License
6 stars 0 forks source link

implement weighted least squares regression #61

Closed noamteyssier closed 1 year ago

noamteyssier commented 1 year ago

can implement this better using matrix operations instead of current mapping implementation:

OLS

$$ \mathbf{\beta} =( \mathbf{X}^T \mathbf{X})^{-1} \mathbf{X}^T \mathbf{y} $$

Weighted OLS

$$ \mathbf{\beta} =( \mathbf{X}^T \mathbf{W} \mathbf{X})^{-1} \mathbf{X}^T\mathbf{W}\mathbf{y} $$