Balancing the power supply and demand is one of the most fundamental and important problems for the operation and control of any electric power grid. There are multiple ways to guarantee the supply-demand balance, but in this research we focus on one specific method to facilitate it namely the prediction of electricity consumption, which is widely used by utility companies or system operators. It is known that this prediction is challenging because of many reasons, for example, inexact weather forecasts, uncertain consumers' behaviors, etc. Hence, analytical and linear models of electricity consumption might not be able to deal with such issues well. This paper therefore presents a machine learning-based approach to predict electricity consumption, in which an improved radial basis function neural network (iRBF-NN) is proposed, whose inputs are time sampling points, temperature, and humidity associated with the consumption. The parameters of this iRBF-NN are sought by solving an optimization problem where four types of cost functions are used and compared on their performances and computational costs. Afterward, the derived model is employed to predict the future electricity consumption based on the hourly forecasts of temperature and humidity. Finally, simulation results for realistic data in Tokyo are presented to illustrate the efficiency of the proposed approach.