1. A method, implemented in part by a computing device, for extracting discriminant feature of samples, the method comprising: providing data for samples in a multidimensional space; based on the data, computing local similarities for the samples; mapping the local similarities to weights; based on the mapping, formulating an inter-class scatter matrix and an intra-class scatter matrix; and based on the matrices, maximizing the ratio of inter-class scatter to intra-class scatter for the samples to provide discriminate features of the samples.