Recently huge amount of data is available in the field of medicine that helps the doctors in diagnosing diseases when analysed. Data mining techniques can be applied to these medical data to extract knowledge so that disease prediction becomes accurate and easier. In this work, cardiotocogram (CTG) data is analysed using Support Vector Machine (SVM) for predicting fetal risk. Opposition based firefly algorithm (OBFA) is proposed to extract the relevant features that maximise the classification performance of SVM.The obtained results show that opposition based firefly algorithm outperforms the standard firefly algorithm (FA).