Case-based reasoning (CBR) systems use similarity functions to solve new problems with past situations. K-nearest neighbors algorithm (K-NN) have been used in CBR systems to define new cases status according to characteristics of past nearest cases. We proposed a new hybrid approach combining logistic regression (LR) with K-NN to optimize CBR classification. First, we analyzed the knowledge database by LR procedures and the Pearson residuals of the LR model were used to define cases' utility of the knowledge database into K-NN. Secondly, we compared the classification performances of LR model and K-NNs coupled or not with LR. Our results showed that the information provided by the residuals could be used to optimize the settings of K-NN and to improve CBR classification.