Stroke is a medical condition that occurs when blood flow to the brain is blocked, causing damage to brain tissue. Stroke is the second largest cause of death and disability in the world, this disease can affect all ages and is influenced by various risk aspects, such as unhealthy lifestyles, high blood pressure, high blood sugar levels, and other risks. It is very important to detect stroke in patients as soon as possible to prevent it. This study proposes the optimization of the performance of the Random Forest algorithm as an early detection model for stroke by utilizing a hybrid sampling method called SMOTETomek and also conducting several experiments on the parameter settings of the Random Forest algorithm. The results of this study show an increase compared to the previous one which had an accuracy was 94% with a standard deviation of 2%, In this study, it managed to reach accuracy of 96% with a standard deviation of 0% with a ROC curve (AUC) value of 0.96 or 96%. The algorithm that has 96% accuracy in the discussion is Random Forest Algorithm as estimator of AdaBoost.