1. A method, comprising: determining proximities between all data samples in a set of the data samples; forming edges between the data samples as a function of the proximities; computing weights for the edges as a function of the proximities; selecting a plurality of the data samples as a function of the weights to form a subset of the data samples by solving an optimization problem, max Z = ( z 1 , ⁢ … ⁢ , z k ) ⁢ tr ⁡ ( X ⁡ ( Z T ⁢ Z + λ 1 ⁢ X T ⁢ LX + λ 2 ⁢ I ) - 1 ⁢ X T ) for a maximum where X is a matrix whose columns contain feature vectors for all of the data samples, Z is a matrix whose columns contain feature vectors for the subset of data samples, tr( ) denotes a matrix trace operation, I is an identity matrix, λ 1 is a first parameter, λ 2 is a second parameter, and L is a matrix defined as L=D−S, where S is a weight matrix including the weights and D is a diagonal matrix whose i-th entry at a diagonal is an i-th row sum of S; and storing the subset of the data samples.