Mental health is important in the development of every individual. A bad mentality can prevent a person from developing, making a person easily stressed, hopeless, and even attempt suicide and commit crimes. Currently there are quite a lot of case related to mental health which are caused by many factors such as economic, social and medical. Reflecting on this fact, there is a need for rapid mental health detection so that immediate intervention can be carried out. This needs to be done so that the patient's condition can improve. This research focuses on diagnosing mental illness by utilizing machine learning. The method used is random forest which in several studies has been proven to produce good accuracy. Random forest performs machine learning on the attributes contained in the dataset combined with K-Fold Cross Validation so that each patient can be evaluated. Next, a tuning process is also carried out to test the parameters contained in the method. After the tuning process was carried out, the best parameters obtained were n-estimator of 30, maximum depth of 4, minimum sample leaf of 2, and minimum sample split of 10. From the combination of these parameters, accuracy is 90.83%, recall is 90.83 %, and precision of 93.25%.
Copyrights © 2024