Gaussian process regression (GPR) is one of the non-parametric methods and has been studied in many fields to construct a prediction model for highly non-linear system. It has been difficult to apply it to a real-time task due to its high computational cost but recent high-performance computers and computationally efficient algorithms make it possible. In our previous work, we derived a fast approximation method for GPR using a locality-sensitive hashing (LSH) and product of experts model, but its performance depends on the parameters of the hash functions used in LSH. Hash functions are usually determined randomly. In this research, we propose an optimization method for the parameters of hash functions by referring to a swarm optimization method. The experimental results show that accurate force estimation of an actual robotic arm is achieved with high computational efficiency.