Abstract-Finding efficient solutions for search and optimisation problems has inspired many researchers to utilise nature informed algorithms, where the interactions in swarm could lead to promising solutions for challenging problems. One problem in machine learning is class imbalance, which occurs in realworld applications such as medical diagnosis. This problem can bias the classification or make it entirely out of context where the algorithms being applied to classify the data can potentially ignore the important minority class instances. In this paper, a parameters optimisation algorithm is proposed, which uses a swarm intelligence technique, Dispersive Flies Optimisation (DFO), to optimise the support vector machine kernel's parameters and perform cost sensitive learning to improve the classifier's performance on imbalanced data. The use of the swarming behaviour of the flies and their diversity in the search space in conducting cost sensitive learning are investigated on eight real-world datasets. The proposed algorithm has been compared with other techniques to optimise the classifier's parameters, that includes the well-known particle swarm optimisation, the frequently used grid search as well as random search, which is used as a control algorithm. The results demonstrate the statistically significant outperformance of the proposed optimisation technique over other techniques on the same datasets.