Team Name:      Fit happens

Team Members:   Daniel Gehrig
                Adrian Ruckli
                Maximilian Göttgens

Summary of Approach:

1. - Convert the given raw data to a matrix of size 176x208x176 using a publically 
     available 3D-Data Reader ((c) 2010, Dirk-Jan Kroon).

    - Reduce dimensionality of the 3D matrix to 2D by cutting it into slices and
     attach the slices to one another in a 2D plane. (This step is important for
     the next step.)

    - Generate an intensity histogram of every brain with 5000 bins using MATLABs
     histcounts function.
     Every bin has a width of 1 intensity unit and thus counts the number of 
     voxels with intensity i. Voxels with intensity 0 are excluded as they 
     correspond to background.
    
    - Normalize the histogram to compensate for noise generated by varying 
     brain volume and the use of different MRI scanners or settings.
   
2.  - The intensity histogram generally exhibits 3 peaks which are used for
     feature extraction. Three features are extracted from the intensity:
     - voxels in the range 170-270 around the first peak (including limits).
     - voxels in the range 715-785 around the second peak (including limits).
     - voxels in the range 1340-1560 around the third peak (including limits). 
    These are called [x1, x2, x3]

3. - Fit a quartic polynomial with interaction terms for the three features. 
     The final feature vector has the form: 
     X = [x1, x2, x3, x2^3, x1*x3, x2*x3, x2^4, x2^3*x3] and the age prediction
     has the following formula:
     y = b0 + x*b where b = [b1; b2; b3; b4; b5; b6; b7; b8] 

   - The parameters where chosen to minimize the Bayesian Information Criterion (BIC).
   
   - b is chosen through MLE with weighted LS. The weight matrix is of a bisquare
     type so as to reduce the impact of outliers on the fit. A second weight matrix
     is multiplied to take into account the high density of old and young test subject.
     The final formula for b is:
     
     b = (X^T*W*X)^-1*X^T*W*y 

     where W is the weight matrix, X is the data matrix and y are the targets.

4. - No post processing steps.