Earthquakes are catastrophic geo-hazards that endanger human life. Predicting the occurrence of earthquakes is very helpful to reduce the harmful effects. Therefore, a system to predict the forthcoming earthquakes and issues warning promptly are very appealing. There have been researches going on in the machine learning area to predict the earthquakes by the statistical methods based on the previous events recorded. However, the prediction of earthquakes suffers from the class imbalance problem as these events occur very rarely. This system is built to analyze the performance of various machine learning algorithms. The class imbalance problem of the data set is reduced using the resampling method. The system is trained using different algorithms namely: Support Vector Machine, K-Nearest Neighbour, Decision Tree, Logistic Regression and Naive Bayes. The performance is evaluated based on the values of accuracy, precision, recall, and f-measure. To increase the performance, k-fold cross-validation is implemented and performance is again evaluated. This cross-validation is carried out for three different values of k such as 5, 10 and 15. The system is evaluated with both class imbalance problem prevailing dataset and class imbalance problem resolved dataset. The performance is plotted and the optimum value of k for k-fold cross validation is found out. It also identifies which classifier is best for the prediction of earthquake.