These models are essentially linear models, but with some other assumptions about the data and constraints on the coefficients.
Freyja does something like Lasso regression.
df_barcodes is their version of varmat.
mix is the frequency (count divided by coverage).
depths is the coverage.
- Both
mix and the 0s and 1s of the varmat are multiplied by log(depth + 1) / max(log(depth + 1)) so that mutations with low coverage aren't as important to the estimate.
eps and a_eps are small numbers for math precision.
adapt is a logical value that allows the algorithm to remove variants with an estimate of 0 and then re-fits the model.
Alcov uses a linear regression (frequency, rather than count and coverage) with constraints to ensure positivity of the coefficients.
lmps is the lineage definitions (like varmat).
Y is the frequencies
muts is the mutation names
- Alcov is very careful to ensure that mutations always match up - we should be too!
This is a low priority issue, but looking at others' models can be instructive for our own!
Feel free to comment on this issue with any questions you have about their approaches.
These models are essentially linear models, but with some other assumptions about the data and constraints on the coefficients.
Freyja does something like Lasso regression.
df_barcodesis their version ofvarmat.mixis the frequency (count divided by coverage).depthsis the coverage.mixand the 0s and 1s of the varmat are multiplied by log(depth + 1) / max(log(depth + 1)) so that mutations with low coverage aren't as important to the estimate.epsanda_epsare small numbers for math precision.adaptis a logical value that allows the algorithm to remove variants with an estimate of 0 and then re-fits the model.Alcov uses a linear regression (frequency, rather than count and coverage) with constraints to ensure positivity of the coefficients.
lmpsis the lineage definitions (likevarmat).Yis the frequenciesmutsis the mutation namesThis is a low priority issue, but looking at others' models can be instructive for our own!
Feel free to comment on this issue with any questions you have about their approaches.