Introduction: Nowadays human immunodeficiency virus (HIV)/acquired immunodeficiency syndrome (AIDS) is very dangerous. HIV targets the resistant system and weakens people's denial against many contaminations and some kinds of cancer. As the virus breaks up and impairs the function of immunity, infected people gradually become immunodeficient. Both deep learning and machine learning models play a great role in the prediction of diseases. The function of immunity is CD4 cell count. In this study both the machine learning and deep learning algorithms were applied. Material and methods: In this paper the data were collected from data world. Support vector machine, random forest, naive Bayes, gated recurrent unit, and long short-term memory were used to fit the incidence data. The performance of the model was evaluated by accuracy, precision, sensitivity, and F-score with respective errors. Results: Based on the evaluation, deep learning models achieve better results in the metrics of accuracy, precision, and F-score than machine learning models. But in sensitivity metrics machine learning models achieve better result than deep learning. Machine learning algorithms SVM, RF, and NB provide accuracy of 89.00%, 87.00%, and 86.94%; precision of 75.89%, 74.97%, and 75.78%; sensi-tivity of 87.96%, 84.00%, and 84.12%; F-score of 82.87%, 80.03%, and 79.05%, respectively. LSTM, GRU provides accuracy of 97.65%, 96.00%, precision of 77.35%, 84.00%, sensitivity of 87.93%, 82.98%, and F-score of 82.03%, 83.20%, respectively. Conclusions: The possibility survival of the illness is less than no illness. The existence of TB negative is higher than TB positive. In the machine learning model SVM provides better sensitivity with 87.96%, long short-term memory provides accuracy of 97.65%, precision of 77.35%, sensitivity of 87.93%, and F-score of 82.03%.