We present a methodology based on matrix factorization and gradient descent to predict the number of sessions established in the access points of a Wi-Fi network according to the users' behavior. As the network considered in this work is monitored and controlled by software in order to manage users and resources in real time, we may consider it as a cyber-physical system that interacts with the physical world through access points, whose demands can be predicted according to users' activity. These predictions are useful for relocating or reinforcing some access points according to the changing physical environment. In this work we propose a prediction model based on machine learning techniques, which is validated by comparing the prediction results with real user's activity. Our experiments collected the activity of 1095 users demanding 26,673 network sessions during one month in a Wi-Fi network composed of 10 access points, and the results are qualitatively valid with regard to the previous knowledge. We can conclude that our proposal is suitable for predicting the demand of sessions in access points when some devices are removed taking into account the usual activity of the network users. (C) 2017 Elsevier B.V. All rights reserved.