Early diagnosis of dementia by dissimilarity classification