In this work, we propose to establish a mobile edge computing (MEC) network that considers computation, caching and communication jointly. Depending on the demanding categories, users in the network are partitioned into computation-driven and cachingdriven users, both of which need memory resource to improve their quality of experiences (QoEs). Thus, a memory resource allocation problem is aroused to maximize the performance of the whole network. Due to the fact that the users' characterization plays an important role to the resource allocation scheme and with the help of machine learning techniques, we propose to study and predict the users' patterns by distributed learning methods which take the heterogeneity of base station type and users' mobility, etc into consideration. The proposed machine learning based distributed MEC system can maximize the efficiency of the network by optimizing the resource allocation scheme and perfectly predicting users' pattern. CCS CONCEPTS • Networks → Network performance modeling; Network performance analysis.