Polycystic Ovary Syndrome (PCOS) is one of the profound causes of infertility in women. Early detection, and treatment is essential in improving the prognosis in patients. The current conditions of fertility in India are skeptical, wherein women are at higher risk. PCOS is one of the major causes of infertility and scales upto 20% of women population in India. This requires a timely and accurate diagnosis which can be accomplished by developing automated diagnosing models. Having noted that the data to be dealt with consists of both clinical and non-clinical inputs, the effective information alone needs to be considered for the diagnosis. This necessitates an intelligent selection of features before diagnosing. Thus, swarm intelligence (SI) for feature selection and machine learning for classification is considered to develop a robust and efficient diagnostic model to detect PCOS condition. Initially, optimal features are selected using statistical approaches namely, correlation and Chi Square test and exhaustive search procedure by recursive elimination. Further, the SI algorithms, Particle Swarm Optimization (PSO) and Flashing firefly (FF) are attempted to identify the optimal number and feasible combination of features. Random forest classifier has been used in the ML model for classification. A comparative analysis of the results is discussed and validated based on the parameters accuracy of training and testing, precision, recall, F1-score, and AUC-ROC. The results reveal that ML models with different feature selection algorithms give best performance for different feature dimensions and the model with PSO based feature selection gives the highest performance with minimum feature size. Also PSO based algorithm evades the problem of redundancy in the feature subset.