In the Chronic kidney disease detection process, irrelevant and insignificant features not only reduce the performance of the classification process, but also prevent accurate decision-making, especially when the volume of data is very large. The feature selection technique is commonly used to reduce the size of a large data set. The result of this process will affect the time required to investigate data and will lead to improved accuracy levels. Therefore, in this thesis, a feature selection algorithm based on the Neighborhood Rough Set Algorithm and the rain optimization Algorithm, called NRS-ROA, is proposed to reduce data dimensions. First, based on the Neighborhood Rough Set model, the mean distance class from the decision features is defined and the neighborhood size is automatically determined. Then, the formula for calculating the importance of the feature is improved. Finally, the ROA method with global search capability is used to select the feature. Also, to test the feasibility of the proposed algorithm, several experiments were performed on the CKD dataset. The experimental results show that the Accuracy for the proposed method and other methods [34, 35] are 100%, 94% and 99.83%, respectively. The use of ROA based on the rough set algorithm method leads to higher detection accuracy.