PCOS or Polycystic Ovary Syndrome is a hormonal imbalance affecting egg cells' growth, making them remain small and not develop into large and mature egg cells to be fertilized by sperm cells. It is an endocrinopathy disease occurred in 10-15% of productive-aged women worldwide. The study aims to find the most suitable algorithm to be used in the optimization of PCOS detection. Thus, a performance comparison between random forest and logistic regression algorithms needs to be conducted in order to find the best performance in terms of accuracy. The research used a dataset containing 40 features. According to comparison results, the random forest algorithm was superior to logistic regression, with an accuracy of 91 %.