Marine spatial planning (MSP) is considered a valuable tool in the ecosystem-based management of marine areas. Predictive modelling may be applied in the MSP framework to obtain spatially explicit information about biodiversity patterns. The growing number of statistical approaches used for this purpose implies the urgent need for comparisons between different predictive techniques. In this study, we evaluated the performance of selected machine learning and regression-based methods that were applied for modelling fish community indices. We hypothesized that habitat features can influence fish assemblage and investigated the effect of environmental gradients on demersal fish diversity (species richness and Shannon-Weaver Index). We used fish data from the Baltic International Trawl Surveys (2001)(2002)(2003)(2004)(2005)(2006)(2007)(2008)(2009)(2010)(2011)(2012)(2013)(2014) and maps of six potential predictors: bottom salinity, depth, seabed slope, growth season bottom temperature, seabed sediments and annual mean bottom current velocity. We compared the performance of six alternative modelling approaches: generalized linear models, generalized additive models, multivariate adaptive regression splines, support vector machines, boosted regression trees and random forests. We applied repeated 10-fold cross-validation, using accuracy as the measure of model quality. Finally, we selected random forest as the best performing algorithm and implemented it for the spatial prediction of fish diversity from the Baltic Proper to the Kattegat. To obtain information on the data reliability and confidence of the developed models, which are essential for MSP, we estimated the uncertainty of predictions with standard deviation of predictions obtained from all the trees in the ensemble random forest method. We showed how state-of-the-art predictive techniques, based on easily available data and simple Geographic Information System tools, can be used to obtain reliable spatial information about fish diversity. Our comparative work highlighted the potential of machine learning method to reduce prediction error in modelling of demersal fish diversity in the framework of MSP.