### Panel A - (the most basic) model formulation (with classical ARD priors)
The model for high quality data classification follows a regression form with ARD priors. The low-quality model is trained by marginalising over the posterior distribution of the high quality coefficients $`\mathbf{w}^{H}`$ to give (the distribution of) a set of low-quality coefficients (with ARD priors likewise).
#### On the high quality data.
- Suppose $`\mathbf{X}^{H}`$ is the $`v\times d`$ feature matrix (e.g. connectivity profiles of $`v`$ voxels). $`\mathbf{t}`$ is the $`v\times 1`$ labels (0-1 variables). $`\mathbf{w}`$ is the $`d\times 1`$ coefficients, and $`\mathbf{y}=\sigma(\mathbf{X}^{H}\mathbf{w})`$ determines the probability for each class.
- Here we adopt the Relevance Vector Machine (RVM) with ARD prior to find $`\mathbf{w}`$. Suppose $`\mathbf{w}`$ has a prior distribution $`\mathcal{N}(\mathbf{0}, \text{diag}(\alpha_{i}^{-1}))`$. We hope $`\alpha_{i}`$ is driven to Inf, if the associated feature is useless for prediction.
- The posterior distribution $`P(\mathbf{w}|\mathbf{X}^{H}, \mathbf{t}, \alpha_1,...\alpha_d)`$ can be found by maximising
using Newton-Raphason algorithm. Suppose $`P(\mathbf{w}|\mathbf{X}^{H}, \mathbf{t}, \alpha_1,...\alpha_d)\sim\mathcal{N}(\mathbf{w}^{*}, \mathbf{H}^{-1})`$. By marginalising over the posterior of $`\mathbf{w}`$ (using Laplace Approximation), we can find $`\alpha_1,...\alpha_d`$ by maximising type-II likelihood (evidence)
- Suppose $`\mathbf{X}^{L}`$ is the connectivity profiles of the voxels in low quality image. Here we seed to predict $`\mathbf{t}`$ using $`\mathbf{X}^{L}`$, aided by high quality training. We assume both $`\mathbf{X}^{L}`$ and $`\mathbf{X}^{H}`$ share the same set of $`\mathbf{t}`$ and $`\mathbf{y}`$.
- Different from the high quality data, we assume $`y=\sigma(X^{L}\mathbf{w} + X^{L}\Delta\mathbf{w})`$, where the posterior distribution of $`\mathbf{w}`$ is derived from training on the high quality data, i.e., $`P(\mathbf{w}|\mathbf{X}^{H}, \mathbf{t}, \alpha_1,...\alpha_d)`$, and the additional weights $`\Delta\mathbf{w}`$ has a prior distribution $`\mathcal{N}(0, \text{diag}(\beta_{i}^{-1}))`$. These additional weights are introduced to adapt the model towards low quality features.
- Similarly, we find the posterior of $`\Delta\mathbf{w}`$ by maximising the posterior
which is intractable... We thus generate samples of $`P(\mathbf{w}|\mathbf{X}^{H}, \mathbf{t}, \alpha_1,...\alpha_d)`$ to calculate the integral, and use Laplace approximation for the posterior of $`\Delta\mathbf{w}`$.
#### Prediction on the low quality data.
- With $`\alpha_1,...\alpha_d,\beta_1,...\beta_d`$ estimated, we can calculate the true posterior of $`\Delta\mathbf{w}`$ and $`\mathbf{w}`$.
zero_col=rand(1:d,Int(d*0.05))# 5% of the columns are zero
[x.=exp.(x)forx∈[Xtrain,Xtest]]
XLtrain=copy(Xtrain)
XLtrain[:,zero_col].=0.
XLtest=copy(Xtest)
XLtest[:,zero_col].=0.
# low quality -- more outliers
outlier_row=rand(1:d,Int(d*0.01))# 1% outliers
XLtrain=copy(Xtrain)
XLtrain[outlier_row,:].+=randn(Int(d*0.01),d)
XLtest=copy(Xtest)
XLtest[outlier_row,:].+=randn(Int(d*0.01),d)
[x.=exp.(x)forx∈[Xtrain,Xtest,XLtrain,XLtest]]
```
And we compared three methods:
- Blue: High + Low training
- Red: trained on low quality data
- Orange: Lasso Logistic regression.


When $`d >> n`$, Lasso appears superior to the others.
### Panel B - with structured ARD priors (in progress).
#### On the high quality data
Instead of using ARD priors $`\mathbf{w}\sim\mathcal{N}(0, \text{diag}(\alpha_1,...\alpha_d))`$, we assume the hyperparamters have a underlying structure, e.g., $`\mathbf{w}\sim\mathcal{N}(0, \text{diag}(\exp(\mathbf{u}))`$, where $`\mathbf{u}`$ is a Gaussian Process $`\mathbf{u}\sim\mathcal{N}(\mathbf{0}, \mathbf{C}_{\Theta})`$ such that neighbouring features (i.e., adjoining/co-activating voxels) share similar sparsity. [(Ref)](https://proceedings.neurips.cc/paper/2014/file/f9a40a4780f5e1306c46f1c8daecee3b-Paper.pdf)
#### On the low quality data
The low-quality coefficients have similar structured ARD priors (exp of a Gaussian Process) that may not share the same hyperparameters with the high-quality coefficients' priors. We seek to solve the hyperparameters for the low-quality classification model, marginalising over the posteriors of the high-quality model.
### Panel C - with structured spike-and-slab priors (in progress).
#### On the high quality data
Similarly, instead of using ARD priors, we assume the coefficients have spike-and-slab priors with latent variables $`\gamma_i^{H}, i=1,2,...d`$, where $`\gamma_i\sim\text{Bernoulli}(\sigma(\theta_i))`$. The hyperparameter $`\theta`$ can be a Gaussian Process. [(ref)](https://ohbm.sparklespace.net/srh-2591/)
#### On the low quality data
The low quality coefficients have similar spike-and-slab priors to enforce sparsity.
### Panel A - (the most basic) model formulation (with classical ARD priors)
The model for high quality data classification follows a regression form with ARD priors. The low-quality model is trained by marginalising over the posterior distribution of the high quality coefficients $`\mathbf{w}^{H}`$ to give (the distribution of) a set of low-quality coefficients (with ARD priors likewise).